Mathematics.

descriptive statistics

Box Plots and Outliers

Statistics20 minDifficulty2 out of 10

You should know: descriptive statistics

Overview

A box plot (or box-and-whisker plot) is a graphical summary of a data set's distribution using five key numbers: the minimum, first quartile (Q1), median, third quartile (Q3), and maximum. The 'box' spans from Q1 to Q3 (the interquartile range, IQR), with a line marking the median; 'whiskers' extend to the smallest and largest values within 1.5×IQR of the box. Values falling beyond 1.5×IQR from the nearest quartile are commonly flagged as outliers and plotted as individual points rather than included in the whiskers. Box plots make it easy to compare the spread, skewness, and central tendency of several data sets side by side, and to visually flag potential outliers for further investigation.

Intuition

The IQR captures the spread of the 'middle 50%' of the data, which is fairly resistant to extreme values (unlike the range or standard deviation). Multiplying the IQR by 1.5 and extending it past each quartile creates a reasonable buffer for typical variation; any point falling outside that buffer is flagged as unusually far from the bulk of the data — an outlier worth a second look, whether it's a data-entry error or a genuinely rare event.

Formal Definition

Definition

For an ordered data set with first quartile Q1 and third quartile Q3:

IQR=Q3Q1IQR = Q_3 - Q_1
Interquartile range
Lower fence=Q11.5×IQR\text{Lower fence} = Q_1 - 1.5 \times IQR
Lower outlier threshold
Upper fence=Q3+1.5×IQR\text{Upper fence} = Q_3 + 1.5 \times IQR
Upper outlier threshold

Worked Examples

  1. The median (4th of 7 values) is 7. Lower half (excluding median): {2,4,5}, so Q1 is the median of that: 4. Upper half: {8,9,20}, so Q3 is the median of that: 9.

    Q1=4,Q3=9Q_1 = 4, \quad Q_3 = 9
  2. Compute the IQR.

    IQR=94=5IQR = 9 - 4 = 5

Answer: Q1 = 4, Q3 = 9, IQR = 5.

Practice Problems

Difficulty 2/10

If Q1 = 10 and Q3 = 22, find the IQR and the upper fence.

Difficulty 3/10

If Q1 = 15 and Q3 = 25, find the lower fence. Is the value 5 an outlier?

Difficulty 5/10

A data set of household incomes has Q1 = $40,000 and Q3 = $70,000. A household reports $200,000. Determine if this is an outlier by the 1.5×IQR rule, and explain why box plots are useful for skewed data like income.

Quiz

In a box plot, the 'box' spans from:
By the common 1.5×IQR rule, a data point is flagged as an outlier if it falls:
Box plots are especially useful for comparing multiple data sets because they:

Summary

  • A box plot displays the five-number summary: minimum, Q1, median, Q3, and maximum, with whiskers typically bounded at 1.5×IQR from the box.
  • The interquartile range IQR = Q3 − Q1 measures the spread of the middle 50% of the data and is resistant to extreme values.
  • Points beyond 1.5×IQR past Q1 or Q3 are commonly flagged as outliers, worth investigating as errors or genuinely rare observations.

References