Box and Whisker

The middle half drawn as a box.

Five numbers

A basketball player scores these points in 11 games, written in order: 4, 8, 12, 14, 16, 18, 21, 24, 26, 30 and 34. Five numbers summarize them. The lowest value is 4 and the highest is 34. The median is the 6th value, 18. The lower half, 4, 8, 12, 14 and 16, has 12 in its middle, so the lower quartile is 12. The upper half, 21, 24, 26, 30 and 34, has 26 in its middle, so the upper quartile is 26.

These five numbers, 4, 12, 18, 26 and 34, are the five-number summary: lowest value, lower quartile, median, upper quartile and highest value. They are always in increasing order, and a box plot, or box-and-whisker diagram, draws all five of them against one scale.

Drawing the box plot

Draw a scale that covers every value, here 0 to 40 points. Draw a box from the lower quartile, 12, to the upper quartile, 26, and a line across the box at the median, 18. Then draw a whisker, a line, from the left end of the box out to the lowest value, 4, and another from the right end out to the highest value, 34.

Everything is drawn to scale, so each length on the plot means something. The length of the box is the interquartile range, or IQR, 26 − 12 = 14 points. From the end of one whisker to the end of the other is the range, 34 − 4 = 30 points.

A010203040

The box runs from the lower quartile, 12, to the upper quartile, 26, with the median, 18, marked inside it. The whiskers reach the lowest value, 4, and the highest, 34.

The box is the middle half

The quartiles and the median cut the ordered data into four parts with the same number of values in each. For the 11 games, 4 and 8 lie below the box, 30 and 34 lie above it, and the other seven games, from 12 to 26 points, are in the box. With 100 values, about 25 lie below the box, about 25 lie above it, and about 50 are in it. The box holds the middle half of the data, and each whisker covers a quarter.

A second player’s 11 games are 4, 10, 14, 16, 17, 18, 19, 20, 22, 28 and 34 points. The lowest and highest values are again 4 and 34, and the median is again 18. But the lower quartile is 14 and the upper quartile is 22, so the box runs from 14 to 22, and its length, the interquartile range, is only 22 − 14 = 8 points.

A narrow box does not mean fewer values. It holds the middle half, just as the wide box does, but those values are packed more tightly together.

AB010203040

On one scale, player B’s box, from 14 to 22, is much narrower than player A’s, from 12 to 26. The medians and the whiskers match.

Comparing two box plots

Box plots are drawn to compare groups. Draw them on the same scale, one above the other, so that positions and lengths can be compared directly. Then compare one average and one measure of spread, in the words of the question: the median for the average, and the interquartile range for the spread.

For the two players: “Both players have a median of 18 points, but player A’s interquartile range is 14 points and player B’s is 8 points, so player B’s scores are more consistent.” The ranges would not show the difference, since both are 30 points. The boxes show it at once.

A comparison uses position and width separately. The position of the median says which group is higher. The width of the box says which group is more spread out. A wider box is not a higher one.

Outliers are drawn as separate points

Suppose player A had scored 52 points in the last game instead of 34. The upper half is now 21, 24, 26, 30 and 52, whose middle value is still 26, so the quartiles, the median and the interquartile range, 14 points, do not change.

An outlier is a value more than 1.5 × IQR above the upper quartile or below the lower quartile. Here 1.5 × 14 = 21. The upper limit is 26 + 21 = 47 points, and 52 is past it, so 52 is an outlier. The lower limit is 12 − 21 = −9 points, and no score is below it.

On a box plot, an outlier is drawn as a separate point, a small cross or dot at its value. The whisker then stops at the largest value that is not an outlier, here 30. The plot shows at a glance that one game was far above the rest, without letting that game stretch the whisker.

A0102030405060

With 52 in place of 34, the box is unchanged, from 12 to 26, and the right whisker stops at 30, the largest score that is not an outlier.

0102030405060264752

The upper quartile is 26 and the upper limit is 26 + 1.5 × 14 = 47. The score 52 lies past the limit, so it is an outlier.

01020304050Q₃ + 1.5 IQR = 53.5Q₁ = 14.8Q₃ = 30.3IQR = 15.5 · median 22.5

the box spans Q₁ to Q₃, IQR = 15.5, and holds ten of the twenty values however narrow it gets: a narrow box is density, not fewer points

Pack the middle ten together, then push the top value past the fence

Twenty values and their box plot, with the upper limit for outliers, 1.5 × IQR above the upper quartile, drawn as a dashed line. Pack the middle ten values together: the box narrows and the limit moves in. Then drag the top value past the limit, and it is drawn as a separate point while the whisker stops at the last value inside.

Looking ahead: is a box plot symmetric?

