Grade by Grade
D. Statistical Analysis · One-Variable Data Analysis

Box Plots, Outliers and Their Effects

D1.3 D1.5About 70 minutes
Learning goals
  • I can draw a box plot and a modified box plot from a five-number summary.
  • I can identify outliers with the 1.5 × IQR rule and decide how to deal with them.
  • I can explain how an outlier affects the mean, median, standard deviation and IQR.
  • I can read the shape of a distribution from a box plot and compare two data sets with side-by-side box plots.

Words to know

box plot
A graph of the five-number summary: a box from Q1 to Q3 with a line at the median, and whiskers to the minimum and maximum.
modified box plot
A box plot that shows outliers as separate points; the whiskers stop at the most extreme values that are not outliers.
outlier
A value far from the rest of the data. A common rule: below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR.
fences
The cut-offs Q1 − 1.5 × IQR (lower fence) and Q3 + 1.5 × IQR (upper fence) used to identify outliers. They are not drawn on a standard box plot.
side-by-side box plots
Two or more box plots drawn on the same scale so that their centres and spreads can be compared.

One student lives a long way away

Fifteen students in a rural Ontario class recorded their one-way commute times in minutes:

5, 8, 10, 12, 12, 14, 15, 17, 18, 20, 22, 25, 28, 35, 62

One student takes 62 minutes; maybe they live on a farm at the far end of the bus route. Is that value a mistake? Should it be removed? How much does it change the summary statistics? A box plot shows the problem at a glance, and the 1.5 × IQR rule gives a consistent way to flag it.

Remember from Grade 9: a box plot draws the five-number summary; each whisker and each half of the box holds about 25% of the data; a modified box plot shows outliers as separate dots.

Drawing a box plot

  1. Find the five-number summary (lesson 8).
  2. Draw a number line with an even scale covering all the data, labelled with the variable and units.
  3. Draw a box from Q1 to Q3 and a line inside it at the median.
  4. Check for outliers with the fences: lower fence = Q1 − 1.5 × IQR, upper fence = Q3 + 1.5 × IQR.
  5. Draw whiskers out to the most extreme values inside the fences. Plot each outlier as a separate point (a modified box plot).
  6. Give the graph a title.
Worked example

Example 1: A modified box plot

Draw a modified box plot for the 15 commute times.

  1. n = 15. Median = 8th value = 17. Lower half (first 7 values): 5, 8, 10, 12, 12, 14, 15 → Q1 = 12. Upper half (last 7 values): 18, 20, 22, 25, 28, 35, 62 → Q3 = 25.
  2. IQR = 25 − 12 = 13, and 1.5 × 13 = 19.5.
  3. Lower fence = 12 − 19.5 = −7.5. No values are below it.
  4. Upper fence = 25 + 19.5 = 44.5. The value 62 is above it, so 62 is an outlier.
  5. Draw the box from 12 to 25 with the median at 17. The left whisker goes to 5. The right whisker stops at 35, the largest value that is not an outlier. Plot 62 as a separate point.

Five-number summary 5, 12, 17, 25, 62; IQR 13; 62 is an outlier; the right whisker ends at 35.

Modified box plot: 15 commute times512172535010203040506070commute time (minutes)upper fence 44.5outlier 62
The whisker stops at 35, the largest value inside the upper fence (44.5). The outlier 62 is drawn as its own open circle. (The dashed fence line is shown here to explain the rule; it is not normally drawn.)

How much does one outlier matter?

Compare the statistics with and without the 62-minute commute:

  • Mean: 20.2 min with it, about 17.2 min without. It moved by 3 minutes.
  • Median: 17 with it, 16 without. It moved by 1 minute.
  • Sample standard deviation: about 14.0 min with it, about 8.2 min without. It almost doubled!
  • IQR: 13 with it, 10 without (Q1 = 12, Q3 = 22). A moderate change, mostly because removing a value shifts the halves.

