Lesson 1.8 · Unit 1 · CED topic 1.8

Five-number summaries and boxplots

A histogram shows the whole shape of a distribution but takes up a lot of room. When you want to compare several distributions side by side, or spot outliers at a glance, a boxplot is more compact: it shows only five numbers, but they are the right five. This lesson builds the five-number summary, draws boxplots (including the outliers), and uses the relationship between the mean and the median to read skew.

Required content · 1.8.A, 1.8.B

Learning objectives.

  • 1.8.A. Construct quantitative one-variable graphical representations of summary statistics.
  • 1.8.B. Describe quantitative one-variable graphical representations of summary statistics based on the relationship of the mean and the median.

Essential knowledge.

  • 1.8.A.1. A five-number summary is made up of the minimum data value, the first quartile (Q1), the median, the third quartile (Q3), and the maximum data value.
  • 1.8.A.2. A boxplot is a graphical representation of the five-number summary (minimum, first quartile, median, third quartile, maximum). The box represents the middle 50% of data, with a line at the median and the ends of the box corresponding to the quartiles. Lines (“whiskers”) that represent 25% of the data extend from the first quartile to the minimum and from the third quartile to the maximum. If there are outliers in the data, the whiskers extend to the most extreme data values that are not outliers, and outliers are usually denoted with an asterisk or other symbol.
  • 1.8.B.1. If a distribution is relatively symmetric, then the values of the mean and median are relatively close to each other. If a distribution is skewed right, then the value of the mean is usually larger than the median. If the distribution is skewed left, then the value of the mean is usually smaller than the median.

The five-number summary

A five-number summary is made up of the minimum data value, the first quartile (\(Q_1\)), the median, the third quartile (\(Q_3\)), and the maximum data value. It splits the ordered data into four groups with about 25% of the values in each: from the minimum to \(Q_1\), from \(Q_1\) to the median, from the median to \(Q_3\), and from \(Q_3\) to the maximum. For the 30 commute times the five-number summary is 5, 15, 21, 32, 90 minutes.

Boxplots

A boxplot is a graphical representation of the five-number summary. The box represents the middle 50% of the data, with a line at the median and the ends of the box at the quartiles. Lines called whiskers extend from the box toward the extremes. If there are no outliers, the whiskers run from \(Q_1\) down to the minimum and from \(Q_3\) up to the maximum, and each whisker holds the 25% of the data beyond the box. If there are outliers in the data, the whiskers extend to the most extreme data values that are not outliers, and the outliers are plotted separately, usually with an asterisk or another symbol. (This is called a modified boxplot.)

To draw one by hand: (1) find the five-number summary; (2) compute the fences \(Q_1-1.5\,\text{IQR}\) and \(Q_3+1.5\,\text{IQR}\); (3) mark any value outside the fences as an outlier; (4) draw the box and median line; (5) draw each whisker to the most extreme non-outlier value.

0102030405060708090 5 15 21 32 55 outliers: 60 and 90 Commute time (minutes)
Figure 1.15. The box runs from \(Q_1=15\) to \(Q_3=32\) with a line at the median, 21. The whiskers end at the smallest value, 5, and at the largest value that is not an outlier, 55; the values 60 and 90 lie beyond the upper fence (57.5) and are plotted separately.

How to read a boxplot: the median line shows the center, the length of the box is the IQR (variability), the relative lengths of the two whiskers and the two halves of the box show skewness (a longer upper whisker or upper half suggests skew to the right), and separate points show outliers. A boxplot does not show peaks or gaps. A bimodal distribution and a unimodal one can have identical boxplots, so use a histogram or dotplot when the number of peaks matters.

Mean, median and skew

If a distribution is relatively symmetric, the mean and median are relatively close to each other. If the distribution is skewed to the right, the mean is usually larger than the median, because the long right tail pulls the mean up. If it is skewed to the left, the mean is usually smaller than the median.

median mean Skewed left median mean Symmetric median mean Skewed right
Figure 1.16. The median (solid line) splits the area in half; the mean (dashed line) is pulled toward the longer tail. Skewed left: mean below median. Symmetric: about equal. Skewed right: mean above median.

For the commute data, the mean is 26.0 and the median is 21 minutes: the mean is larger, consistent with the right skew we saw in the histogram. This is a tendency, not a law, but it is a reliable one for single-peaked distributions and an easy way to support a claim about skewness on the exam: "The mean is greater than the median, so the distribution is probably skewed right."

Worked example · Five-number summary and boxplot with outliers

Find the five-number summary of the 30 commute times, check for outliers and describe the boxplot.

The five-number summary is min 5, \(Q_1=15\), median 21, \(Q_3=32\), max 90. The IQR is 17, so the fences are \(15-25.5=-10.5\) and \(32+25.5=57.5\). The values 60 and 90 are above the upper fence and are outliers, and no value is below the lower fence. The largest value that is not an outlier is 55, so the upper whisker ends at 55. Boxplot: a box from 15 to 32 with a line at 21, a lower whisker down to 5, an upper whisker out to 55, and separate marks at 60 and 90. The upper whisker and the upper half of the box are longer than the lower ones, which fits a distribution skewed to the right.

