Box-and-Whisker Plots
A box-and-whisker plot (or box plot) squeezes a whole data set into five numbers drawn against a scale: the smallest value, the lower quartile, the median, the upper quartile and the largest value. It throws away the individual values, but in exchange it makes the centre, the spread and the skew visible at a glance, and two plots drawn on the same scale can be compared instantly. On Paper 5 you draw box plots from raw data, from stem-and-leaf diagrams or from cumulative frequency graphs, and you interpret and compare them.
The five-number summary
Order the data. Then:
- The median is the middle value; half the data lie below it.
- The lower quartile is the median of the lower half; about a quarter of the data lie below it.
- The upper quartile is the median of the upper half; about three quarters of the data lie below it.
- The range is the largest value minus the smallest value.
- The interquartile range (IQR) is , the spread of the middle of the data.
For raw values, the median is the th value; each quartile is the median of its half, and when is odd the median is excluded from both halves. (See the median note for positions in detail and for grouped data.)
A box-and-whisker plot shows:
- a box from to , with a line across it at the median;
- whiskers from the box out to the smallest and largest values;
- a labelled scale, so every value can be read off.
Each of the four sections (whisker, half-box, half-box, whisker) holds about a quarter of the data.
Drawing a box plot
- Find the five values: minimum, , median, , maximum.
- Draw a horizontal axis with a uniform, labelled scale that covers the full range. Label it with the variable and units.
- Draw the box from to and a vertical line at the median.
- Draw whiskers from the ends of the box to the minimum and maximum, with a short vertical line at each end.
- If comparing data sets, draw every plot against the same scale, one above the other, and label each plot.
The box plot below shows two groups of students' marks (the data from the back-to-back example in the stem-and-leaf note). Group A: . Group B: .
The medians are nearly level, so the groups did about equally well on average. Group A's box and whiskers are both longer, so its marks are more spread out.
Reading skew
The position of the median inside the box tells you about the shape.
| Shape | Box plot feature | Quartiles |
|---|---|---|
| Symmetrical | median in the middle of the box, whiskers about equal | |
| Positive skew (tail to the right) | median nearer ; right whisker usually longer | |
| Negative skew (tail to the left) | median nearer ; left whisker usually longer |
Positive skew means most of the values are bunched at the low end with a long tail of larger values, like incomes or waiting times. For positively skewed data the mean is usually larger than the median, because the few large values pull the mean up. For negatively skewed data the mean is usually smaller than the median.
To justify skew in an answer, quote numbers: " and , so the data are positively skewed."
Outliers
An outlier is a value that is unusually far from the rest of the data. The Paper 5 syllabus does not define a rule for outliers, so you will only be asked to identify them when the question gives you a rule. The most common rule is:
A value is often treated as an outlier if it is more than below or more than above . If a question gives this (or another) rule, find the two fences and , mark any values outside them with a cross, and draw the whisker only as far as the most extreme value that is not an outlier. Use the question's rule, not this one, if they differ.
Box plots from grouped data
If the data are grouped, the individual values are unknown, so the quartiles and median are estimated from a cumulative frequency graph. The minimum and maximum are not known either; questions then give them, or tell you to use the lowest and highest class boundaries. The box plot is drawn in exactly the same way.
Worked examples
The numbers of minutes late for trains are:
(a) Find the median and quartiles. (b) Describe the box-and-whisker plot you would draw.
Solution
(a) Ordered: . .
Median the th value minutes.
Lower half: , so . Upper half: , so .
(b) On a scale from (say) to minutes, labelled "Minutes late": a box from to with a line at , a left whisker to and a right whisker to .
The right whisker ( to ) is longer than the left ( to ), and while ; the box is nearly symmetrical but the long right tail suggests slight positive skew.
A box plot of the masses of eggs shows: minimum , , median , , maximum .
(a) Find the range and interquartile range. (b) Estimate the number of eggs with masses between and , and the number heavier than . (c) Describe the skewness of the distribution, justifying your answer.
Solution
(a) Range . IQR .
(b) Half of the data lie between the quartiles: about eggs. Half lie above the median: about eggs.
(c) and . The median is closer to the upper quartile, and the left whisker () is longer than the right (), so the distribution is negatively skewed: the tail is towards the lighter eggs.
Using the box plots of Group A and Group B in the diagram above, make two comparisons between the marks of the two groups, and say which group's marks have the greater positive skew.
Solution
Average: the medians are (A) and (B), so on average Group B scored slightly higher, although the difference is very small.
Spread: the IQRs are (A) and (B), and the ranges are and . Group A's marks are more spread out; Group B's are more consistent.
Skew: for A, and ; for B, and . Both boxes are close to symmetrical, but both have a longer right whisker (A: against ; B: against ), so both show slight positive skew in the tails, more so for Group A.
The times, in seconds, taken by people to solve a puzzle are:
An outlier is defined as a value more than IQR above the upper quartile or below the lower quartile.
(a) Show that is an outlier and that there are no other outliers. (b) Describe how the box-and-whisker plot should be drawn.
Solution
(a) . Median . Lower half : . Upper half : .
IQR , so .
Upper fence: . Lower fence: .
, so is an outlier. Every other value lies between and , inside both fences, so there are no other outliers.
(b) Box from to with the median at ; left whisker to ; right whisker to (the largest value that is not an outlier); the value marked separately with a cross.
Seven integers have a box-and-whisker plot with minimum , lower quartile , median , upper quartile and range . The mean of the seven integers is and the mode is . Find the seven integers.
Solution
Write them in order as . With , the median is the th value, and each half has three values, so is the nd value and the th.
So , , , , and .
The total is :
Order requires and . The integer pairs with are and .
- gives , whose mode is . Rejected.
- gives , whose mode is . Accepted.
The integers are .
No scale, or a non-uniform scale. A box plot without a labelled, evenly spaced axis cannot be read and loses marks. Plot each value accurately; examiners check the median and quartiles to within half a small square.
Whiskers through the box. The whiskers stop at the edges of the box. Drawing one line from minimum to maximum through the box makes the median line hard to read and is usually penalised.
Calling the IQR "the range of the box plot". The range is maximum minus minimum; the IQR is . Name the one you are using.
- Quartiles from raw data: show the positions you used. For grouped data, write "estimate" and read values from the cumulative frequency graph.
- "Compare" means at least one statement about average (median) and one about spread (IQR or range), each in context and each with numbers from both plots. "Group A is bigger" is not a comparison.
- Skew questions want a reason: quote and , or describe where the median sits in the box.
- If you are asked to draw two plots for comparison, use one scale for both. Two plots on different scales cannot be compared and lose the mark.
- Use a ruler, and draw the plots on the graph paper provided rather than freehand.
- Five-number summary: minimum, , median, , maximum.
- Box from to , line at the median, whiskers to the extremes, on a labelled uniform scale.
- Each of the four sections holds about of the data; the box holds the middle .
- Median nearer : positive skew. Median nearer : negative skew. Justify with and .
- Outliers only by a rule the question gives; whiskers then stop at the most extreme non-outlier.
- Box plots are ideal for comparing data sets but lose individual values, the mode and the sample size.
Practice questions
- The masses, in kg, of parcels are: . Find the median, quartiles and interquartile range, and describe the box-and-whisker plot.
- A box plot of the reaction times of drivers has minimum , , median , and maximum (seconds). State the range and interquartile range, describe the skewness with a reason, and estimate the number of drivers with a reaction time above seconds.
- For the drivers in question 2, would you expect the mean reaction time to be greater or less than seconds? Explain your answer.
- Two box plots of daily rainfall (mm) in two towns have summaries: Town P: ; Town Q: . Make two comparisons between the rainfall in the towns.
- Using the rule "an outlier is more than from the nearer quartile", determine whether the value in question 1 is an outlier.
- Give one feature of a data set that can be seen in a stem-and-leaf diagram but not in a box-and-whisker plot.
- Ten values are , where . Using the rule "an outlier is more than above the upper quartile", find the smallest integer value of for which is an outlier.
- Eight integers in ascending order are . The median is , the interquartile range is and the mean is . Find , and .
Answers
-
Ordered: . . Median . . . IQR . Box from to with median line at ; whiskers to and .
-
Range . IQR . (and the right whisker is longer), so the data are positively skewed. About a quarter of the drivers are above : drivers.
-
Greater than seconds. The data are positively skewed, so the relatively few long reaction times in the upper tail pull the mean above the median.
-
Average: Town Q has the higher median ( mm against mm), so it typically has more rain on a day. Spread: Town P's rainfall is much more variable (IQR mm against mm; range mm against mm).
-
IQR ; . Upper fence . Since , is not an outlier.
-
Any one of: the individual data values; the number of values; the mode; whether the data have two peaks or gaps.
-
. Median . Lower half : . Upper half : since it is the largest value, so whatever is. IQR , so the upper fence is . is an outlier when , so the smallest integer is .
-
: the median is halfway between the th and th values, so , giving . Lower half : . Upper half : . IQR: , so . Mean: the total is , so , giving . Solving, and . Check the order: is ascending. So , , .