Unit 1 · Topic 1.8 Beta

Graphical Representations of Summary Statistics for One Quantitative Variable

3 min read · freeNot practiced

Topic 1.7 gave you quartiles, the median and a rule for outliers. A boxplot turns those numbers into a picture. It is quick to draw, easy to compare across groups, and it shows skew and outliers clearly. It also hides a lot, and knowing what it hides is part of reading it well.

The five-number summary

The five-number summary is the minimum, Q1Q_1, the median, Q3Q_3 and the maximum. These five numbers cut the ordered data into four parts with about a quarter of the values in each: below Q1Q_1, from Q1Q_1 to the median, from the median to Q3Q_3, and above Q3Q_3.

Find the five numbers. Seven values in order: 3, 5, 7, 8, 12, 13, 14.

Median: the 4th value, 8.

With n odd, leave the median out of both halves. Lower half 3, 5, 7: Q1=5Q_1 = 5. Upper half 12, 13, 14: Q3=13Q_3 = 13.

Five-number summary: 3, 5, 8, 13, 14.

Drawing a boxplot

  1. Draw a number line for the variable, with units.
  2. Draw a box from Q1Q_1 to Q3Q_3 and a line across it at the median.
  3. Compute the fences, Q1−1.5×IQRQ_1 - 1.5 \times \text{IQR} and Q3+1.5×IQRQ_3 + 1.5 \times \text{IQR}. Do not draw them; use them to sort the values.
  4. Draw each whisker from the box out to the most extreme data value inside its fence.
  5. Mark every value beyond a fence as a separate point: these are the outliers.
Commute times of 20 workers in minutes. Top: a dotplot from 8 to 62. Bottom: the boxplot of the same data on the same scale. The box runs from Q1 = 14.5 to Q3 = 28.5 with the median at 20.5. The upper fence is at 49.5, so 62 is an outlier, drawn as an open circle, and the right whisker stops at 38, the largest value inside the fence. The left whisker reaches the minimum, 8.
Figure 1. A dotplot and a boxplot of the same 20 commute times. The boxplot keeps five numbers and the outlier. LevlPrep original diagram.

Build the boxplot. The commute times of 20 workers, in minutes: 8, 10, 12, 12, 14, 15, 16, 18, 18, 20, 21, 22, 24, 25, 27, 30, 32, 35, 38, 62.

Median: average of the 10th and 11th values, 20+212=20.5\frac{20 + 21}{2} = 20.5.

Q1Q_1: the lower 10 values have median 14+152=14.5\frac{14 + 15}{2} = 14.5. Q3Q_3: the upper 10 have median 27+302=28.5\frac{27 + 30}{2} = 28.5.

IQR=28.5−14.5=14\text{IQR} = 28.5 - 14.5 = 14. Fences: 14.5−1.5(14)=−6.514.5 - 1.5(14) = -6.5 and 28.5+1.5(14)=49.528.5 + 1.5(14) = 49.5.

62 is above 49.5, so it is an outlier. The right whisker stops at 38, the largest value inside the fence; the left whisker reaches the minimum, 8.

Reading a boxplot

  • Center: the median line. It is the median, not the mean; a boxplot does not show the mean.
  • Spread: the length of the box is the IQR; from the end of one whisker (or the farthest outlier) to the other is the range.
  • Quarters: about 25% of the values lie in each whisker section and in each half of the box. So "about half the workers commute between 14.5 and 28.5 minutes", and "about a quarter commute longer than 28.5 minutes".
  • Skew: a longer whisker on one side and the median closer to the other end of the box suggest skew toward the long side. Above, the right whisker and the outlier stretch far to the right: skewed right.
  • Outliers: points beyond the whiskers, by the 1.5×IQR1.5 \times \text{IQR} rule.

A longer section does not hold more values. Each quarter holds about the same number of values; a longer section means those values are more spread out.

What a boxplot cannot show

Everything inside the box and along the whiskers is hidden. Two very different data sets can have the same boxplot: one with values spread evenly, another with two clumps and a gap. So a boxplot cannot show how many peaks a distribution has, or gaps and clusters. Saying a boxplot is "unimodal" or "bell-shaped" is a classic exam error. If you need the shape in detail, use a dotplot or a histogram; if you need to compare groups quickly, the boxplot is the tool of choice.

A boxplot showsA boxplot hides
median, quartiles, minimum and maximumthe mean and standard deviation
IQR and rangehow many values there are
skew, roughlypeaks, gaps and clusters
outliers by the 1.5×IQR1.5 \times \text{IQR} ruleindividual values inside the fences

Spot a mistake on this page?