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
[TABLE="class: outer_border, width: 200"]
<tbody>[TR]
[TD]Batch #[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]78[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]9[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]15[/TD]
[/TR]
</tbody>[/TABLE]
Table 2: Result
[TABLE="class: outer_border, width: 200"]
<tbody>[TR]
[TD]Set (Batch no.)[/TD]
[TD]Median[/TD]
[TD]75th Percentile[/TD]
[/TR]
[TR]
[TD]1-3[/TD]
[TD]5[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]2-4[/TD]
[TD]4[/TD]
[TD]10.25[/TD]
[/TR]
[TR]
[TD]3-5[/TD]
[TD]4[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]4-6[/TD]
[TD]3.5[/TD]
[TD]9.5[/TD]
[/TR]
[TR]
[TD]5-7[/TD]
[TD]6.5[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="class: outer_border, width: 200"]
<tbody>[TR]
[TD]Batch #[/TD]
[TD]Value[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]12[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]23[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]78[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[/TR]
[TR]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