Tutorials › AP Statistics › Applying the 1.5 IQR Rule for Outliers

Graphs for quantitative data · Tutorial 72 of 1000

Applying the 1.5 IQR Rule for Outliers

Use the quartiles to calculate outlier fences, flag unusual observations, and show them correctly on a modified boxplot.

Beginner 9 min read

What You'll Learn

  • Calculate the interquartile range from the first and third quartiles.
  • Find the lower and upper fences using the 1.5 IQR rule.
  • Decide whether observations fall beyond either fence.
  • Identify the whisker endpoints on a modified boxplot.
  • Plot flagged observations separately and explain what the rule does and does not establish.

From a Boxplot to Outlier Fences

In Five-Number Summary and Boxplot Construction, you used the minimum, \(Q_1\), median, \(Q_3\), and maximum to draw a basic boxplot. A modified boxplot adds a useful feature: it identifies observations that are unusually far from the middle of the data by the 1.5 IQR rule. Those flagged observations are plotted individually, and the whiskers stop at the most extreme observations that are not flagged.

The rule uses the quartiles and the spread of the middle half of the data. It is a consistent way to flag possible outliers, not a test that proves an observation is incorrect or explains why it is unusual. Keep every observation in the data while applying the rule; do not delete a value just because it falls beyond a fence.

Definition: The interquartile range, or IQR, is the difference between the third quartile and the first quartile. It measures the spread of the middle 50% of the data. The 1.5 IQR rule flags an observation as a possible outlier when it is strictly below the lower fence or strictly above the upper fence.

Calculate the Fences

The lower fence is \(1.5\) IQR below \(Q_1\), and the upper fence is \(1.5\) IQR above \(Q_3\). Calculate the IQR first, then use it in both fence formulas. The fences are cutoffs for checking the observations; they do not need to be actual data values.

$$ \begin{aligned} \text{IQR} &= Q_3-Q_1\\ \text{Lower fence} &= Q_1-1.5(\text{IQR})\\ \text{Upper fence} &= Q_3+1.5(\text{IQR}) \end{aligned} $$

After finding the fences, compare every observation with them. A value less than the lower fence or greater than the upper fence is flagged. A value exactly equal to a fence is not beyond it, so it is not flagged by this rule. The lower and upper fences can be decimals even when all the observations are whole numbers.

For 15 observations, continue to use the quartile positions from the previous tutorial: \(Q_1\) is the 4th ordered value, the median is the 8th, and \(Q_3\) is the 12th. Keep repeated observations in the ordered list as you count positions. Once you have the quartiles, finding fences does not require any new way of locating them.

Formula: Calculate \(Q_3-Q_1\), multiply that IQR by \(1.5\), subtract the result from \(Q_1\) for the lower fence, and add it to \(Q_3\) for the upper fence. Flag only observations strictly outside the two fences.

How the Rule Changes a Boxplot

In the basic boxplot constructed in the previous tutorial, the whiskers extended to the minimum and maximum. In a modified boxplot, the box still extends from \(Q_1\) to \(Q_3\), and the median is still marked inside it. The difference is how the whiskers and possible outliers are shown.

The lower whisker reaches the smallest observation that is not below the lower fence. The upper whisker reaches the largest observation that is not above the upper fence. Any observations beyond either fence are plotted separately, often as individual dots or asterisks. If a fence does not flag any observations at an end, the whisker reaches the minimum or maximum at that end.

1
Find the quartiles.
Use the ordered data and the quartile convention established for the data set to identify \(Q_1\) and \(Q_3\).
2
Calculate the IQR and fences.
Subtract \(Q_1\) from \(Q_3\), then calculate the lower and upper fences.
3
Check the observations.
Flag values below the lower fence or above the upper fence. A value on a fence is not outside it.
4
Draw the modified boxplot.
Draw the box from \(Q_1\) to \(Q_3\), mark the median, extend whiskers to the most extreme non-outliers, and plot flagged observations individually.

