Glossary

Median

Also written: middle value

Definition

The median is the middle value once the data is in order. With an even count it is the mean of the two middle values. Because it depends on position rather than size, an outlier barely moves it.

Finding it

Sort first. The median of 9,2,59, 2, 5 is 55, and reading the middle of the unsorted list would give 22.

With an odd count there is one middle value:

3,  5,  8,  9,  12    83, \; 5, \; \mathbf{8}, \; 9, \; 12 \;\Rightarrow\; 8

With an even count, take the mean of the two middle values:

3,  5,  8,  9,  12,  15    8+92=8.53, \; 5, \; \mathbf{8}, \; \mathbf{9}, \; 12, \; 15 \;\Rightarrow\; \frac{8 + 9}{2} = 8.5

Why it resists outliers

The median cares only about position. A value ten times too large counts exactly as much as one slightly too large — both are simply “above the middle”.

DataMeanMedian
5,6,7,8,95, 6, 7, 8, 97777
5,6,7,8,945, 6, 7, 8, 94242477

Replacing 99 with 9494 more than triples the mean and leaves the median where it was. That stability is why house prices, salaries and household incomes are reported as medians — a few very large values are normal in that data.

Where else it appears

The median is the middle line of a box plot, and it splits the data in half to produce the quartiles: Q1Q_1 is the median of the lower half and Q3Q_3 the median of the upper half.

Pair the median with the interquartile range when reporting spread. Both ignore the tails, so they describe the data consistently.

Lessons that use this term

Related terms