Five numbers that draw a data set
Tonight's idea
Sort the data, then cut it into four equal parts.
The median is the middle value, or half way between the middle two. The lower quartile \(Q_1\) is the median of the lower half. The upper quartile \(Q_3\) is the median of the upper half. Add the smallest and largest values: five numbers.
This sheet's rule: if the number of values is odd, leave the median out of both halves. Other rules exist and give slightly different quartiles.
A box plot draws the five numbers. The box runs from \(Q_1\) to \(Q_3\), so it holds the middle half. Its width is the interquartile range, \(\text{IQR} = Q_3 - Q_1\): a measure of spread that one strange value barely affects. Whiskers reach out to the smallest and largest values. A long whisker on one side shows skew.
A value more than \(1.5 \times \text{IQR}\) beyond the box is flagged as an outlier and drawn as its own point. The whisker then stops at the last value not flagged. A flag means "look at this", not "delete this".
Watch one: eleven journeys to school
Minutes, sorted: 5, 8, 9, 10, 12, 12, 14, 15, 18, 20, 41.
Eleven values, so the median is the 6th: 12. Leave it out. The lower half 5, 8, 9, 10, 12 has median \(Q_1 = 9\). The upper half 14, 15, 18, 20, 41 has median \(Q_3 = 18\). So \(\text{IQR} = 9\).
Outliers lie above \(18 + 1.5 \times 9 = 31.5\) or below \(9 - 13.5 = -4.5\). Only 41 does, so the upper whisker stops at 20.
Drag the points and watch the box move: mathdetours.com/demos/boxplot.html.
Your turn
- Find the five-number summary and the IQR of 12, 3, 18, 7, 21, 13, 8, 14. Sort first.
- Nine test marks: 35, 55, 58, 60, 63, 65, 68, 70, 74. (a) Find the five-number summary. (b) Is any mark an outlier by the \(1.5 \times \text{IQR}\) rule? (c) Draw the box plot above the axis.
- Two classes sat the same test. Class A's five numbers are 40, 55, 62, 70, 85. Class B's are 50, 58, 62, 64, 72. (a) Which class is more spread out? Give two numbers that show it. (b) A mark of 66 is in the top quarter of one class but not the other. Which, and why?
- (a) Write down seven whole numbers whose five-number summary is 3, 6, 10, 12, 18. (b) The 18 is mistyped as 100. Which of the five numbers change? Does the IQR? (c) Is 100 flagged as an outlier? Where does the upper whisker now end?
Stretch: trapping the mean
A box plot does not show the mean, but it does trap it. Seven numbers have five-number summary 1, 3, 5, 9, 10. What is the smallest their mean could be? The largest?
Answers
- Sorted: 3, 7, 8, 12, 13, 14, 18, 21. Median \((12 + 13) \div 2 = 12.5\). Lower half 3, 7, 8, 12: \(Q_1 = 7.5\). Upper half 13, 14, 18, 21: \(Q_3 = 16\). Summary 3, 7.5, 12.5, 16, 21. \(\text{IQR} = 8.5\).
- (a) Median 63 (the 5th), left out. Lower half 35, 55, 58, 60: \(Q_1 = 56.5\). Upper half 65, 68, 70, 74: \(Q_3 = 69\). Summary 35, 56.5, 63, 69, 74. (b) \(\text{IQR} = 12.5\) and \(1.5 \times 12.5 = 18.75\), so the fences are at \(56.5 - 18.75 = 37.75\) and \(69 + 18.75 = 87.75\). The mark 35 is below 37.75: an outlier. (c) Box from 56.5 to 69, median line at 63, lower whisker to 55, upper whisker to 74, and a separate point at 35.
- (a) Class A. Its range is \(85 - 40 = 45\) against \(72 - 50 = 22\), and its IQR is \(70 - 55 = 15\) against \(64 - 58 = 6\). The medians are equal, so the centres match and only the spread differs. (b) Class B. There 66 is above \(Q_3 = 64\), so it is in the top quarter. In class A it is below \(Q_3 = 70\).
- (a) In order the numbers are 3, 6, ?, 10, ?, 12, 18: the 2nd is \(Q_1\), the 4th the median, the 6th \(Q_3\). The 3rd can be anything from 6 to 10 and the 5th from 10 to 12, for example 3, 6, 8, 10, 11, 12, 18. (b) Only the largest. \(Q_1\), the median and \(Q_3\) stay, so the IQR is still 6. (c) The fence is at \(12 + 1.5 \times 6 = 21\), so 100 is flagged. The last value not flagged is 12, which is \(Q_3\) itself: there is no upper whisker at all.
Stretch. In order, the 1st, 2nd, 4th, 6th and 7th numbers are fixed at 1, 3, 5, 9, 10. The 3rd lies between 3 and 5 and the 5th between 5 and 9. Smallest total: \(1 + 3 + 3 + 5 + 5 + 9 + 10 = 36\), mean \(36 \div 7 \approx 5.14\). Largest: \(1 + 3 + 5 + 5 + 9 + 9 + 10 = 42\), mean 6.