trader1011
New Member
- Joined
- Sep 24, 2013
- Messages
- 7
Hi,
I am trying to calculate the Median & 75th Percentile for the range in array where the range differs in the length. For example, my data looks like the one given below (my data-set is almost 100,000 rows). Now I am trying to find the median and 75th percentile values of a combined set of 3 batches where every next batch will drop the first member and and the next member (Set 1 - Batch no. 1, 2,3 & Set 2 - Batch no. 2, 3, 4 etc.). I have provided the result in the table no. 2.
As one can see from the data-set the length of range (no. of data points for each batch) is varying.
Any help will be appreciated.
Table 1: Data-set
<tbody>
</tbody>
Table 2: Result
<tbody>
</tbody>
I am trying to calculate the Median & 75th Percentile for the range in array where the range differs in the length. For example, my data looks like the one given below (my data-set is almost 100,000 rows). Now I am trying to find the median and 75th percentile values of a combined set of 3 batches where every next batch will drop the first member and and the next member (Set 1 - Batch no. 1, 2,3 & Set 2 - Batch no. 2, 3, 4 etc.). I have provided the result in the table no. 2.
As one can see from the data-set the length of range (no. of data points for each batch) is varying.
Any help will be appreciated.
Table 1: Data-set
Batch # | Value |
1 | 1 |
1 | 12 |
1 | 10 |
1 | 5 |
2 | 3 |
2 | 23 |
2 | 6 |
3 | 2 |
3 | 5 |
4 | 78 |
4 | 2 |
4 | 3 |
4 | 1 |
4 | 5 |
5 | 4 |
5 | 9 |
6 | 1 |
6 | 3 |
6 | 11 |
7 | 15 |
<tbody>
</tbody>
Table 2: Result
Set (Batch no.) | Median | 75th Percentile |
1-3 | 5 | 11 |
2-4 | 4 | 10.25 |
3-5 | 4 | 7 |
4-6 | 3.5 | 9.5 |
5-7 | 6.5 | 12 |
<tbody>
</tbody>