Median and Mode
The mean is just one way to summarise data. Two others , the median and the mode , are equally important. The median tells you the middle value; the mode tells you the most common value. Each has its strengths: the median is robust against outliers, and the mode captures "typicality" even when the mean is misleading.
Definitions
The median of a data set is the middle value when the data is arranged in order (ascending or descending).
- If the number of observations is odd, the median is the value at position .
- If is even, the median is the average of the values at positions and .
The mode of a data set is the value (or values) that occurs most frequently.
- A data set can have one mode (unimodal), two modes (bimodal), or no mode (if all values occur equally often).
Computing the median
Step 1. Arrange the data in ascending order.
Step 2. Count the number of observations .
Step 3. If is odd, the median is at position . If is even, average the two middle values.
Example. Data: . (odd). Median at position : value .
Example. Data: . (even). Middle values at positions and : and . Median: .
Computing the mode
Inspect the data for the most frequent value.
Example. Data: . The value appears three times; all others appear once. Mode: .
Example. Data: . Mode: (only value that appears twice).
Example. Data: . No value repeats. No mode, or every value is its own mode , depending on convention.
For grouped data, the modal class is the class with the highest frequency. The mode itself can be estimated by a formula: where is the lower limit of the modal class, are the frequencies of the previous, modal, and next classes, and is the class width. (This formula appears in Class X; for Class IX, identifying the modal class is enough.)
Comparing mean, median, mode
| Measure | Affected by outliers? | Best for what kind of data? |
|---|---|---|
| Mean | Yes, very | Numerical data with no extreme outliers |
| Median | No | Numerical data with outliers (e.g. income) |
| Mode | No | Categorical or discrete data (most common option) |
When all three coincide , the data is symmetric and unimodal.
When they differ , the direction of difference tells you about skewness:
- Mean median mode: data is skewed right (tail on the right).
- Mean median mode: data is skewed left (tail on the left).
Worked examples
Example 1. Find the median of .
Already sorted. . Median is the th value: .
Example 2. Find the median of .
. Middle values: and . Median: .
Example 3. Find the mode of .
appears times, more than any other value. Mode: .
Example 4. Find the median and mode of: .
Sorted. . Middle values: th and th, namely and . Median: . Mode: .
Example 5. In a class of 20 students, marks: (4 students), (8), (5), (3). Find the mean, median, and mode.
Mean: .
Median: (even). Sort: 4 zeros, 8 fives, 5 tens, 3 fifteens. Positions and . Position is a (4 zeros + 6 of the 8 fives = position 10), and position is also . So median is .
Mode: most frequent value is (8 times).
Try it yourself
- Median of .
- Median of .
- Mode of .
- Median and mode of .
- Why might the median be preferred over the mean for incomes?
- Find the median of .
- Find the mean, median, and mode of .
- State which of mean, median, mode is unaffected by extreme values.
- In the data , find all three measures.
- A class has 20 students. Marks: (4), (6), (8), (2). Find the median.
Pitfalls / Insight
- Sort first. Median calculation requires ordered data.
- Even : average the two middle values.
- No mode is possible. If all values are distinct, some textbooks say "no mode"; others say "every value is a mode". Be consistent.
Insight. The three measures , mean, median, mode , give three perspectives on "typical". When they agree, the data is well-behaved. When they disagree, the disagreement itself tells you something important about the shape of the distribution.