Median of grouped data
Make a cumulative frequency column and find the median class, where n/2 falls. Then Median = l + ((n/2 − cf) ÷ f) × h.
Pathway: median of grouped data
- 1Add the frequencies to get n. Work out n/2.
- 2Make a cumulative frequency (cf) column: keep a running total.
- 3Find the median class: the first class whose cf is more than n/2.
- 4Note l, h and f of the median class, and the cf of the class before it.
- 5Median = l + ((n/2 − cf) ÷ f) × h.
- 6Check that the median lies inside the median class.
Worked example 1: weights of students
The weights (in kg) of 50 students are: 30-35: 4, 35-40: 10, 40-45: 18, 45-50: 12, 50-55: 6. Find the median weight.
- n = 50, so n/2 = 25.
- Cumulative frequencies: 4, 14, 32, 44, 50.
- The first cf more than 25 is 32, so the median class is 40-45.
- l = 40, h = 5, f = 18, cf of the class before = 14.
- Formula: Median = l + ((n/2 − cf) ÷ f) × h.
- Median = 40 + ((25 − 14) ÷ 18) × 5 = 40 + 55 ÷ 18 = 40 + 3.06 = 43.06.
Median weight ≈ 43.06 kg.
Cumulative frequency table for example 1
| Weight (kg) | Frequency f | Cumulative frequency cf |
|---|---|---|
| 30-35 | 4 | 4 |
| 35-40 | 10 | 4 + 10 = 14 |
| 40-45 (median class) | 18 | 14 + 18 = 32 |
| 45-50 | 12 | 32 + 12 = 44 |
| 50-55 | 6 | 44 + 6 = 50 |
Worked example 2: two missing frequencies
The median of this distribution of 40 values is 25. Find x and y. Classes: 0-10: 4, 10-20: x, 20-30: 12, 30-40: y, 40-50: 6.
- Total: 4 + x + 12 + y + 6 = 40, so x + y = 18.
- The median 25 lies in 20-30, so that is the median class.
- n/2 = 20, l = 20, h = 10, f = 12, cf = 4 + x.
- Formula: Median = l + ((n/2 − cf) ÷ f) × h, so 25 = 20 + ((20 − 4 − x) ÷ 12) × 10.
- 5 = (16 − x) × 10 ÷ 12, so 60 = 160 − 10x, giving x = 10.
- y = 18 − 10 = 8.
- Check: cf = 4, 14, 26, 34, 40; median = 20 + ((20 − 14) ÷ 12) × 10 = 25.
x = 10, y = 8.
Points examiners look for
- cf in the formula is the cumulative frequency of the class before the median class.
- f is the frequency of the median class itself.
- If classes are like 10-19, 20-29, first make them continuous: 9.5-19.5, 19.5-29.5. With a gap of 1, take 0.5 off each lower limit and add 0.5 to each upper limit.
- Always show the cf column. It carries marks.
Survey reports often give the median age in a district, the age of the middle person. A few very old people do not pull the median up, but they would pull the mean.
2 marks: “For a grouped table, n = 60. How do you decide the median class?” n/2 = 30. The median class is the first class whose cumulative frequency is more than 30.
3 marks: “Find the median of: 0-10: 5, 10-20: 9, 20-30: 14, 30-40: 8, 40-50: 4.” n = 40, so n/2 = 20. cf: 5, 14, 28, 36, 40, so the median class is 20-30. Median = 20 + ((20 − 14) ÷ 14) × 10 = 20 + 4.29 = 24.29.
5 marks: “The median of the distribution below is 35 and the total frequency is 50. Find a and b. Classes: 0-10: 3, 10-20: a, 20-30: 10, 30-40: 12, 40-50: b, 50-60: 5.” a + b = 20. Median class 30-40: l = 30, f = 12, cf = 13 + a, h = 10. 35 = 30 + ((25 − 13 − a) ÷ 12) × 10 gives a = 6, so b = 14. Check: cf 3, 9, 19, 31, 45, 50; median = 30 + (6 ÷ 12) × 10 = 35.
Half, ladder, lock: find n/2, climb the cf column, and lock the first class that passes it.