Median and its stability
If five friends report their pocket money , , what's the "typical" amount? The mean comes out to , which feels misleading. Almost everyone has under . The median, by contrast, gives . That single rich friend doesn't drag it.
Concept
The median is the middle value of a list of numbers after sorting them from smallest to largest. It splits the data into two halves with equal count.
Finding the median.
- Sort the data.
- If the count is odd, the median is the value at position .
- If the count is even, the median is the average of the two middle values at positions and .
Example (odd ). Sort: . Middle (3rd) is .
Example (even ). Sort: . Middle two are and . Median .
Mean vs median , when do they differ?
- For a symmetric, evenly spread dataset, they are nearly equal.
- For data with one or more extreme values (outliers), the mean is pulled towards the outlier while the median stays put.
- That makes the median the safer "typical" measure for skewed data like incomes, house prices, or test scores with a few very-low or very-high marks.
Stability of the median. Adding values has a surprisingly mild effect on the median.
- Adding a value equal to the median doesn't change the median (it just adds another copy to the middle).
- Adding a value larger than the current median can push the median up by at most one position.
- Adding a value smaller than the current median can push it down by at most one position.
- Removing a value works similarly , only the position of the middle shifts, not the values themselves much.
A useful fact. If the median of a list is , then adding a value larger than and a value smaller than together leaves the median unchanged in most cases , the new pair lands one on each side, and the middle stays where it was.
Worked examples
Example 1. Median of .
- Sort: .
- (odd). Middle position . Median .
Example 2. Median of .
- Already sorted; (even). Middle two are at positions : values and . Median .
Example 3. Compare the mean and median of .
- Mean . Median .
- The median better represents the "typical" value here; the mean is yanked up by the outlier .
Example 4. Consider data . For which values of is the median equal to ?
- Without , the sorted ten values are .
- With , count becomes (odd) , the median is the th value.
- If , the th value is . If , the th value is . If , the th is .
- So the median is when . That covers but not or .
Try it yourself
- Median of .
- Median of .
- The mean of numbers is . Their median is . Are the numbers symmetric? Why or why not?
- From the list remove . New median?
- To , what value should you add so the median becomes ?
- True/false: "Including a value less than the median always decreases the median." Justify.
- The median of a class's marks is . A topper scoring joins. Does the median move much? Does the mean?
- Find the median of the first natural numbers.
Activity
Median sticker line. Get classmates to each write any positive number on a small sticker. Stand in a line ordered by the number. The person in the middle is the median holder. Now invite a th person. The median is now the average of the two people in the centre. Try adding a person with a huge number (): notice the median person barely changes, but if you computed the mean, it would jump dramatically.