The fences are calculated from the quartiles, but a whisker ends at an observed data value, not at a fence. For example, if the upper fence is 43.5 and the largest non-outlier is 31, the upper whisker ends at 31. It does not extend to 43.5. Label the variable and its units, and place all boxplot marks accurately on a numerical scale.

Worked Example: Evening Reading Times

Worked Example: Evening Reading Times

A fictional group of 15 students records how many minutes they read one evening. Use the 1.5 IQR rule to find possible outliers and describe the modified boxplot.

State. We will identify any reading times beyond the 1.5 IQR fences and determine where the modified boxplot’s whiskers and separate points belong.

Plan. The observations are ordered below. For 15 values, use positions 4, 8, and 12 for \(Q_1\), the median, and \(Q_3\), respectively, as in Five-Number Summary and Boxplot Construction. Calculate the IQR and both fences, then compare each observation with the fences.

Do. The ordered reading times, in minutes, are:

\(12, 14, 15, 16, 18, 19, 21, 22, 23, 24, 26, 27, 29, 31, 60\)

The 4th value is \(Q_1=16\), the 8th is the median \(22\), and the 12th is \(Q_3=27\). The IQR is \(27-16=11\) minutes. The fences are:

$$ \begin{aligned} \text{Lower fence} &=16-1.5(11)=16-16.5=-0.5\text{ minutes}\\ \text{Upper fence} &=27+1.5(11)=27+16.5=43.5\text{ minutes} \end{aligned} $$

The smallest observation, 12, is greater than \(-0.5\), so it is not below the lower fence. The observations through 31 are all less than 43.5. The largest value, 60, is greater than 43.5, so it is flagged as a possible outlier. The IQR calculation checks: \(27-16=11\), and \(1.5(11)=16.5\); adding or subtracting 16.5 gives the stated fences.

Conclude. The 60-minute reading time is flagged by the 1.5 IQR rule. In a modified boxplot, draw the box from 16 to 27 minutes and mark the median at 22 minutes. The lower whisker reaches 12 minutes, and the upper whisker reaches 31 minutes, the largest observation that is not flagged. Plot 60 minutes separately and label the axis “Reading time (minutes).”

Worked Example: Minutes to Complete a Puzzle

Worked Example: Minutes to Complete a Puzzle

A fictional class records the time, in minutes, that 15 students take to complete a puzzle. Determine whether the rule flags any observations and explain the modified boxplot.

The ordered times are:

\(4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17\)

For 15 observations, \(Q_1\) is the 4th value, 7; the median is the 8th value, 10; and \(Q_3\) is the 12th value, 14. The IQR is \(14-7=7\) minutes. The amount added to and subtracted from the quartiles is \(1.5(7)=10.5\) minutes.

$$ \begin{aligned} \text{Lower fence} &=7-10.5=-3.5\text{ minutes}\\ \text{Upper fence} &=14+10.5=24.5\text{ minutes} \end{aligned} $$

The minimum, 4, is above \(-3.5\), and the maximum, 17, is below 24.5. Every value lies between the fences, so the 1.5 IQR rule flags no possible outliers. As a check, the fence distance is \(10.5\), and \(7-10.5=-3.5\) while \(14+10.5=24.5\).

Draw the modified boxplot with a box from 7 to 14 minutes and a median line at 10 minutes. Since no observations are flagged, the whiskers extend to the minimum of 4 and the maximum of 17. There are no separate outlier points. A negative lower fence is possible even though a negative completion time would not make sense in context; the fence is a calculation cutoff, not a claim that such a time could occur.

Worked Example: A Low Water-Use Reading

Worked Example: A Low Water-Use Reading

A fictional community garden tracks daily water use, in liters, for 15 days. Apply the 1.5 IQR rule and describe how to mark any flagged value on a modified boxplot.

The ordered daily amounts are:

\(0, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31\)

The 4th value gives \(Q_1=20\) liters, the 8th gives a median of 24 liters, and the 12th gives \(Q_3=28\) liters. Thus, \(\text{IQR}=28-20=8\) liters, and \(1.5(\text{IQR})=1.5(8)=12\) liters.

