01 · Find the class
In the model, locate the class used for the median estimate.
Hint
n/2 = 10; locate that cumulative count.
Worked solution
Ten lies between 4 and 12, so use [10,20). Here L = 10, C = 4, f = 8, w = 10.
Understand · explore · practise
Estimate medians, quartiles and percentiles using cumulative frequency and class boundaries. Explore a manual graph and practise the interpolation formula with worked solutions.
Before you startGrouped data, cumulative frequency and percentile positions.
01 / Estimate a position inside a class
Estimated value = L + ((r − C)/f) × w
L: lower boundary; C: cumulative frequency before the class; f: class frequency; w: class width; r: target cumulative rank.
For percentile p, use r = pn/100. For the median use n/2, and for quartiles n/4 and 3n/4. Keep fractional ranks when interpolating grouped data.
Intervals [0,10), [10,20), [20,40) have frequencies 4, 8, 8. Total n = 20.
Rank = 15; class [20,40); fraction = (15 − 12)/8 = 0.375.
Estimate = 20 + 0.375×20 = 27.5.
Straight segments assume observations are spread uniformly within each class. This is an estimate, not recovered raw data.
02 / Locate the target class
The target class is the class whose cumulative-frequency interval contains r. For the model, the cumulative counts at upper boundaries 10, 20 and 40 are 4, 12 and 20. A target of 15 lies in the last class.
In the model, locate the class used for the median estimate.
n/2 = 10; locate that cumulative count.
Ten lies between 4 and 12, so use [10,20). Here L = 10, C = 4, f = 8, w = 10.
A grouped dataset contains 30 observations. What target rank estimates Q₁?
Use n/4 without rounding.
r = 30/4 = 7.5. Do not round it up to eight: that listed-data rank rule is not this interpolation method.
03 / Interpolate within the median class
r = 20/2 = 10; class [10,20)
Cumulative counts are 4, 12, 20.
(r − C)/f = (10 − 4)/8 = 3/4
The target is three quarters of the way through the class frequency.
Median ≈ 10 + (3/4)×10 = 17.5
Move the same fraction of the class width.
Classes [0,5), [5,15), [15,20) have frequencies 4, 12, 4. Estimate the median.
Use r = 10, C = 4 and width 10.
Median ≈ 5 + (10 − 4)/12 × 10 = 10.
Why is 10 + (10/8)×10 wrong for the model median?
Ten is a cumulative target, not a count within the median class.
Four observations occur before the class. Subtract that cumulative count: use (10 − 4)/8. The wrong fraction exceeds one and incorrectly puts the estimate beyond the class.
04 / Estimate both quarter positions
Pause, replay or seek freely. The notes explain the same idea and stay in view.
Q₁ target = 5 → [10,20)
Q₁ ≈ 10 + (5 − 4)/8 × 10 = 11.25.
Q₃ target = 15 → [20,40)
Q₃ ≈ 20 + (15 − 12)/8 × 20 = 27.5.
Estimated IQR = 27.5 − 11.25 = 16.25
The two classes have different widths.
Classes [0,10), [10,30), [30,50) have frequencies 6, 10, 4. Estimate Q₃.
Target 15 lies in the second class.
Q₃ ≈ 10 + (15 − 6)/10 × 20 = 28.
In the model, estimate P₆₀.
The target rank is 12, exactly a cumulative-frequency boundary.
From [10,20): 10 + (12 − 4)/8 × 10 = 20. From [20,40): 20 + (12 − 12)/8 × 20 = 20. The adjacent segments agree.
05 / Use the true class boundaries
Measurements to the nearest unit have a class labelled 20–29. A percentile target is rank 18; cumulative frequency before this class is 10 and its frequency is 16. Estimate the percentile.
Use boundaries 19.5 and 29.5, width 10.
19.5 + (18 − 10)/16 × 10 = 24.5 units.
For completed ages 20–29 with the same target and frequencies, what changes?
Completed ages represent exact ages [20,30).
Use L = 20 and width 10. The estimate is 20 + 8/16 × 10 = 25 years.
06 / Move to other proportions
P₉₀ is a value in the variable’s units; 90 is the target percentage. Interpolation estimates a value. It does not say that the estimated value itself is 90%.
Find P₉₀ for the model table.
r = 18, in [20,40).
P₉₀ ≈ 20 + (18 − 12)/8 × 20 = 35.
Using the same straight-segment assumption, estimate the number below x = 15 in the model.
Halfway across [10,20) means halfway through its eight observations.
Estimated cumulative frequency = 4 + (15 − 10)/10 × 8 = 8. This is a model-based estimate; the grouped counts alone do not give the exact count below 15.
07 / Explain the approximation
The method assumes constant frequency density within the target class. Real observations may cluster near one boundary, so the true percentile can differ. Narrower grouping can preserve more information, but it does not by itself prove uniformity.
The target percentile falls in “40 or more”. Can you interpolate without further information?
The class width is missing.
No. A finite upper boundary or an explicit additional model is needed. If the target falls in an earlier bounded class, that earlier interpolation can still be possible when the total count is known.
Should you divide by a zero class frequency when interpolating?
No target strictly inside its cumulative interval exists: the cumulative count is flat.
No. A zero-frequency class contains no observations and cannot contain an interior cumulative target. At a flat boundary, the grouping may leave an interval of possible quantile locations; state the convention or limitation rather than divide by zero.
08 / Locate, subtract, scale and add
Section 1 of 8 · Estimate a position inside a class