Worked example · A left-skewed data set

Fifteen quiz scores were 58, 71, 74, 78, 80, 82, 83, 85, 86, 88, 88, 90, 91, 93, 95. Find the five-number summary, any outliers, and compare the mean (82.8) with the median.

The median is the 8th value, 85. The lower half (7 values) has median 78, so \(Q_1=78\); the upper half has median 90, so \(Q_3=90\). The five-number summary is 58, 78, 85, 90, 95. \(\text{IQR}=12\), so the fences are \(78-18=60\) and \(90+18=108\). The score 58 is below 60, so it is an outlier. The lower whisker stops at the next smallest score, 71, and the upper whisker ends at 95. The mean (82.8) is below the median (85), which matches the longer lower tail and the outlier at the low end: the distribution is skewed to the left.

Worked example · What a boxplot says about percentages

A boxplot for the number of minutes 200 students spent on a task has minimum 20, \(Q_1=30\), median 36, \(Q_3=50\), maximum 80 (no outliers). About how many students took between 36 and 50 minutes? Between 50 and 80?

About 25% of the data lie between the median and \(Q_3\), so about \(0.25(200)=50\) students took between 36 and 50 minutes. About 25% lie between \(Q_3\) and the maximum, so about 50 students took between 50 and 80 minutes. Compare the lengths: the upper half of the box (36 to 50) is 14 minutes long and the lower half (30 to 36) is only 6, so the data are more spread out above the median than below it.

TI-84: boxplot

Enter the data in L1. Press 2nd Y= (STAT PLOT), choose Plot1, turn it On, and pick the boxplot icon in the second row (the one with the separate dots shown at the ends) for a modified boxplot, with Xlist L1. Press ZOOM 9 (ZoomStat) and GRAPH, then TRACE to read \(\text{minX}\), \(Q_1\), Med, \(Q_3\) and \(\text{maxX}\) and to see each outlier's value. The plain boxplot icon (without the dots) draws the whiskers all the way to the minimum and maximum, which hides the outliers, so use the modified one.

Exam focus
  • The five-number summary is min, \(Q_1\), median, \(Q_3\), max. A boxplot shows it: the box covers the middle 50%, the line is the median, and the whiskers (stopping at the most extreme non-outlier) hold about 25% each; outliers get their own marks.
  • Right skew: mean \(>\) median. Left skew: mean \(<\) median. Symmetric: mean \(\approx\) median.
  • A boxplot does not show peaks or gaps; use a dotplot or histogram for those.
  • Support claims about skew or outliers with numbers: the fences, or a comparison of mean and median.
Practice
  1. Find the five-number summary of 7, 9, 11, 12, 14, 15, 18, 22 and 40, and decide whether 40 is an outlier.
    Show answer

    Median 14; lower half 7, 9, 11, 12 gives \(Q_1=10\); upper half 15, 18, 22, 40 gives \(Q_3=20\). Five-number summary: 7, 10, 14, 20, 40. \(\text{IQR}=10\), fences \(-5\) and \(35\). Since \(40>35\), it is an outlier, and the upper whisker would end at 22.

  2. A boxplot has \(Q_1=12\), median 15 and \(Q_3=25\). What does the position of the median suggest about the shape, and what would you expect for the mean compared with the median?
    Show answer

    The median is much closer to \(Q_1\) than to \(Q_3\), so the upper part of the data is more spread out: the distribution is likely skewed to the right, and the mean is likely greater than the median.

  3. A distribution is skewed to the left. Is the mean likely to be greater than, less than, or about equal to the median? Explain.
    Show answer

    Less than. The long left tail of small values pulls the mean toward the left, below the median, which is resistant to the tail.

  4. In a boxplot, about what percent of the data lie between \(Q_1\) and the median? Between the minimum whisker end and \(Q_3\)?
    Show answer

    About 25% between \(Q_1\) and the median. About 75% between the minimum (when there are no outliers) and \(Q_3\).

  5. A data set has \(Q_1=40\) and \(Q_3=52\). Find the fences used for a boxplot.
    Show answer

    \(\text{IQR}=12\), \(1.5\times12=18\), so the fences are \(40-18=22\) and \(52+18=70\). Values below 22 or above 70 would be plotted as outliers.

  6. Two histograms are very different (one is unimodal, one bimodal), yet their boxplots look identical. Explain how that is possible.
    Show answer

    A boxplot shows only the five-number summary, so two distributions with the same minimum, quartiles, median and maximum have the same boxplot even if their peaks differ. A boxplot cannot show the number of peaks or gaps.

← 1.7 Variability, units, outliers and choosing a summary1.9 Comparing distributions and standardized scores →

Keep going in the full AP Statistics course

All of U1 (Exploring One-Variable Data and Collecting Data) is free to everyone, with no account. The course has 51 lessons, each with worked examples and practice problems that come with full solutions. A free account can also start a free month of the whole course, with no card.

Open this lesson in the courseSee the whole course