The range
Eleven students write down how many minutes they spent reading one evening: 18, 2, 26, 14, 21, 9, 30, 15, 22, 17 and 19. The average says where the data is centered. A measure of spread says how far apart the values are.
The simplest measure of spread is the range: the largest value minus the smallest. Put the values in order first, because an unordered list hides its largest and smallest values: 2, 9, 14, 15, 17, 18, 19, 21, 22, 26, 30. The range is 30 − 2 = 28 minutes.
The reading times run from 2 minutes to 30 minutes, so the range is 30 − 2 = 28 minutes.
Quartiles cut the data into four parts
The median cuts the ordered data in half. With 11 values it is in position , so the median is the 6th value, 18. The 5 values below it form the lower half, and the 5 values above it form the upper half. The median itself belongs to neither half.
Now take the median of each half. The lower half is 2, 9, 14, 15, 17, and its middle value is 14. This is the lower quartile, written . The upper half is 19, 21, 22, 26, 30, and its middle value is 22. This is the upper quartile, written .
The lower quartile, the median and the upper quartile, 14, 18 and 22, cut the ordered data into four parts with the same number of values in each: 2 and 9 lie below 14, then 15 and 17, then 19 and 21, and 26 and 30 lie above 22. About a quarter of the data lies in each part, which is where the name quartile comes from.
With an even number of values, the data splits into two halves of equal size, and each quartile is the median of its half. For 3, 5, 6, 8, 9, 10, 12, 15 the lower half is 3, 5, 6, 8, so , and the upper half is 9, 10, 12, 15, so .
Five numbers summarize the reading times: the smallest value 2, the lower quartile 14, the median 18 (the unlabeled mark), the upper quartile 22 and the largest value 30.
The interquartile range
The interquartile range, or IQR, is the upper quartile minus the lower quartile: IQR minutes. About half of the values lie between the two quartiles, so the IQR is the width of the middle half of the data.
The range, 28 minutes, is the width of all the data, from the smallest value to the largest. The IQR, 8 minutes, leaves out the lowest quarter and the highest quarter and measures only the middle.
The arc spans the middle half of the data, from 14 to 22: the interquartile range is 22 − 14 = 8.
One extreme value
Suppose the student who read for 30 minutes had read for 90 minutes instead. A value that lies far outside the rest of the data like this is called an outlier.
The range becomes 90 − 2 = 88 minutes, more than three times what it was, although only one value changed. The range is built from the two most extreme values, so one outlier changes it completely.
The quartiles do not move. In order the data is now 2, 9, 14, 15, 17, 18, 19, 21, 22, 26, 90. The median is still the 6th value, 18. The upper half, 19, 21, 22, 26, 90, still has 22 in its middle. So is still 14, is still 22, and the IQR is still 8 minutes. The IQR ignores the top and bottom quarters of the data, which is where an outlier lies.
With 90 in place of 30, the largest value lies far to the right of all the others. The quartiles are still 14 and 22, so the middle half has not moved.
The range now runs from 2 to 90, which is 88 minutes. The interquartile range is still 22 − 14 = 8.
Deciding that a value is an outlier
“Far outside the rest” can be made exact with the IQR. A value is an outlier when it is more than 1.5 × IQR above the upper quartile, or more than 1.5 × IQR below the lower quartile.
Here 1.5 × IQR = 1.5 × 8 = 12. Above the upper quartile, the limit is 22 + 12 = 34 minutes, and 90 is past it, so 90 is an outlier. The original largest value, 30, was not past 34, so it was not an outlier. Below the lower quartile, the limit is 14 − 12 = 2 minutes. The smallest value is exactly 2, which is not more than 12 below the lower quartile, so it is not an outlier.
The limit is 22 + 1.5 × 8 = 34. The value 90 lies beyond it, so 90 is an outlier.
Comparing two data sets by their spread
Two data sets can have the same average and still be very different. When their means or medians are equal, the average cannot choose between them, and the spread decides. The set with the smaller interquartile range has its middle half packed more tightly, so its values are more consistent.
State the comparison in the words of the problem, with one average and one spread. For example: both groups of students read for a median of 18 minutes, but the first group’s reading times have an IQR of 8 minutes and the second group’s an IQR of 20 minutes, so the first group’s reading times are more consistent.
Worked example: Two Bus Routes with the Same Mean Journey Time, Compared by Their Spread
Question Two bus routes run from a town to the same station, and a commuter times the journey on nine days. Route A took 28, 29, 29, 30, 30, 30, 31, 31 and 32 minutes. Route B took 22, 25, 27, 29, 30, 31, 33, 35 and 38 minutes. (a) Show that the two routes have the same mean and the same median, and find the interquartile range of each. (b) The commuter must not be late for work. Which route should be taken, and why?
1.Both lists are already in order. Add each one: route A gives 28 + 29 + 29 + 30 + 30 + 30 + 31 + 31 + 32 = 270 and route B gives 22 + 25 + 27 + 29 + 30 + 31 + 33 + 35 + 38 = 270. With 9 days each, both means are 270 ÷ 9 = 30 minutes.
The nine journeys on each route, drawn on one scale in minutes. Route A is packed and route B is spread out. 2.With 9 times in order the median is the 5th. For route A that is 30 minutes and for route B it is 30 minutes, so the medians agree as well. Neither average separates the two routes.
Both routes total 270 minutes over 9 days, so both means are 270 ÷ 9 = 30 minutes. 3.The lower quartile is the median of the four times below the middle one. Route A: 29 + 292 = 29 minutes. Route B: 25 + 272 = 26 minutes.
With 9 times the median is the 5th, and that is 30 minutes on each route, so neither average separates them. 4.(a) The upper quartile is the median of the four times above the middle one. Route A: 31 + 312 = 31 minutes, so its interquartile range is 31 − 29 = 2 minutes. Route B: 33 + 352 = 34 minutes, so its interquartile range is 34 − 26 = 8 minutes.
(a) The middle half of route A covers 31 − 29 = 2 minutes and the middle half of route B covers 34 − 26 = 8 minutes. 5.(b) Take route A. The two routes average the same 30 minutes, but the middle half of route A's journeys covers only 2 minutes while route B's covers 8. The ranges tell the same story: 32 − 28 = 4 minutes against 38 − 22 = 16 minutes, and a 38 minute journey on route B would make the commuter late.
(b) Take route A: the same average, but route B reaches 38 minutes and would make the commuter late.
Answer: (a) both routes have a mean of 30 minutes and a median of 30 minutes; route A has an interquartile range of 2 minutes and route B one of 8 minutes; (b) route A, because its times are packed far more tightly around the same average
Common mistakes
- Deciding between the routes on the means alone and calling them equally good. The means are equal, which is exactly why they cannot decide anything here. A question about being on time is a question about the spread of the times, not about their center.
- Taking the quartiles as the 94th and 274th values and rounding to the 2nd and the 7th. With an odd number of values, split the list at the median, leave the median out, and take the middle of each half; here each half has four values, so each quartile is the mean of two of them.