- Practice
- About 16 min
- 5 practice questions
The median for ungrouped and grouped data
Define the median, find it for ungrouped data with an odd or even number of items, and calculate it for grouped data using cumulative frequency and the median formula.
If something looks wrong, please tell us.
By the end of this lesson you can
- Define the median and explain how it divides a series.
- Find the median of ungrouped data with an odd or an even number of items.
- Use cumulative frequency and the formula to find the median of grouped data.
In a village where most families earn modest incomes but one landlord earns a fortune, the mean income is pulled up by that one figure. The median, the middle value, is not; that is why it is often a fairer average for skewed data such as incomes or rainfall.
What the median is
The median is the middle value of a series arranged in ascending or descending order. It divides the series into two equal parts: as many values lie below it as above it.
Median M = value of the ((N + 1) ÷ 2)th item of the arranged series. If this falls between two items, take the mean of those two items.
Worked example 1: odd number of items
Made-up depths of seven wells (m): 14, 9, 22, 11, 17, 8, 19. Step 1, arrange: 8, 9, 11, 14, 17, 19, 22. Step 2, (N + 1) ÷ 2 = (7 + 1) ÷ 2 = 4th item. Step 3, the 4th item is 14. Answer: median = 14 m. Check: three values lie below 14 and three above.
Worked example 2: even number of items
Using the made-up monthly rainfall of the last lesson (mm): arranged, 8, 12, 15, 30, 48, 62, 70, 95, 96, 140, 180, 210. (N + 1) ÷ 2 = 13 ÷ 2 = 6.5th item, so take the mean of the 6th and 7th items: (62 + 70) ÷ 2 = 66 mm. Answer: median = 66 mm. Compare: the mean was 80.5 mm. The few very wet months of the north-east monsoon pull the mean up, while the median shows that half the months get 66 mm or less.
Median of grouped data
For a frequency distribution we first add a column of cumulative frequency (cf), the running total of frequencies. The median class is the class in which the (N ÷ 2)th item falls, that is, the first class whose cumulative frequency reaches N ÷ 2. Then:
Median = l + ((N ÷ 2 - m) ÷ f) × c, where l = lower limit of the median class, N = total frequency, m = cumulative frequency of the class before the median class, f = frequency of the median class, c = class interval.
Worked example 3: heights of saplings (made-up data)
| Height (cm) | f | cf |
|---|---|---|
| 0-10 | 4 | 4 |
| 10-20 | 8 | 12 |
| 20-30 | 14 | 26 |
| 30-40 | 10 | 36 |
| 40-50 | 4 | 40 |
Step 1, N = 40, so N ÷ 2 = 20. Step 2, the cumulative frequency first reaches 20 in the class 20-30 (cf 26), so this is the median class. Step 3, l = 20, m = 12 (cf of 10-20), f = 14, c = 10. Step 4, median = 20 + ((20 - 12) ÷ 14) × 10 = 20 + (8 ÷ 14) × 10 = 20 + 5.71 = 25.71 cm. Answer: about 25.7 cm. Check: it lies inside the median class 20-30, as it must.
Steps for the median of grouped data
- Cumulative frequency Add a running total column.
- N ÷ 2 Find half the total frequency.
- Median class First class whose cf reaches N ÷ 2.
- Values Read l, m, f and c.
- Formula Median = l + ((N ÷ 2 - m) ÷ f) × c, and check it lies within the class.
Key takeaways: the median is the middle value of an arranged series and splits it into two equal halves. For ungrouped data it is the ((N + 1) ÷ 2)th item, or the mean of the two middle items when N is even. For grouped data, find the median class from the cumulative frequency at N ÷ 2 and use Median = l + ((N ÷ 2 - m) ÷ f) × c. The median is not pulled by extreme values as the mean is.
Check your understanding
-
1. Made-up data: 31, 27, 35, 29, 33. The median is:
- 29
- 33
- 31
- 35
Show answer
Answer: C. Arranged: 27, 29, 31, 33, 35. The (5 + 1) ÷ 2 = 3rd item is 31.
-
2. Made-up data: 12, 18, 20, 26, 30, 40. The median is:
- 23
- 20
- 26
- 24.3
Show answer
Answer: A. N = 6, so the median is the 3.5th item: the mean of the 3rd and 4th items = (20 + 26) ÷ 2 = 23. 24.3 is the mean, not the median.
-
3. In a grouped distribution with N = 60, the median class is the first class whose cumulative frequency reaches:
- 60
- 61
- 15
- 30
Show answer
Answer: D. The median is the (N ÷ 2)th item, 60 ÷ 2 = 30, so the median class is the first whose cumulative frequency is 30 or more.
-
4. Made-up data: l = 40, N = 50, m = 18, f = 14, c = 10. The median is:
- 45
- 40.7
- 47
- 42.5
Show answer
Answer: A. Median = 40 + ((25 - 18) ÷ 14) × 10 = 40 + (7 ÷ 14) × 10 = 40 + 5 = 45.
-
5. Why is the median often preferred to the mean for data such as village incomes?
- Because it is always larger
- Because it is not pulled up or down by a few extreme values
- Because it uses every value in the sum
- Because it needs no arranging
Show answer
Answer: B. The median depends only on the middle position, so a few very large or very small values do not distort it, unlike the mean.
Sign in to keep track of the lessons you finish.