# Median Calculation on Grouped Interval Data

I was studying for my Probability & Statistics exam. I've encountered with an example which is about finding the median of a given grouped data. Here is the table of the data;

So from the table, we are given that there are 51 children. So when we want to find median, we know that it will be in 26th position when we apply the formula as (n+1)/2 since 51 is an odd number. When we look the frequencies in the table, we can see that 26th children will be between 160 < h < 170 range. Here is the solution for finding the median which is given to me in the example;

What I didn't understand here is that how they calculated it in that way ? I understood the steps how they determined it should be between 160 < h < 170 range but I could not understand the following calculation 160 + (4/21)*10 = 162 . Can you please explain me, how this calculation works ? Thanks in advance.

• The $4$ comes from the fact that after you've disposed of the first $6,$ and then $16$ values, there are still $4$ left. So you start at the left-hand end of the interval, and estimate by computing $4/21$ of the way to the next interval boundary. – Adrian Keister Dec 17 '18 at 21:04
• Actually, I would like to see a formula to use in another questions – Ozan Yurtsever Dec 17 '18 at 21:05
• Maybe something like this: $$\text{Est}=\text{LH Endpoint}+\frac{(\text{Num Past LH Endpoint})\cdot(\text{Bin Width})}{\text{Num In Bin}}.$$ – Adrian Keister Dec 17 '18 at 21:34