- Practice
- About 17 min
- 5 practice questions
Median of raw, ungrouped and grouped data
Find the median of raw data with an odd or even number of values, of an ungrouped frequency distribution using cumulative frequency, and of grouped data using the median formula.
If something looks wrong, please tell us.
The mean can be misleading when one value is extreme. Suppose four people earn ₹9000, ₹10 000, ₹11 000 and ₹12 000 a month (made-up figures); their mean income is ₹10 500. Add a fifth person earning ₹48 000, and the mean jumps to 90 000 ÷ 5 = ₹18 000, more than four of the five people earn. The median of the five is ₹11 000, which describes the group far better. The median is not pulled by such extreme values.
Median of raw data
The median is the value in the middle position when the data are arranged in ascending or descending order. It is a positional average. For n values in order:
- If n is odd, the median is the ((n + 1)/2)th value.
- If n is even, the median is the mean of the (n/2)th and (n/2 + 1)th values.
Worked example 1: odd number of values
Find the median of 23, 17, 31, 12, 26, 19, 28, 15, 21. Working: in order: 12, 15, 17, 19, 21, 23, 26, 28, 31. n = 9 is odd, so the median is the (9 + 1)/2 = 5th value = 21. Four values lie on each side of it.
Worked example 2: even number of values
Find the median of 45, 32, 51, 38, 60, 41, 36, 55. Working: in order: 32, 36, 38, 41, 45, 51, 55, 60. n = 8 is even, so the median is the mean of the 4th and 5th values = (41 + 45)/2 = 43.
Median of an ungrouped frequency distribution
Arrange the values in order and add a cumulative frequency (cf) column: each cf is the running total of the frequencies so far. If the total frequency N is odd, find the ((N + 1)/2)th value; if even, average the (N/2)th and (N/2 + 1)th values. The first cf that reaches that position tells you the value.
| Shoe size | f | cf |
|---|---|---|
| 5 | 4 | 4 |
| 6 | 9 | 13 |
| 7 | 13 | 26 |
| 8 | 10 | 36 |
| 9 | 6 | 42 |
| 10 | 3 | 45 |
Worked example 3: N = 45 is odd, so the median is the 23rd value. The cf passes 23 at size 7 (13 students have size 6 or less, 26 have size 7 or less). So the median shoe size is 7.
Median of grouped data
Find N/2. The class whose cumulative frequency first reaches N/2 is the median class. Then use the formula:
Median = l + ((N/2 − m) / f) × c, where l = lower limit of the median class, f = its frequency, m = cumulative frequency of the class before it, c = class width, N = Σf
Worked example 4
| Class | f | cf |
|---|---|---|
| 0-10 | 5 | 5 |
| 10-20 | 8 | 13 |
| 20-30 | 15 | 28 |
| 30-40 | 12 | 40 |
| 40-50 | 10 | 50 |
N/2 = 25. The cf first reaches 25 in the class 20-30, so that is the median class: l = 20, m = 13, f = 15, c = 10. Median = 20 + ((25 − 13)/15) × 10 = 20 + (12/15) × 10 = 20 + 8 = 28.
Median of grouped data
- Cumulative frequencies Running totals; the last one is N.
- Find N/2 Half the total frequency.
- Median class First class whose cf reaches N/2.
- Read l, m, f, c m is the cf of the class BEFORE the median class.
- Use the formula Median = l + ((N/2 − m)/f) × c.
Worked example 5: a missing frequency
Classes 0-10, 10-20, 20-30, 30-40, 40-50 have frequencies 8, 12, x, 10, 6, and the median is 24. Find x. Working: N = 36 + x and the median 24 lies in 20-30, so l = 20, m = 8 + 12 = 20, f = x, c = 10. Then 24 = 20 + (((36 + x)/2 − 20)/x) × 10. So 4 = 10 × ((x − 4)/2)/x = 5(x − 4)/x, giving 4x = 5x − 20 and x = 20. Check: N = 56, N/2 = 28, and the cf goes 8, 20, 40, so 20-30 is the median class; median = 20 + (8/20) × 10 = 24.
Key takeaways: arrange data in order first; odd n: the ((n + 1)/2)th value, even n: the mean of the two middle values; use cumulative frequency to locate the median in a frequency table; for grouped data, Median = l + ((N/2 − m)/f) × c; the median is a good average when there are extreme values.
Check your understanding
-
1. What is the median of 34, 29, 41, 25, 38, 30, 45?
- 38
- 34
- 30
- 41
Show answer
Answer: B. In order: 25, 29, 30, 34, 38, 41, 45. There are 7 values, so the median is the (7 + 1)/2 = 4th value, 34.
-
2. What is the median of 14, 9, 21, 17, 12, 20, 11, 18?
- 14
- 17
- 15.5
- 15
Show answer
Answer: C. In order: 9, 11, 12, 14, 17, 18, 20, 21. n = 8, so average the 4th and 5th values: (14 + 17)/2 = 15.5.
-
3. In a frequency table with N = 37, which value is the median?
- The 19th value
- The 18th value
- The 18.5th value
- The 37th value
Show answer
Answer: A. N is odd, so the median is the ((37 + 1)/2)th = 19th value, with 18 values on either side.
-
4. Classes 10-20, 20-30, 30-40, 40-50 have frequencies 4, 10, 16, 10. What is the median?
- 35
- 30
- 32.5
- 33.75
Show answer
Answer: D. N = 40, N/2 = 20. cf: 4, 14, 30, 40, so the median class is 30-40 with l = 30, m = 14, f = 16, c = 10. Median = 30 + (6/16) × 10 = 30 + 3.75 = 33.75.
-
5. In the median formula l + ((N/2 − m)/f) × c, what is m?
- The frequency of the median class
- The mid-value of the median class
- The cumulative frequency of the class before the median class
- The number of classes
Show answer
Answer: C. m is the cumulative frequency of the class just before the median class: the number of values already counted before the median class starts.
Sign in to keep track of the lessons you finish.