Math Core

Lesson 1.6 · Exploring One-Variable Data

Box plots and outliers

"Outlier" has meant "a value that looks far from the rest" so far. That's too vague for a statistics course: two people looking at the same graph could disagree. This lesson gives two precise rules for identifying outliers and shows how to build the graph that displays them: the box plot, drawn from the five-number summary.

The five-number summary

Definition

Five-number summary

The five-number summary of a distribution is

minimum,Q1,median,Q3,maximum.\text{minimum}, \quad Q_1, \quad \text{median}, \quad Q_3, \quad \text{maximum}.

These five values split the ordered data into four parts, each holding about 25%25\% of the values.

The five-number summary gives a quick sense of center (the median) and spread (the range and the IQR), and it is the basis for a box plot.

Two rules for outliers

The 1.5 × IQR rule

A value is an outlier if it is more than 1.5×IQR1.5 \times \text{IQR} below Q1Q_1 or above Q3Q_3. That is, an outlier is any value outside the fences

Q1−1.5⋅IQRandQ3+1.5⋅IQR.Q_1 - 1.5 \cdot \text{IQR} \qquad \text{and} \qquad Q_3 + 1.5 \cdot \text{IQR}.

This is the standard rule in AP Statistics, and the one used to draw box plots. Because it is built from quartiles, it is resistant: the outliers themselves don't distort the fences.

A second rule uses the mean and standard deviation.

The two-standard-deviation rule

A value may be called an outlier if it is more than 22 standard deviations from the mean: below xˉ−2sx\bar{x} - 2s_x or above xˉ+2sx\bar{x} + 2s_x.

The two rules don't always agree. The 2sx2s_x rule works best for roughly symmetric, mound-shaped data; for strongly skewed data, it can flag many ordinary values in the long tail. When a question doesn't specify a rule, use 1.5×IQR1.5 \times \text{IQR} and say so.

Box plots

A box plot (or boxplot) draws the five-number summary above a number line.

  1. Draw a box from Q1Q_1 to Q3Q_3, with a line across it at the median.
  2. Check for outliers with the 1.5×IQR1.5 \times \text{IQR} rule and plot each one as a separate dot.
  3. Draw whiskers from the box out to the smallest and largest values that are not outliers.

A box plot that shows outliers this way is called a modified box plot, and it is the kind you should always draw in AP Statistics.

Worked example: Building a modified box plot

Fifteen students reported how many hours they spent playing video games last week:

0, 2, 3, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 12, 240, \ 2, \ 3, \ 3, \ 4, \ 5, \ 5, \ 6, \ 7, \ 8, \ 8, \ 9, \ 10, \ 12, \ 24

Identify any outliers and make a modified box plot.

Five-number summary. With n=15n = 15, the median is the 8th value, 66. The lower half is 0,2,3,3,4,5,50, 2, 3, 3, 4, 5, 5, so Q1=3Q_1 = 3. The upper half is 7,8,8,9,10,12,247, 8, 8, 9, 10, 12, 24, so Q3=9Q_3 = 9. The summary is 0,3,6,9,240, 3, 6, 9, 24.

Outliers. IQR=9−3=6\text{IQR} = 9 - 3 = 6 and 1.5⋅6=91.5 \cdot 6 = 9. The fences are 3−9=−63 - 9 = -6 and 9+9=189 + 9 = 18. Only 2424 is outside them, so 24 hours is an outlier.

Draw it. The box runs from 33 to 99 with a line at 66. The left whisker reaches 00. The right whisker stops at 1212, the largest value that is not an outlier, and 2424 gets its own dot.

Hours of video games last week (15 students)

Reading box plots

Because each section holds about a quarter of the data, a box plot answers "what percent" questions quickly: about 25%25\% of the values are below Q1Q_1, about 50%50\% are between Q1Q_1 and Q3Q_3, and about 75%75\% are below Q3Q_3.

A box plot also hints at shape. In the video-game plot, the box and whiskers are balanced, but the high outlier at 2424 stretches the distribution far to the right, a sign of right skew. In general:

  • Skewed right: the right whisker and the right part of the box tend to be longer.
  • Skewed left: the left whisker and the left part of the box tend to be longer.
  • Roughly symmetric: the two halves look about the same.

Worked example: Reading a box plot

The box plot summarizes the ages of the guests at a large wedding.

Ages of wedding guests (years)
  1. Give the five-number summary and the IQR.
  2. About what percent of the guests were older than 2626?
  3. Could any guest's age be an outlier?

Solutions.

  1. Minimum 1818, Q1=26Q_1 = 26, median 3434, Q3=47Q_3 = 47, maximum 7171. The IQR is 47−26=2147 - 26 = 21 years.
  2. 2626 is Q1Q_1, so about 75%75\% of the guests were older than 2626.
  3. The fences are 26−1.5⋅21=−5.526 - 1.5 \cdot 21 = -5.5 and 47+31.5=78.547 + 31.5 = 78.5. Every age is between them, so there are no outliers, which matches the plot having no separate dots.

Worked example: The two-standard-deviation rule

A snack company weighed a sample of 3030 bags of chips labeled "2828 grams." The weights had mean xˉ=28.4\bar{x} = 28.4 g and standard deviation sx=0.6s_x = 0.6 g. One bag weighed 27.027.0 g. Is it an outlier by the 2sx2s_x rule?

The cutoffs are 28.4−2(0.6)=27.228.4 - 2(0.6) = 27.2 g and 28.4+2(0.6)=29.628.4 + 2(0.6) = 29.6 g. Since 27.0<27.227.0 < 27.2, the bag is an outlier by this rule. It is more than two standard deviations below the mean.

Common mistake

A box plot does not show the number of values, and a longer section doesn't hold more data. Each section always holds about 25%25\% of the values; a long section means those values are spread out. Box plots also hide details such as gaps, clusters and multiple peaks. A bimodal distribution can produce a perfectly ordinary-looking box plot.

Tip

The whisker ends at the most extreme value inside the fences, not at the fence itself. The fences are never drawn on a box plot; they're only a test.

Practice

The next two problems use this box plot of the monthly rent, in hundreds of dollars, of apartments in a neighborhood.

Monthly rent of apartments (hundreds of dollars)
Practice 1

What is the interquartile range of the rents, in hundreds of dollars?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Which statement about the rents is supported by the box plot?

Practice 3

Find the upper fence for outliers for this data set.

4, 18, 20, 21, 23, 24, 25, 27, 28, 30, 33, 454, \ 18, \ 20, \ 21, \ 23, \ 24, \ 25, \ 27, \ 28, \ 30, \ 33, \ 45

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

For the data set in the previous problem, how many values are outliers by the 1.5×IQR1.5 \times \text{IQR} rule?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

The scores on a standardized test have mean xˉ=500\bar{x} = 500 and standard deviation sx=90s_x = 90. Using the two-standard-deviation rule, which score would be considered an outlier?

Practice 6

Two data sets have identical box plots. Which statement must be true?

Practice 7

A data set has Q1=40Q_1 = 40 and Q3=52Q_3 = 52. In its modified box plot, the lower whisker ends at 2727 and the minimum is plotted as a separate outlier dot. Which value could be the minimum?