Imagine you are choosing a player for the last spot on a basketball team. One player scored these points in 11 games (invented data): 12, 15, 9, 18, 15, 22, 14, 11, 15, 20, 38. Is this a 17-point player? A 15-point player? How consistent are they? A list of numbers is hard to judge at a glance, so we summarize it with two kinds of numbers. A measure of centre answers "what is a typical value?" A measure of spread answers "how far apart are the values?" You need both: two players can have the same typical score while one is steady and the other is all over the place. This kind of data, one number per game, is called one-variable data because only one quantity (points) is measured for each game.
Measures of centre: mean, median, mode
The mean is the "fair share" value: add all the values and divide by how many there are. The median is the middle value once the data is sorted from least to greatest; if there is an even number of values, it is the mean of the two middle values. The mode is the value that occurs most often; a data set can have one mode, several modes, or no mode if no value repeats. For the player's points, the sorted list is 9, 11, 12, 14, 15, 15, 15, 18, 20, 22, 38. There are values, so the median is the 6th value, . The value 15 appears three times, more than any other, so the mode is also .
Why is the mean (about 17.2) bigger than the median (15)? Because of the single 38-point game. The mean uses the size of every value, so one very large value pulls it up. The median only cares about position, so it barely notices. If you drop the 38 and recalculate, the mean becomes while the median stays . That is why the median is usually the better "typical value" when a data set has an extreme value, and why news reports about house prices and incomes often give the median.
| Measure | How to find it | Points data | Best used when |
|---|---|---|---|
| Mean | Add all values, divide by n | 189 ÷ 11 ≈ 17.2 | Data has no extreme values |
| Median | Middle of the sorted list (mean of the two middle values if n is even) | 15 | Data has extreme values or is lopsided |
| Mode | Most frequent value | 15 | Data is categories (favourite colour) or you want the most common value |
Measures of spread: range, quartiles and IQR
The range is the greatest value minus the least value: points. It is quick, but it depends only on the two most extreme values, so one unusual game changes it a lot. A sturdier measure uses quartiles, three values that split the sorted data into four parts with roughly a quarter of the data in each. The second quartile is the median. The first quartile is the median of the lower half, and the third quartile is the median of the upper half. The interquartile range is , the spread of the middle half of the data.
Outliers and box plots
An outlier is a value far away from the rest of the data. To decide in a consistent way, this course uses the 1.5 × IQR rule: build two fences, and any value outside them is an outlier. The lower fence is and the upper fence is . For the points data, , so the fences are and . The 38-point game is above 32, so it is an outlier; every other game is inside the fences. An outlier is not automatically a mistake: it might be a typing error, or it might be a real and important game. Check before you delete anything. A box plot (box-and-whisker plot) draws the summary on a number line. The box runs from to with a line at the median, so the box holds the middle half of the data. The whiskers run out to the least and greatest values that are not outliers, and each outlier is drawn as a separate dot. A box plot built from the five values minimum, , median, , maximum is the five-number summary made visible.
- Use every value
- Pulled strongly by outliers
- Good for balanced data with no extreme values
- Use positions in the sorted list
- Change little when an outlier is added
- Good for lopsided data or data with outliers