A box plot also shows the shape of the data. Compare the two halves of the box, from the lower quartile to the median and from the median to the upper quartile, and compare the two whiskers. When both halves of the box are about the same length, and so are both whiskers, the data is roughly symmetric about its median.

When one half of the box and the whisker on the same side are clearly longer, the data is stretched toward that side. For player A, the box has 18 − 12 = 6 points below the median and 26 − 18 = 8 above it, and each whisker is 8 points long, 12 − 4 and 34 − 26, so the scores are close to symmetric, stretched a little toward the high end.

Worked example: Two Box Plots of Race Times on One Scale

Question Two running clubs entered the same 10 km race. The times, in minutes, are summarized as five numbers for each club. Club A: smallest 38, lower quartile 44, median 48, upper quartile 52, largest 58. Club B: smallest 36, lower quartile 40, median 43, upper quartile 55, largest 70. (a) Draw the two box plots on the same scale and compare the times of the two clubs. (b) One of the two sets of times is roughly symmetric and the other is not. Say which is which, and give the figures that show it.

  1. 1.Draw one scale in minutes long enough for both clubs, from about 35 to 70. For each club draw the box from the lower quartile to the upper quartile, mark the median inside it, and draw the whiskers out to the smallest and the largest time.

    3540455055606570ABone scale in minutes for both clubs
    3540455055606570ABone scale in minutes for both clubs
    Each box runs from the lower quartile to the upper quartile, with the median inside it and the whiskers out to the fastest and the slowest time.
  2. 2.The interquartile ranges come straight off the boxes: club A has 52 − 44 = 8 minutes and club B has 55 − 40 = 15 minutes.

    3540455055606570ABmedians: A 48, B 43 minutes
    3540455055606570ABmedians: A 48, B 43 minutes
    The medians are 48 minutes for club A and 43 minutes for club B.
  3. 3.(a) Club B has the lower median, 43 minutes against club A's 48 minutes, so a typical club B runner is faster. Club A's interquartile range is 8 minutes against club B's 15, so club A's runners are much more alike; the slowest club B runner took 70 minutes, 12 minutes behind the slowest in club A.

    3540455055606570AB8 min15 minA: 52 − 44 = 8 minutesB: 55 − 40 = 15 minutes
    3540455055606570AB8 min15 minA: 52 − 44 = 8 minutesB: 55 − 40 = 15 minutes
    (a) The interquartile ranges are 52 − 44 = 8 minutes and 55 − 40 = 15 minutes, so club B is faster in the middle and club A is far more alike.
  4. 4.For club A, compare the two halves of the box: 48 − 44 = 4 minutes below the median and 52 − 48 = 4 minutes above it. The whiskers match too, 44 − 38 = 6 minutes and 58 − 52 = 6 minutes.

    3540455055606570AB4415 minA: 4 minutes each side of the medianand each whisker is 6 minutes
    3540455055606570AB4415 minA: 4 minutes each side of the medianand each whisker is 6 minutes
    Club A has 48 − 44 = 4 minutes below its median and 52 − 48 = 4 above it, and both whiskers are 6 minutes long.
  5. 5.(b) Club A is roughly symmetric, because each half of its box is 4 minutes wide and each whisker is 6 minutes long. Club B is not: its box is 43 − 40 = 3 minutes wide below the median and 55 − 43 = 12 minutes wide above it, and the upper whisker runs 70 − 55 = 15 minutes against 40 − 36 = 4 minutes at the other end, so club B's times are stretched toward the slow end.

    3540455055606570AB44312B: 3 minutes below, 12 aboveand the slow whisker is 15 minutes
    3540455055606570AB44312B: 3 minutes below, 12 aboveand the slow whisker is 15 minutes
    (b) Club B has 43 − 40 = 3 minutes below its median against 55 − 43 = 12 above it, so club A is the symmetric one and club B is stretched toward the slow end.

Answer: (a) club A has a median of 48 minutes and an interquartile range of 8 minutes, club B a median of 43 minutes and an interquartile range of 15 minutes, so club B is faster in the middle and club A is far more consistent; (b) club A is roughly symmetric, with 4 minutes on each side of its median and whiskers of 6 minutes, while club B is stretched toward the slow end, with 3 minutes below its median against 12 minutes above it

Common mistakes

  • Reading the longer box of club B as "club B is slower". The width of a box is a spread, not a position. Club B's median is lower than club A's, so its typical runner is faster; the wide box says its runners differ from one another more.
  • Judging symmetry from the whiskers alone. A long upper whisker can be one slow runner. The quartiles hold the middle half of the club, so the two halves of the box, 3 minutes against 12 minutes here, are the stronger evidence, and the whiskers then confirm it.

More measuring data problems, worked step by step →

Practice Box and Whisker in the app