Ok, assume we had the data above.
0<x<5 - 10
5<x<10 - 15
10<x<15 - 22
15<x<20 - 13
The total number of samples is 60. Thus the median value is at 30.
If you take the cumulative frequencies:
0<x<5 = 10
0<x<10 = 25
0<x<15=47
0<x<20 = 60
Since the median is 30, it must lie between 25 and 47.
Let x be the measured value (height, etc) and y be the cumulative frequency.
Look at this diagram of cumulative frequency.
As you can see, at the value of x=10, the CF is 25. and at the value of x=15, CF is 47.
Between the value of 25 and 47 is the median, 30. You see the black line drawn from the value of 30 (going horizontal). This meets the diagonal line drawn from the lowest value (x=10 y=25) to the highest value (x=15 y=47). You are interpolating this part of the bar as if it is a straight line between x=10 and x=15.
So you can find an equation of this diagonal line.
y−y1=m(x−x1)y−25=m(x−10)And find m:
m=changeinxchangeiny=15−1047−25=522So,
y−25=522(x−10)Then sub in the value y=30 and find x. (Obviously x is somewhere between 10 and 15)