In a village where almost everyone earns a modest wage but one family is very rich, the mean income is a misleading figure. The median and the mode describe the typical value in a way that is not changed by one extreme case.
Median
The median is the middle value of the data when they are arranged in order. For n values, it is the value at position (n + 1) / 2 when n is odd. When n is even, it is the mean of the two middle values. For the 20 marks the 10th and 11th values are 27 and 28, so the median is 27.5. For grouped data the median is L + ((N / 2 - cf) / f) × h. Here L is the lower limit of the median class, N the total frequency, cf the cumulative frequency before the median class, f its frequency and h its width.
Definition: Median. The middle value of a set of observations arranged in order of size, which divides the data into two equal parts.
Mode
The mode is the value that occurs most often. In the 20 marks the value 25 occurs three times, so the mode is 25. A set may have two modes, when it is called bimodal. For grouped data the mode is L + ((f1 - f0) / (2 × f1 - f0 - f2)) × h, where L is the lower limit of the modal class, f1 its frequency and f0 and f2 the frequencies of the classes before and after it.
Relation Between Mean, Median and Mode
For a moderately skewed distribution the empirical relation Mode = 3 × Median - 2 × Mean holds approximately. In a symmetrical distribution the three averages coincide.
Table 1.5: Comparison of the three averages
| Property | Mean | Median | Mode |
|---|---|---|---|
| Uses all values | Yes | No | No |
| Affected by extreme values | Yes | No | No |
| Used for qualitative data | No | Only ordinal | Yes |
| Always unique | Yes | Yes | No |
Example 1.5: Median and mode of grouped data
Problem: Find the median and the mode of the grouped marks distribution (frequencies 3, 8, 6, 3 in the classes 10 to 20, 20 to 30, 30 to 40 and 40 to 50).
Solution:
- N / 2 = 10. The cumulative frequencies are 3, 11, 17 and 20, so the median class is 20 to 30, with L = 20, cf = 3, f = 8 and h = 10.
- Median = 20 + ((10 - 3) / 8) × 10 = 20 + 8.75 = 28.75.
- The modal class is 20 to 30, with f1 = 8, f0 = 3 and f2 = 6.
- Mode = 20 + ((8 - 3) / (16 - 3 - 6)) × 10 = 20 + 50 / 7 = 27.14.
Result: The median is 28.75 and the mode is about 27.14.
L, h, N, cf, f = 20, 10, 20, 3, 8
print(L + (N / 2 - cf) / f * h)
f1, f0, f2 = 8, 3, 6
print(round(L + (f1 - f0) / (2 * f1 - f0 - f2) * h, 2))
Output
28.75
27.14
Common mistakes
- Finding the median without arranging the data in order.
- Using the cumulative frequency of the median class itself as cf. It must be the one before the class.
- Believing that a distribution has only one mode.
Key takeaways
- The median is the middle value of ordered data.
- The mode is the most frequent value; there may be more than one.
- The median and mode are not affected by extreme values.
- Mode is approximately 3 x median - 2 x mean for moderately skewed data.
Practice questions
- Find the median of 3, 9, 5, 7 and 1.
- What is the mode of 2, 3, 3, 4, 3, 5, 2?
- Name a measure of central tendency not affected by extreme values.
Answers to the practice questions
- In order: 1, 3, 5, 7, 9. The middle value is 5.
- 3, since it occurs three times.
- The median (or the mode).
Sources
- Official BCA syllabus Probability and Statistics, course code 26BCA403DS01, Unit I
