Making and reading box plots
A five-number summary is five numbers in a row. How can they become one picture that shows at a glance where the data crowd together and where they spread out?
Where you are 3 in Box plots
When you reach for it
The five-number summary, the minimum, Q_1, the median, Q_3 and the maximum, says a lot about a data set, but five numbers in a row are hard to take in at a glance. A box plot (also called a box-and-whisker plot) draws them over a number line: a box from Q_1 to Q_3, a line across the box at the median, and a line called a whisker out from each side of the box to the minimum and to the maximum. Reach for one when you want a quick picture of where the middle half of the data sits and how spread out each part is, above all for a data set too large to draw value by value.
The lesson runs over two days: Day 1 draws box plots, Day 2 reads them and finds what they cannot show. The quartiles are found as in Quartiles and the five number summary: sort the data, cut it at the median into a lower and an upper half (leaving the median out of both when the count is odd), and take the median of each half. All the data in this lesson are made up.
The procedure
Day 1: drawing a box plot
A scale comes first. Draw a number line from at or below the minimum to at or above the maximum, marked in equal steps, with the units named. Every part of a box plot is read against this scale. The line need not start at 0: a scale from 3 to 9 kilograms shows melons from 3.2 to 9 kilograms far more clearly than one from 0 to 10 that squeezes them into a corner.
The box runs from Q_1 to Q_3. Draw a rectangle just above the number line, its left edge over Q_1 and its right edge over Q_3. Its height means nothing. The box marks where the middle half of the data lies, and its width is the interquartile range, \text{IQR} = Q_3 - Q_1.
A line across the box at the median. It splits the box into the second quarter of the data, from Q_1 to the median, and the third, from the median to Q_3.
Whiskers out to the extremes. From the box’s left edge draw a line out to the minimum, and from its right edge out to the maximum, with a short upright mark at each end. The whiskers cover the lowest and the highest quarter of the data, and the whole plot, from minimum to maximum, is as long as the range.
Each piece holds about a quarter. The four pieces, the left whisker, the two parts of the box and the right whisker, almost never have the same length. But the quartiles cut the sorted data into four parts with the same number of values, so each piece holds about a quarter of the values, whatever its length. A short piece means its quarter is packed close together; a long piece means its quarter is spread thinly over a wide stretch. The word “about” covers values sitting exactly on a cut and values that repeat, as Example 3 shows.
Day 2: reading a box plot
The five numbers come back off the scale. The whisker ends are the minimum and the maximum, the box’s edges are Q_1 and Q_3, and the line inside is the median. The range is the length of the whole plot, and the IQR is the width of the box.
Fractions of the data. About \displaystyle \frac{1}{4} of the values lie below Q_1, about \displaystyle \frac{1}{2} below the median, about \displaystyle \frac{3}{4} below Q_3, and about \displaystyle \frac{1}{2} between Q_1 and Q_3. When the number of values is known from elsewhere, multiplying it by the fraction gives about how many values that is. The plot by itself never shows the count.
Length means spread, not more values. A long whisker or a wide part of the box holds about the same number of values as a short one, spread over more of the scale.
What a box plot hides. It draws five numbers and nothing else: not the single values, not how many there are, not a gap where no value falls, a cluster where many crowd together, or data with two peaks. Very different data sets can share one box plot (Example 5). A dot plot shows all of that, one dot per value; a box plot gives up the detail for a picture that stays just as simple for 1{,}000 values as for 10.
Worked examples
Day 1: waiting at the dentist
Jovana works at the front desk of a dentist’s surgery. She timed how long 11 patients waited, in minutes: 12, 4, 19, 9, 31, 7, 16, 23, 10, 6, 15. Draw a box plot of the waiting times.
SolutionFirst the five-number summary, as in Quartiles and the five number summary. Sorted, the times are
With 11 values the median is the 6th, 12, left out of both halves. The lower half 4, 6, 7, 9, 10 has median Q_1 = 7, and the upper half 15, 16, 19, 23, 31 has median Q_3 = 19. The five-number summary is 4, 7, 12, 19, 31.
The times run from 4 to 31, so a scale from 0 to 35 marked every 5 minutes covers them in equal steps. Over it draw the box from 7 to 19, a line across it at 12, and whiskers out to 4 and 31.
The pieces have lengths 7 - 4 = 3, 12 - 7 = 5, 19 - 12 = 7 and 31 - 19 = 12 minutes, yet they share the patients evenly: 4 and 6 lie below Q_1, 9 and 10 between Q_1 and the median, 15 and 16 between the median and Q_3, and 23 and 31 above Q_3. The other three waits are the cut values themselves. The right whisker, four times as long as the left, holds the same two patients; their waits are simply far apart.
Day 1: choosing the scale
Kamil sells watermelons at a market. The masses of the 12 melons on his stall one morning, in kilograms, were 5.5, 3.9, 6.7, 4.4, 9.0, 5.0, 4.8, 7.4, 3.2, 6.1, 4.6, 5.2. Draw a box plot.
SolutionSorted, the masses are
Twelve is even, so the median is halfway between the 6th and 7th values, \displaystyle \frac{5.0 + 5.2}{2} = 5.1. The lower half is the first six values, so \displaystyle Q_1 = \frac{4.4 + 4.6}{2} = 4.5, and in the same way \displaystyle Q_3 = \frac{6.1 + 6.7}{2} = 6.4. The summary is 3.2, 4.5, 5.1, 6.4, 9.0.
A number line from 0 to 10 would leave its first 3 kilograms empty and squeeze the box, 6.4 - 4.5 = 1.9 kilograms wide, into a sliver. A line from 3 to 9 marked every half kilogram covers every melon and leaves room to see each piece.
With 12 different masses, each piece holds exactly 3 melons. The right whisker, 9.0 - 6.4 = 2.6 kilograms long, is twice the left, 4.5 - 3.2 = 1.3: the three heaviest melons differ more from one another than the three lightest do.
Day 1: a whisker of length zero
Jurgen recorded how many pins his first ball knocked down in each of 15 frames of bowling.
| Pins | 5 | 6 | 7 | 8 | 9 | 10 |
|---|---|---|---|---|---|---|
| Frames | 1 | 1 | 2 | 2 | 3 | 6 |
Draw a box plot.
SolutionWritten out in order, the values are
With 15 values the median is the 8th, 9. The lower half is the first seven values, whose middle, the 4th, is Q_1 = 7. The upper half is the last seven, 9 and six 10s, whose middle is Q_3 = 10. The summary is 5, 7, 9, 10, 10.
Here Q_3 and the maximum are both 10, so the right whisker has length zero and the box’s right edge is the end of the plot. That is not a slip in the drawing: the top quarter of the frames all knocked down the same number of pins.
This is where “about a quarter” becomes loose. Six frames, more than a quarter of 15, scored 10, and a cut at 10 cannot split six equal values.
Day 2: reading a box plot
The box plot shows the waiting times of the 40 patients seen at a dental clinic in one week.
(a) Read off the five-number summary. (b) Find the range and the IQR. (c) About what fraction of the patients waited more than 24 minutes, and about how many is that? (d) About how many waited between 9 and 24 minutes? (e) The right whisker is much longer than the left. Does it stand for more patients?
Solution(a) The whiskers end at 3 and 47, the box runs from 9 to 24, and its line is at 14: the summary is 3, 9, 14, 24, 47.
(b) The range is the length of the plot, 47 - 3 = 44 minutes; the IQR is the width of the box, 24 - 9 = 15 minutes.
(c) 24 is Q_3, and about a quarter of the values lie above Q_3: about \displaystyle \frac{1}{4} of the patients, and \displaystyle \frac{1}{4} \times 40 = 10. The 40 came from the question; the plot alone could not give it.
(d) The box holds about half the data: about \displaystyle \frac{1}{2} \times 40 = 20 patients.
(e) No. The right whisker is 47 - 24 = 23 minutes long and the left 9 - 3 = 6, but each holds about a quarter of the patients, about 10. The long whisker says the longest waits were spread over 23 minutes; the short one says the shortest were packed within 6.
Day 2: one box plot, two dot plots
Kamil and Jarek each weighed the 8 watermelons left on their stalls at closing time one evening, in kilograms. Kamil’s: 3.0, 3.2, 3.4, 3.6, 6.4, 6.6, 6.8, 7.0. Jarek’s: 3.0, 3.1, 3.5, 4.4, 5.6, 6.5, 6.9, 7.0. Find the box plot of each and compare it with a dot plot.
SolutionEach list is sorted and has 8 values, so the median is halfway between the 4th and 5th values, Q_1 halfway between the 2nd and 3rd, and Q_3 halfway between the 6th and 7th:
Both run from 3.0 to 7.0, so both summaries are 3.0, 3.3, 5.0, 6.7, 7.0: one and the same box plot.
The dot plots tell two stories. Kamil’s melons come in two groups, four small and four large, with a gap of 2.8 kilograms between them where no melon falls: two clusters, two peaks. His median, 5.0, is not near the mass of any melon. Jarek’s melons spread across the whole stretch. The box plot keeps only five numbers, so it cannot tell the stalls apart.
Day 2: data to fit a box plot
Jarek’s bowling scores in 8 games have the five-number summary 90, 110, 125, 140, 160. Write down a list of 8 scores with this box plot. Is there only one?
SolutionWith 8 sorted values, the 1st is 90 and the 8th is 160. Q_1 is halfway between the 2nd and 3rd values, so those two add to 2 \times 110 = 220. In the same way the 4th and 5th add to 2 \times 125 = 250, and the 6th and 7th to 2 \times 140 = 280. Any pairs with these sums that keep the list in order will do. Taking each pair 5 either side of its halfway number gives
Check: \displaystyle \frac{105 + 115}{2} = 110, \displaystyle \frac{120 + 130}{2} = 125 and \displaystyle \frac{135 + 145}{2} = 140.
It is not the only one. The pairs 100 and 120, 124 and 126, and 130 and 150 also have the right sums and keep the order:
The box plot cannot say which games Jarek bowled, or even whether any game scored exactly 110, 125 or 140; in both lists here, none did.
Boundaries
Numerical data only. A box plot needs values that can be put in order on a number line. Favorite colors have no box plot.
The scale is part of the plot. Without a labeled number line in equal steps, no length can be read.
“About a quarter” is about counts. Each piece holds exactly a quarter of the values when the count is a multiple of 4 and no values repeat. Otherwise values can sit on the cuts, and repeated values can even shrink a piece to length zero, as in Example 3.
The quartile rule matters. Some books and calculators find quartiles by other rules and so draw a slightly different box from the same data.
Few values, little to see. With a handful of values each quartile rests on one or two of them; a dot plot says more.
The whiskers run to the extremes. A single value far from the rest stretches a whisker all the way out to it. A box plot that shows outliers stops the whisker short and draws such a value as a dot of its own, using the Outliers and the 1.5 IQR rule.
Where this goes next
Box plots earn their keep when two groups are drawn on one scale: Comparing box plots. The lengths of the pieces also hint at shape, since a long right whisker with the median near the left of the box goes with data skewed to the right. The Outliers and the 1.5 IQR rule measures out from the box’s edges to decide which values lie far from the rest.
Exercises
Day 1: drawing from a summary
- Jeremias’s bowling scores have the five-number summary 85, 110, 122, 140, 175. Describe his box plot on a scale from 80 to 180 marked every 10, and give the length of each of its four pieces.
- A box plot is drawn from 20 different values. How many values lie in each of its four pieces, and how many inside the box?
Day 1: drawing from data
For each data set, find the five-number summary, choose a scale, and describe the box plot.
- Watermelon masses, in kilograms: 4.2, 5.8, 3.6, 6.2, 4.9, 5.1, 7.7, 4.4, 5.5.
- Bowling scores in 10 games: 132, 118, 145, 101, 127, 150, 139, 122, 160, 113.
- Waiting times at a dentist, in minutes: 2, 5, 5, 6, 8, 8, 9, 11, 12, 14, 17, 21, 26.
- Pins knocked down by the first ball in 13 frames: 2 pins once, 5 once, 7 five times, 8 once, 9 twice and 10 three times. Where does the median line sit in the box, and why?
Day 2: reading a box plot
The box plot shows the waiting times of the 60 patients seen at a second dental clinic in one month.
- Read off the five-number summary, and find the range and the IQR.
- About what fraction of the patients waited more than 40 minutes? About how many patients is that?
- About how many patients waited less than 22 minutes? Between 15 and 40 minutes? Less than 40 minutes?
- Find the length of each of the four pieces. Which is longest and which shortest, and what does each say about the patients in it?
- Can you tell from the plot whether a patient waited exactly 4 minutes? Exactly 52 minutes? Exactly 30 minutes?
Day 2: reading a summary
- A box plot of watermelon masses has the summary 2.8, 4.0, 4.6, 5.9, 8.3 kilograms. Find the range, the IQR and the lengths of the two whiskers. Which quarter of the melons holds more of them, the lightest or the heaviest? Which is more spread out?
- A box plot of 24 bowling scores has the summary 95, 120, 134, 150, 188. Is each statement true, false, or impossible to tell from the plot? (a) The highest score was 188. (b) About three quarters of the games scored 120 or more. (c) One game scored 140. (d) More games scored between 150 and 188 than between 95 and 120.
Day 2: what a box plot hides
- Two morning sessions at a dentist’s surgery had these waiting times, in minutes. Monday: 10, 12, 13, 20, 27, 28, 30. Tuesday: 10, 12, 16, 20, 24, 28, 30. Find each five-number summary. What does the box plot hide about Monday?
- Write a list of 8 watermelon masses with the five-number summary 4, 5, 6, 7, 8 kilograms.
- A data set of 7 values has the five-number summary 2, 6, 6, 9, 12. What can you say for certain about its 2nd, 3rd and 4th values in sorted order?
- Write a list of 7 values whose box plot has a box of width zero.
Reasoning
- Explain why each of the four pieces of a box plot holds about a quarter of the values, even when their lengths are very different.
- A box plot’s right whisker is three times as long as its left whisker. Does that mean more of the values lie on the right? Explain.
- Explain why a box plot cannot show how many values there are. Name one thing a dot plot of the same data shows that the box plot does not, and one reason to draw a box plot anyway.
- Explain why the whole length of a box plot is the range of the data, and the width of its box is the IQR.
Answers
- The box runs from 110 to 140 with a line at 122; the whiskers reach 85 and 175. The pieces have lengths 110 - 85 = 25, 122 - 110 = 12, 140 - 122 = 18 and 175 - 140 = 35.
- Exactly 5 in each piece, since 20 \div 4 = 5 and no values repeat. The box holds the middle two quarters, 10 values.
- Sorted, the median is the 5th value, 5.1; \displaystyle Q_1 = \frac{4.2 + 4.4}{2} = 4.3 and \displaystyle Q_3 = \frac{5.8 + 6.2}{2} = 6.0. Summary 3.6, 4.3, 5.1, 6.0, 7.7. On a scale from 3 to 8 marked every half kilogram, the box runs from 4.3 to 6.0 with a line at 5.1, and the whiskers reach 3.6 and 7.7.
- Sorted, the median is \displaystyle \frac{127 + 132}{2} = 129.5, the lower half 101, 113, 118, 122, 127 gives Q_1 = 118, and the upper half gives Q_3 = 145. Summary 101, 118, 129.5, 145, 160. On a scale from 100 to 160 marked every 10: a box from 118 to 145, a line at 129.5, whiskers to 101 and 160.
- The median is the 7th value, 9. The lower half gives \displaystyle Q_1 = \frac{5 + 6}{2} = 5.5 and the upper half \displaystyle Q_3 = \frac{14 + 17}{2} = 15.5. Summary 2, 5.5, 9, 15.5, 26. On a scale from 0 to 30 marked every 5: a box from 5.5 to 15.5, a line at 9, whiskers to 2 and 26.
- In order: 2, 5, then five 7s, then 8, 9, 9, 10, 10, 10. The median is the 7th value, 7. The lower half 2, 5, 7, 7, 7, 7 gives \displaystyle Q_1 = \frac{7 + 7}{2} = 7; the upper half 8, 9, 9, 10, 10, 10 gives \displaystyle Q_3 = \frac{9 + 10}{2} = 9.5. Summary 2, 7, 7, 9.5, 10. The median line sits on the box’s left edge, because Q_1 and the median both fall among the five frames that scored 7.
- Summary 4, 15, 22, 40, 52. Range 52 - 4 = 48 minutes, IQR 40 - 15 = 25 minutes.
- 40 is Q_3, so about \displaystyle \frac{1}{4} of the patients: 60 \div 4 = 15, about 15 patients.
- Less than 22, the median: about half, about 30. Between 15 and 40, the box: about half, again about 30. Less than 40, which is Q_3: \displaystyle \frac{3}{4} \times 60 = 45, about 45.
- Lengths 15 - 4 = 11, 22 - 15 = 7, 40 - 22 = 18 and 52 - 40 = 12. Longest: the part of the box from 22 to 40, whose quarter of the waits is spread over 18 minutes. Shortest: the part from 15 to 22, whose quarter is packed within 7 minutes. Each holds about 15 patients.
- 4: yes, the minimum is a real wait. 52: yes, so is the maximum. 30: impossible to tell, since the plot shows no single values inside the box.
- Range 8.3 - 2.8 = 5.5, IQR 5.9 - 4.0 = 1.9, whiskers 4.0 - 2.8 = 1.2 and 8.3 - 5.9 = 2.4 kilograms. Neither quarter holds more: each holds about the same number. The heaviest quarter is more spread out, over 2.4 kilograms against 1.2.
- (a) True: the maximum is 188. (b) True: only about a quarter lie below Q_1 = 120. (c) Impossible to tell. (d) False: each whisker holds about a quarter, 24 \div 4 = 6 games.
- Both summaries are 10, 12, 20, 28, 30, so the box plots are the same. On Monday three waits sat close together from 10 to 13 minutes and three from 27 to 30, with only 20 between: two clusters with gaps, which the box plot hides. Tuesday’s waits were spread across the whole stretch.
- One answer: 4, 4.8, 5.2, 5.5, 6.5, 6.8, 7.2, 8. The 2nd and 3rd must add to 10, the 4th and 5th to 12, and the 6th and 7th to 14, with the list in order; many lists work.
- All three are 6. With 7 values the lower half is the first three, so Q_1 is the 2nd value, 6, and the median is the 4th, also 6. The 3rd lies between them in sorted order, so it is 6 too. One such list: 2, 6, 6, 6, 8, 9, 12.
- One answer: 3, 8, 8, 8, 8, 8, 12. The lower half 3, 8, 8 gives Q_1 = 8 and the upper half 8, 8, 12 gives Q_3 = 8, so the box is a single line at 8, with whiskers to 3 and 12.
- The quartiles and the median are chosen by counting: they cut the sorted list into four parts with the same number of values. The lengths come from how far apart the values in each part happen to be, which the counting does not control. So the counts match while the lengths differ.
- No. Each whisker holds about a quarter of the values. The longer one says the top quarter is spread over a stretch three times as wide, not that it holds more values.
- A box plot draws only five numbers, and the same five can come from 8 values or 8{,}000. A dot plot shows every value, and so gaps, clusters and peaks. A box plot stays simple however many values there are, and shows the middle half and the spread of each quarter at a glance.
- The plot runs from the minimum to the maximum, so its length is the maximum minus the minimum, the range. The box runs from Q_1 to Q_3, so its width is Q_3 - Q_1, the IQR.