$$ \begin{aligned} \text{Lower fence} &=20-12=8\text{ liters}\\ \text{Upper fence} &=28+12=40\text{ liters} \end{aligned} $$

The value 0 is below 8, so it is flagged. The remaining values, from 18 through 31, are within the fences. The arithmetic can be checked by noting that the IQR is 8 and 12 is \(1.5\) times 8; subtracting 12 from 20 gives 8, and adding 12 to 28 gives 40.

For the modified boxplot, draw the box from 20 to 28 liters, mark the median at 24, and plot 0 separately. The lower whisker ends at 18, the smallest observation that is not flagged, while the upper whisker ends at 31. Label the scale “Daily water use (liters).” The low reading is a possible outlier under this rule, but the rule alone does not tell us whether it was a measurement error, a day when little water was needed, or another unusual circumstance.

What an Outlier Flag Does—and Does Not—Mean

The 1.5 IQR rule is a descriptive rule for identifying values that are far from the middle half of a distribution. “Possible outlier” is careful wording: the rule marks a value for attention, but it does not establish a cause. A flagged value may be correct and meaningful, or it may reflect a recording or measurement problem. Check the context and the original information before drawing conclusions about it.

Do not automatically remove flagged values before describing the distribution. Removing a real observation changes the data and can change the quartiles, IQR, and fences. If a value is excluded for a justified reason, explain that reason and be clear about which data are being summarized. Also, a data set can contain an unusual-looking value that is not beyond a fence, or have no flagged values at all; the rule uses the quartiles and IQR rather than visual judgment alone.

Common Mistakes and AP Exam Tips

  • Using the range instead of the IQR. The rule uses \(Q_3-Q_1\), not the maximum minus the minimum. Show the quartiles and the IQR calculation.
  • Adding and subtracting from the wrong quartile. Subtract \(1.5(\text{IQR})\) from \(Q_1\) for the lower fence; add it to \(Q_3\) for the upper fence.
  • Flagging a value on a fence. The rule flags values strictly below or strictly above the fences. State the comparison clearly, especially if a value equals a fence.
  • Drawing whiskers all the way to the minimum and maximum automatically. In a modified boxplot, a whisker ends at the most extreme non-outlier. Plot flagged observations separately.
  • Drawing the whisker to the fence. A fence is a cutoff, not an observed data value. The whisker endpoint is an actual observation within the fence.
  • Calling a flagged value an error or deleting it without explanation. The rule identifies a possible outlier; it does not establish why the observation is unusual or whether it should be excluded.
  • Leaving out context or units. A complete explanation reports the fences and flagged observation in the variable’s context, and a boxplot should have a labeled scale and units.

For a full-credit response, show \(Q_1\), \(Q_3\), the IQR, and both fence calculations. Identify the observation or observations that fall beyond a fence, or state that none do. When asked to draw a modified boxplot, keep the box and median at their five-number-summary positions, extend whiskers only to the most extreme non-outliers, and plot flagged observations individually. Give the conclusion in context and describe them as possible outliers rather than automatically treating them as mistakes.

Key takeaway: Calculate \(\text{IQR}=Q_3-Q_1\), then find fences at \(Q_1-1.5(\text{IQR})\) and \(Q_3+1.5(\text{IQR})\). Flag only observations strictly outside the fences; on a modified boxplot, show those points separately and end the whiskers at the most extreme non-outliers.

Check Your Understanding

Use the 1.5 IQR rule and explain how its results affect a modified boxplot.

  1. If \(Q_1=12\) and \(Q_3=20\), calculate the IQR and both fences.
  2. Suppose the lower fence is 5 and an observation is exactly 5. Is it flagged by the rule? Explain.
  3. For the ordered list \(2, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 40\), use the 15-observation position guide to find \(Q_1\), the median, and \(Q_3\). Then calculate both fences and identify any flagged observation.
  4. If a modified boxplot has a flagged maximum, where does the upper whisker end?
  5. Why does a flagged observation not, by itself, prove that a value is a recording error?