Identifying Outliers
Using the Fences
A data set has $Q_1 = 20$ and $Q_3 = 30$. Which of the values $2$, $18$, $44$ and $50$ are outliers?
Find the IQR: $\text{IQR} = Q_3 - Q_1 = 30 - 20$ = $\text{IQR} = 10$
Multiply the IQR by 1.5: $1.5 \times 10$ = $15$
Find the lower fence: $Q_1 - 15 = 20 - 15$ = Lower fence $= 5$
Find the upper fence: $Q_3 + 15 = 30 + 15$ = Upper fence $= 45$
Compare each value with the fences: $2 < 5$ (outside), $18$ and $44$ are between $5$ and $45$ (inside), $50 > 45$ (outside) = Outliers: $2$ and $50$
Answer: Only $2$ and $50$ are outliers. The values $18$ and $44$ lie inside the fences $5$ and $45$.
Finding an Outlier from Raw Data
Quiz scores (out of 20) in a small group: $3, 12, 13, 14, 15, 15, 16, 17, 18$. Is there an outlier?
Find the median: The data is ordered. With 9 values, the median is the 5th value. = Median $= 15$
Find $Q_1$ (median of the lower half, without the median): Lower half: $3, 12, 13, 14$. $(12 + 13) \div 2$ = $Q_1 = 12.5$
Find $Q_3$ (median of the upper half): Upper half: $15, 16, 17, 18$. $(16 + 17) \div 2$ = $Q_3 = 16.5$
Find the IQR and $1.5 \times \text{IQR}$: $\text{IQR} = 16.5 - 12.5 = 4$, and $1.5 \times 4 = 6$ = $1.5 \times \text{IQR} = 6$
Build the fences: Lower: $12.5 - 6 = 6.5$. Upper: $16.5 + 6 = 22.5$ = Fences: $6.5$ and $22.5$
Check every value: $3 < 6.5$. All other values lie between $6.5$ and $22.5$. = $3$ is an outlier
Answer: The score $3$ is a (low) outlier. Outliers can be small values too, not only big ones.
An Outlier Pulls the Mean, Not the Median
Kai's bus rides took $12, 14, 15, 16, 18$ minutes. Then one day the bus broke down and the ride took $51$ minutes. Compare the mean, median and range before and after.
Mean and median without 51: Mean $= (12 + 14 + 15 + 16 + 18) \div 5 = 75 \div 5$. Median: middle value. = Mean $= 15$, median $= 15$
Mean with 51: $(75 + 51) \div 6 = 126 \div 6$ = Mean $= 21$
Median with 51: 6 values: $12, 14, 15, 16, 18, 51$. Median $= (15 + 16) \div 2$ = Median $= 15.5$
Range before and after: Before: $18 - 12 = 6$. After: $51 - 12 = 39$ = Range: $6 \to 39$
Check that 51 is an outlier: $Q_1 = 14$, $Q_3 = 18$, $\text{IQR} = 4$. Upper fence $= 18 + 1.5 \times 4 = 24$, and $51 > 24$ = $51$ is an outlier
Answer: One outlier moved the mean from $15$ to $21$ minutes and the range from $6$ to $39$, but the median only moved from $15$ to $15.5$. The median still describes a typical ride.
Outliers on Both Sides in a Box Plot
A weather station recorded these midday temperatures (°C) over 11 summer days: $2, 21, 23, 24, 25, 26, 27, 28, 29, 30, 52$. Find the outliers and describe the box plot.
Find the median: 11 values, so the median is the 6th value = Median $= 26$
Find $Q_1$ and $Q_3$: Lower half $2, 21, 23, 24, 25$ gives $Q_1 = 23$. Upper half $27, 28, 29, 30, 52$ gives $Q_3 = 29$ = $Q_1 = 23$, $Q_3 = 29$
IQR and $1.5 \times \text{IQR}$: $\text{IQR} = 29 - 23 = 6$, $1.5 \times 6 = 9$ = $9$
Fences: Lower: $23 - 9 = 14$. Upper: $29 + 9 = 38$ = Fences: $14$ and $38$
Outliers: $2 < 14$ and $52 > 38$ = Outliers: $2$ and $52$
Whiskers of the box plot: The whiskers stop at the smallest and largest values inside the fences = Whiskers from $21$ to $30$, dots at $2$ and $52$
Answer: The outliers are $2$ and $52$. The box goes from $23$ to $29$ with the median at $26$, the whiskers go from $21$ to $30$, and $2$ and $52$ are drawn as separate dots. A reading of $52°C$ on a normal summer day is almost certainly a sensor error.
Error or Real Value?
Heights of 7 students in cm: $148, 152, 155, 158, 160, 163, 1630$. What should you do with $1630$?
Find $Q_1$ and $Q_3$: Median $= 158$. Lower half $148, 152, 155$ gives $Q_1 = 152$. Upper half $160, 163, 1630$ gives $Q_3 = 163$ = $Q_1 = 152$, $Q_3 = 163$
Find the upper fence: $\text{IQR} = 11$, $1.5 \times 11 = 16.5$, $163 + 16.5$ = Upper fence $= 179.5$
Is 1630 an outlier?: $1630 > 179.5$ = Yes, an outlier
Ask: is the value possible?: $1630$ cm is $16.3$ m, taller than a five-storey house. No student is that tall. = It is an error
Decide: A typing mistake (an extra zero) is likely. Check the original record: if it says $163$, correct it. = Correct it to $163$
Answer: $1630$ is an outlier and also an impossible value, so it is a recording error. Correct it if you can find the true value; otherwise remove it and say so. Real outliers (a very tall but possible student) stay in the data.
Mistake: Using $Q_3 + \text{IQR}$ instead of $Q_3 + 1.5 \times \text{IQR}$
Why: Forgetting the factor $1.5$ makes the fences too close to the box, so ordinary values get marked as outliers.
Correct: Always multiply first: $1.5 \times \text{IQR}$, then subtract it from $Q_1$ and add it to $Q_3$.
Mistake: Building the fences from the median, the minimum or the maximum
Why: The rule measures distance from the box, and the box ends at $Q_1$ and $Q_3$.
Correct: Lower fence $= Q_1 - 1.5 \times \text{IQR}$, upper fence $= Q_3 + 1.5 \times \text{IQR}$. Never start from the median or the extremes.
Mistake: Drawing the whisker all the way to the outlier
Why: Then the outlier looks like part of the normal spread, and the box plot hides it.
Correct: The whisker ends at the largest (or smallest) value that is not an outlier. Draw each outlier as a separate dot.
Mistake: Deleting every outlier automatically
Why: An outlier can be a real and important value, like a record time or a very large order.
Correct: Remove or correct a value only when it is an error (typo, broken instrument, wrong unit). Keep real outliers and report them, or use the median and IQR.
Spotting Card Fraud
Banks compare each new card payment with the customer's usual payments. A payment above the upper fence can trigger a security check.
A customer's payments have $Q_1 = 20$ dollars and $Q_3 = 60$ dollars. A payment of 450 dollars is far above the upper fence, so the bank sends a text message to confirm it.
Quality Control in a Factory
Juice bottles should all hold about the same amount. Bottles below the lower fence are taken off the line and checked.
If most bottles hold between 498 mL and 502 mL, a bottle with 480 mL is clearly underfilled and the machine may need repair.
Reporting a Typical Salary
News reports often give the median salary instead of the mean, because a few very high salaries pull the mean up.
In a small company, five employees earn between 30 and 38 thousand dollars a year and the owner earns 160 thousand dollars. The owner's salary is an outlier.
An **outlier** is a value unusually far from the rest of the data, either very small or very large
**1.5 × IQR rule**: lower fence $= Q_1 - 1.5 \times \text{IQR}$, upper fence $= Q_3 + 1.5 \times \text{IQR}$
Values below the lower fence or above the upper fence are outliers; a value exactly on a fence is not
In a box plot, outliers are separate dots and the whiskers stop at the last values inside the fences
Outliers pull the **mean** and stretch the **range**, while the **median** and **IQR** barely change
Correct or remove an outlier only if it is an error; keep real outliers and report them
Q: Why 1.5 and not 1 or 2?
A: The factor $1.5$ was chosen by the statistician John Tukey because it works well in practice: it flags values that are really unusual without marking too many ordinary values. Some books also use $3 \times \text{IQR}$ for "extreme" outliers.
Q: Can a data set have no outliers, or more than one?
A: Yes to both. Many data sets have no outliers at all, and some have several, on one side or on both sides (like the temperatures $2$ and $52$ in the examples).
Q: Is the minimum or maximum always an outlier?
A: No. The minimum and maximum are just the smallest and largest values. They are outliers only if they lie outside the fences. For example, in $60, 65, 70, 72, 75, 78, 80, 95$ the upper fence is $96.25$, so the maximum $95$ is not an outlier.
Q: Is there another way to find outliers?
A: Yes. With the standard deviation you can measure how many standard deviations a value is from the mean (its z-score). Values more than 2 or 3 standard deviations away are often called unusual. The 1.5 × IQR rule is used for box plots because it does not depend on the mean, which outliers distort.
Identifying Outliers
1 / 14
Identifying Outliers
Learn what an outlier is, how to find it with the 1.5 × IQR rule, and how it changes the mean, median and range.