Mean, median, mode and spread, step by step
How to find the mean (average)
All the examples on this page use one data set: the points a basketball player scored in eight games.
The mean is the "fair share" value: what each game would be worth if the points were spread out evenly.
- Add every value: 12 + 8 + 16 + 6 + 12 + 18 + 10 + 14 = 96.
- Count the values: there are 8.
- Divide the total by the count: 96 ÷ 8 = 12. The mean is 12 points per game.
| Game | Points |
|---|---|
| 1 | 12 |
| 2 | 8 |
| 3 | 16 |
| 4 | 6 |
| 5 | 12 |
| 6 | 18 |
| 7 | 10 |
| 8 | 14 |
How to find the median
The median is the middle value once the data is in order, so half the values sit below it and half above.
- Put the values in order: 6, 8, 10, 12, 12, 14, 16, 18.
- With an odd count, the median is the single middle value.
- With an even count, like these eight games, average the two middle values: (12 + 12) ÷ 2 = 12.
How to find the mode
The mode is the value that appears most often. Here 12 appears twice and every other value once, so the mode is 12.
A data set can have more than one mode (two values tied for most often) or no mode at all (no value repeats). The mode is also the only measure of center that works for categories, like the most popular lunch choice.
How to find the range
The range is the simplest measure of spread: the largest value minus the smallest. For these games it is 18 − 6 = 12 points.
Because it uses only the two most extreme values, one unusual game can change the range a lot. The measures below use every value.
Mean absolute deviation (MAD)
The mean absolute deviation is the average distance from the mean. It answers, "How far is a typical game from 12 points?"
- Find the mean: 12.
- Find each value’s distance from the mean, ignoring the sign. A 6 is 6 away; an 18 is also 6 away.
- Add the distances: 0 + 4 + 4 + 6 + 0 + 6 + 2 + 2 = 24.
- Divide by the count: 24 ÷ 8 = 3. A typical game is about 3 points from the mean.
| Points | Distance | Distance² |
|---|---|---|
| 12 | 0 | 0 |
| 8 | 4 | 16 |
| 16 | 4 | 16 |
| 6 | 6 | 36 |
| 12 | 0 | 0 |
| 18 | 6 | 36 |
| 10 | 2 | 4 |
| 14 | 2 | 4 |
| Total | 24 | 112 |
How to find the standard deviation
Standard deviation also measures the typical distance from the mean, but it squares the distances first, so values far from the mean count extra. You will meet it in high school statistics.
- Square each distance from the mean (the last column of the table above) and add them: 112.
- For a population (every value you care about), divide by the count: 112 ÷ 8 = 14. This is the variance.
- Take the square root: √14 ≈ 3.74. That is the population standard deviation, σ.
- For a sample (some values standing in for a bigger group), divide by one less than the count instead: 112 ÷ 7 = 16, and √16 = 4. That is the sample standard deviation, s.
Quartiles and the interquartile range (IQR)
Quartiles split ordered data into four equal parts. Q1 is the median of the lower half and Q3 is the median of the upper half; the interquartile range is Q3 − Q1, the spread of the middle half.
For 6, 8, 10, 12 | 12, 14, 16, 18, the lower half has median Q1 = 9 and the upper half has median Q3 = 15, so the IQR is 15 − 9 = 6. Textbooks use slightly different rules for odd-sized sets; the Statistics Lab leaves the median out of both halves.
Mean or median? What an outlier does
Suppose the player has one huge night and scores 40. The nine games now add to 136, so the mean jumps from 12 to about 15.1. The median only moves to the fifth of nine ordered values, which is still 12.
That is the rule of thumb: when a data set has outliers or is lopsided, the median describes a typical value better than the mean. When the data is roughly balanced, the mean and median are close and either works.