Throw away the extreme quarter at each end, and measure what is left.
Test for an outlier
A data set has Q1 = 18 and Q3 = 30. Which of these values would be flagged as an outlier?
IQR = 30 − 18 = 12, and 1.5 × 12 = 18. The fences sit at 18 − 18 = 0 and 30 + 18 = 48, so only a value below 0 or above 48 is an outlier — and that is 52. A is the trap: 2 looks far from the box, but it is still above the lower fence of 0. C at 46 is close to the fence and still inside it. Being unusual-looking is not the test; crossing a fence is.
1
The IQR is the width of the middle half.
IQR = Q3 − Q1
Q1 = 18, Q3 = 30
the quartiles
IQR = 30 − 18 = 12
the box's width
Measure
What it uses
Upset by an extreme value?
Range
max − min
completely
IQR
Q3 − Q1
no
The range is decided entirely by the two most unusual values in the data. The IQR ignores the top and bottom quarters altogether, which is exactly why it is trusted.
An outlier is a value that lies far from the rest of the data. The fences turn "far" into a test: a value below the lower fence or above the upper fence is an outlier.
1.5 × 12 = 18
the fence distance
lower = 18 − 18 = 0
below this is an outlier
upper = 30 + 18 = 48
above this is an outlier
1.5 times the IQR, not 1.5 times the quartile
The distance added is 1.5 × IQR, measured outwards from each
quartile. Multiplying Q1 or Q3 itself by 1.5 is a different number entirely.
3
Worked through from raw data.
6, 9, 10, 12, 13, 15, 16, 19, 42
already sorted, n = 9
median = 13
the 5th value
Q1 = 9.5, Q3 = 17.5
middles of each half
IQR = 8, 1.5 × 8 = 12
fence distance
fences: −2.5 and 29.5
9.5 − 12 and 17.5 + 12
42 > 29.5, so 42 is an outlier
A negative lower fence is perfectly normal. It simply means no value is low enough
to be unusual.
4
An outlier drags the mean, not the median.
With the 42mean = 142 ÷ 9 ≈ 15.8median 13
Replace 42 with 20mean = 120 ÷ 9 ≈ 13.3median still 13
Effectmean moved 2.5median moved 0
This is why incomes and house prices are reported as medians. A handful of enormous values would pull a mean far above what most people actually experience.
5
Variations: a low outlier, a value on the fence, decimal data.
The same fences; each case tests the edge of the rule.
A low outlier, from an even list: 2, 31, 34, 36, 38, 40, 41, 45
Q1 = 31 + 342 = 32.5, Q3 = 40 + 412 = 40.5
halves of four
IQR = 8, 1.5 × 8 = 12
the fence distance
fences: 20.5 and 52.5
2 is an outlier
Different: outliers can sit below the lower fence too — check both ends.
Exactly on the fence: Q1 = 14, Q3 = 26. Is 44 an outlier?
upper fence = 26 + 1.5 × 12 = 44
IQR = 12
44 is not beyond 44: not an outlier
only values past a fence count
Different: the fence itself is still inside; 44.1 would be an outlier, 44 is not.
Decimal data: newborn weights with Q1 = 2.8 kg and Q3 = 3.6 kg. Is 4.9 kg an outlier?
IQR = 0.8, 1.5 × 0.8 = 1.2
keep the units: kg
fences: 1.6 kg and 4.8 kg
2.8 − 1.2 and 3.6 + 1.2
4.9 > 4.8: an outlier
just past the upper fence
Different: small decimals make the margins thin — compare carefully, digit by digit.
6
An outlier is a question, not a mistake.
Investigate before deleting anything.
Possible cause
What to do
A recording error — 175 typed as 1750
correct it
Someone outside the population
remove, and say so
A genuine extreme value
keep it — it is real data
Never drop a value just because it is inconvenient
The 1.5 × IQR rule flags a value for attention. It does not
give permission to delete it. Removing real data because it spoils a pattern is
how honest statistics becomes dishonest.
Remember the flow
Sort · Find Q1 and Q3 · IQR = Q3 − Q1 · Fences at ±1.5 × IQR · Investigate what falls outside
The IQR ignores the extreme quarters, which is precisely what makes it a fair measure of spread.
On the exam
Expect the IQR from Q1 and Q3, a lower or upper fence, "which value is an outlier" from a short list, and a question on which measure an outlier affects least. The fastest route is IQR, then 1.5 × IQR, then add it to Q3 and subtract it from Q1. The 10-second check: the fences must lie outside the box, and a value counts only if it is strictly beyond a fence.
Now you try
Practice problem
Find the upper fence
A data set has Q1 = 24 and Q3 = 40. Above which value would a data point be called an outlier?
IQR = 40 − 24 = 16, and 1.5 × 16 = 24. The upper fence is Q3 + 24 = 64. D multiplies Q3 by 1.5 instead of the IQR. B adds only one IQR rather than one and a half.
Hint: work out the IQR as a number first, then multiply that
by 1.5. Never multiply a quartile itself.