The mean and especially the standard deviation are sensitive to outliers. The median and IQR are resistant. This is why skewed data or data with outliers is usually summarized with the median and IQR.

What should you do with an outlier?

Never delete an outlier just because it is inconvenient. First ask why it is there.

  • A recording error (a commute of 620 minutes, a height of 17 m)? Correct it if you can find the true value; otherwise remove it and say so in your report.
  • A genuine but unusual value? Keep it. Report it, and consider giving summary statistics both with and without it, or use resistant statistics (median, IQR).
  • From a different population (a teacher's commute in a student survey)? It may belong in a separate analysis.

Outliers are sometimes the most interesting data: unusual results have led to real discoveries in science and medicine.

Worked example

Example 2: Reading shape from a box plot

A box plot of house prices in a town (in thousands of dollars) has minimum 310, Q1 = 420, median = 470, Q3 = 610, maximum 1 450. Describe the shape and check for outliers.

  1. Box: the median (470) is much closer to Q1 (420) than to Q3 (610): the right half of the box (140) is almost 3 times the left half (50).
  2. Whiskers: left whisker 420 − 310 = 110; right whisker 1 450 − 610 = 840, much longer.
  3. Shape: both clues point to a long right tail: skewed right.
  4. Outliers: IQR = 610 − 420 = 190; upper fence = 610 + 1.5(190) = 895. The maximum 1 450 is above 895, so at least one high-priced house is an outlier. (Lower fence = 420 − 285 = 135; 310 is above it.)

Skewed right, with at least one outlier on the high side. For this town, the median price (470 thousand) is the right summary, not the mean.

Comparing two data sets: side-by-side box plots

Draw two box plots on the same scale and compare:

  1. Centre: which median is higher?
  2. Spread: which box (IQR) and which range is wider?
  3. Shape: where is each median inside its box, and which whiskers are long?
  4. Outliers: any unusual values?
  5. Overlap: a useful rough rule: if one box is entirely above the other's median, the groups really do differ in a typical value.

Finish with a conclusion in context, not just numbers.

Side-by-side box plots: two classes, same testClass A526674.58296Class B4561708198405060708090100test mark (%)
Class A's box is shifted a little higher than Class B's (Q1 66 vs 61, median 74.5 vs 70). Class B's range and IQR are wider. The boxes overlap a lot, so the difference in typical marks is modest.
Worked example

Example 3: Writing a comparison

Using the two classes' test marks from lesson 3 (five-number summaries A: 52, 66, 74.5, 82, 96 and B: 45, 61, 70, 81, 98), write a comparison.

  1. Centre: median A = 74.5, median B = 70. A typical student in Class A scored about 4.5 marks higher.
  2. Spread: IQR A = 16, IQR B = 20; range A = 44, range B = 53. Class B's marks are more spread out.
  3. Shape: both medians sit near the middle of their boxes and the whiskers are similar in length: both distributions are roughly symmetric.
  4. Outliers: fences for A: 66 − 24 = 42 and 82 + 24 = 106; for B: 61 − 30 = 31 and 81 + 30 = 111. No outliers in either class.
  5. Overlap: Class A's box (66 to 82) contains Class B's median (70), so the boxes overlap a lot: the difference is real in these data but modest.

"Class A generally did better (median 74.5 vs 70) and was more consistent (IQR 16 vs 20). Both distributions are roughly symmetric with no outliers. Class B had both the lowest (45) and the highest (98) individual marks."

What a box plot hides

A box plot shows only five numbers (plus outliers). It cannot show gaps, clusters or two peaks: a bimodal data set can have a perfectly ordinary-looking box plot. It also hides the sample size. For a full picture, look at a histogram or dot plot as well.

Just for fun

Outliers at a party: the guest who arrived 62 minutes after everyone else is not necessarily wrong. They might just have taken the long bus route. Check before you remove anyone from the data!

Hands-on activity

Box plots from the kitchen: popcorn timing

You need: a timer, a package of microwave popcorn or a pot for stovetop popcorn (a grown-up should handle the hot pot and steam), a bowl, paper and a pencil. Alternative without cooking: time 20 tries at stacking 10 coins into a tower.

  1. While the popcorn pops, listen and record the time (in seconds) between each pop and the next for 25 consecutive pops, using the stopwatch's lap button. (For the coin version, record the time of each of 20 tries.)
  2. Find the five-number summary, the IQR and the fences.
  3. Draw a modified box plot.
  4. Describe the shape and any outliers. Can you explain any outliers (a long gap at the very start or end)?
  5. Find the mean and median with and without the outliers.

What to look for: gaps between pops are usually short in the middle of popping and long at the start and end, so the data is often skewed right with high outliers. Removing the outliers should change the mean much more than the median.

Your turn

1

Data: 2, 4, 5, 6, 7, 8, 9, 11, 24. Find the five-number summary, IQR and fences, and identify any outliers.

2

For the data in question 1, where does the right whisker end on a modified box plot?

3

For the data in question 1, find the mean with and without 24, and the median with and without 24.

4

A box plot has Q1 = 30, median = 32, Q3 = 45, left whisker to 26 and right whisker to 70. Describe the shape.

5

Why should the two box plots in a comparison share a scale?

6

Name two features of a data set that a box plot cannot show.

More practice: warm-up

1

What does the line inside the box of a box plot show?

2

About what percent of the data lies inside the box?

3

Q1 = 20 and Q3 = 30. Find the upper fence.

4

Is the median resistant to outliers?

5

In a modified box plot, how is an outlier shown?

More practice: on your own

1

Data (n = 12): 41, 45, 47, 48, 50, 51, 53, 54, 56, 58, 60, 79. Find the five-number summary and test for outliers.

2

A survey of weekly allowance recorded one value of $5 000. The next largest is $60. What should the analyst do?

3

Box plots of commute times: Town X median 22, IQR 8; Town Y median 22, IQR 20. Write one comparison sentence.

4

Explain why the standard deviation changes more than the IQR when an outlier is removed.

5

Is it possible for a data set to have an outlier at the low end only? Give an example.

Challenge

1

Construct a data set of 8 values with five-number summary 10, 20, 25, 30, 40 and no outliers. Then add one value that would be an outlier and explain how you know.

2

A data set has mean 50, standard deviation 5, median 49 and IQR 7. One value of 150 is then added to the 100 values. Which of the four statistics change a lot, and which barely change? Estimate the new mean.

3

Two hospital emergency departments have the same median wait (95 min). Department P's box plot has a much longer right whisker and three high outliers. As a patient, which would you prefer and why? What other information would you want?

Check your understanding

Quiz

1.

In a modified box plot, where does the upper whisker end?

2.

Q1 = 14 and Q3 = 22. Which value is an outlier by the 1.5 × IQR rule?

3.

On a box plot, what does the length of the box show?

4.

Which statistic is most affected by a single extreme outlier?

5.

A box plot's median is close to Q3 and its left whisker is long. The distribution is most likely

6.

A recorded height of 17 m appears in a data set of Grade 12 students. The best action is to

For parents and teachers

Big idea (D1.3, D1.5): box plots summarize centre, spread, shape and outliers in one picture and are excellent for comparing groups. Outliers must be investigated, not automatically deleted, and they affect the mean and standard deviation much more than the median and IQR.

How to help: Ask your teen to explain one comparison of two box plots in a full sentence that mentions centre, spread, shape and outliers, and ends with what it means in real life.

Common difficulties:

  • Drawing the whisker to the outlier (or to the fence) in a modified box plot.
  • Forgetting to leave the median out of the halves when n is odd.
  • Deleting outliers without a reason, or without reporting it.
  • Comparing box plots drawn on different scales.