Chapter 14 · Statistics and data analysis

Create and Interpret Box Plots

Build a box plot from a data set's five-number summary, then read the box and whiskers to find the range and the interquartile range.

12 min read

A long list of numbers is hard to take in at a glance. A box plot gives you a quick picture of how a data set spreads out along a number line, using just five numbers called the five-number summary:

  • the minimum, the smallest value;
  • the lower quartile, Q1Q_1, the median of the lower half;
  • the median, the middle of the ordered list;
  • the upper quartile, Q3Q_3, the median of the upper half;
  • the maximum, the largest value.

Recall how you find them. First put the data in order from least to greatest. When the count (how many values there are) is odd, the median is the single middle value; when the count is even, it is the mean of the two middle values. Then split the ordered list into a lower half and an upper half with the same number of values. When the count is odd, leave the median out of both halves.

Key concept

A box plot pictures the five-number summary

On a number-line scale, a box runs from Q1Q_1 to Q3Q_3, and a line across the box marks the median. Two whiskers, one line segment on each side of the box, reach out to the minimum and to the maximum. Lengths on the plot then measure spread:

  • The length of the whole plot, from the end of one whisker to the end of the other, is the range: the distance between the smallest and largest values.
  • The length of the box alone is the interquartile range (IQR): the distance from Q1Q_1 to Q3Q_3, which shows how spread out the middle of the ordered list is.
range=maximum−minimumIQR=Q3−Q1\text{range} = \text{maximum} - \text{minimum} \qquad \text{IQR} = Q_3 - Q_1

Worked example

Create a box plot when the count is odd

A basketball player scored these points in 11 games: 14, 22, 9, 20, 6, 16, 12, 24, 10, 19, 13. Find the five-number summary and use it to create a box plot.

  1. Put the scores in order from least to greatest, because the median and the quartiles are found by position in the ordered list. Check that all 11 scores appear.

    6,9,10,12,13,14,16,19,20,22,246, 9, 10, 12, 13, 14, 16, 19, 20, 22, 24
  2. The two ends of the ordered list are the minimum and the maximum. The count, 11, is odd, so the median is the single middle value: the 6th score, which has 5 scores on each side.

    minimum=6,median=14,maximum=24\text{minimum} = 6, \quad \text{median} = 14, \quad \text{maximum} = 24
  3. Split the list into a lower half and an upper half. Because the count is odd, leave the median, 14, out of both halves, so each half holds 5 scores.

    lower half: 6,9,10,12,13upper half: 16,19,20,22,24\text{lower half: } 6, 9, 10, 12, 13 \qquad \text{upper half: } 16, 19, 20, 22, 24
  4. Each half has 5 scores, an odd count, so its median is its 3rd score. The median of the lower half is the lower quartile, and the median of the upper half is the upper quartile.

    Q1=10,Q3=20Q_1 = 10, \quad Q_3 = 20
  5. Place the five values on a scale from 0 to 24 that counts by 2s; every value is even, so each one sits exactly on a tick. One whisker reaches the minimum, 6, and the other reaches the maximum, 24. The box runs from 10 to 20, with a line across it at the median, 14.

    minimum=6,Q1=10,median=14,Q3=20,maximum=24\text{minimum} = 6, \quad Q_1 = 10, \quad \text{median} = 14, \quad Q_3 = 20, \quad \text{maximum} = 24

Answer

The five-number summary is 66, 1010, 1414, 2020 and 2424 points, so the box plot has whiskers that end at 66 and 2424 and a box from 1010 to 2020 with its median line at 1414.

Box plotBox plot. Value axis: each step is 2 points, up to 24 points. Minimum, 6 points. Lower quartile, 10 points. Median, 14 points. Upper quartile, 20 points. Maximum, 24 points.06121824points
Box plotMinimum 6 · Lower quartile 10 · Median 14 · Upper quartile 20 · Maximum 24 points
The whiskers end at 6 and 24 points, and the box runs from Q1=10Q_1 = 10 to Q3=20Q_3 = 20 with the median line at 14.

Now read the box plot above to describe how spread out the scores are. Measure each length by subtracting the scale values at its two ends, not by how long it looks.

  • The whole plot runs from 6 to 24, so the range is 24−6=1824 - 6 = 18 points. The player's lowest and highest games were 18 points apart.
  • The box runs from 10 to 20, so the IQR is 20−10=1020 - 10 = 10 points. The middle scores, from Q1Q_1 to Q3Q_3, all lie within a 10-point stretch.

Worked example

Create and read a box plot when the count is even

Twelve students recorded how many books they read over the summer: 6, 3, 10, 4, 1, 8, 12, 5, 4, 7, 2, 8. Create a box plot of the data, then use it to state the range and the IQR.

  1. Order the 12 values, since every later step works by position.

    1,2,3,4,4,5,6,7,8,8,10,121, 2, 3, 4, 4, 5, 6, 7, 8, 8, 10, 12
  2. The ends give the minimum, 1, and the maximum, 12. The count, 12, is even, so the median is the mean of the 6th and 7th values. A median does not have to be a data value.

    median=5+62=112=5.5\text{median} = \frac{5 + 6}{2} = \frac{11}{2} = 5.5
  3. Because the count is even, no value is left out: the lower half is 1, 2, 3, 4, 4, 5 and the upper half is 6, 7, 8, 8, 10, 12. Each half has 6 values, an even count, so each quartile is the mean of that half's 3rd and 4th values.

    Q1=3+42=72=3.5,Q3=8+82=162=8Q_1 = \frac{3 + 4}{2} = \frac{7}{2} = 3.5, \qquad Q_3 = \frac{8 + 8}{2} = \frac{16}{2} = 8
  4. Place the five values on a scale from 0 to 12 that counts by halves, so that 3.5 and 5.5 sit exactly on ticks. The whiskers end at 1 and 12, and the box runs from 3.5 to 8 with a line at 5.5.

    minimum=1,Q1=3.5,median=5.5,Q3=8,maximum=12\text{minimum} = 1, \quad Q_1 = 3.5, \quad \text{median} = 5.5, \quad Q_3 = 8, \quad \text{maximum} = 12
  5. Read the spread from the plot: the length of the whole plot is the range, and the length of the box alone is the IQR.

    range=12−1=11,IQR=8−3.5=4.5\text{range} = 12 - 1 = 11, \qquad \text{IQR} = 8 - 3.5 = 4.5

Answer

The box plot shows a minimum of 11, Q1=3.5Q_1 = 3.5, a median of 5.55.5, Q3=8Q_3 = 8 and a maximum of 1212 books, so the range is 1111 books and the IQR is 4.54.5 books.

Box plotBox plot. Value axis: each step is 1/2 books, up to 12 books. Minimum, 1 book. Lower quartile, 3 and 1/2 books. Median, 5 and 1/2 books. Upper quartile, 8 books. Maximum, 12 books.02½57½1012books
Box plotMinimum 1 · Lower quartile 3 and 1/2 · Median 5 and 1/2 · Upper quartile 8 · Maximum 12 books
The whiskers end at 1 and 12 books, and the box runs from Q1=3.5Q_1 = 3.5 to Q3=8Q_3 = 8 with the median line at 5.5.

Takeaway: A box plot pictures the five-number summary on a number line. The whiskers reach the minimum and the maximum, the box runs from Q1Q_1 to Q3Q_3 (the medians of the two halves, with the median left out of both halves when the count is odd), and a line across the box marks the median. Read the whole plot for the range and the box alone for the IQR.

Next, you will identify outliers and describe their effect.