Nine employees earn between $45,000 and $65,000. A tenth earns $2,000,000 — the company’s founder, who kept a token salary on the books for tax reasons. Report the mean salary and you’d claim the average employee earns over $250,000, a number that describes literally none of the ten people in the dataset. This is the practical danger of an outlier: a single unusual value that can distort summary statistics badly enough to actively mislead, if it isn’t identified and handled deliberately.
What Is an Outlier?
An outlier is an observation that lies an abnormal distance from the rest of the values in a dataset. There’s no single universal definition of “abnormal” — instead, statisticians use several standard, quantitative rules to flag candidate outliers, so that the decision doesn’t rest purely on eyeballing a chart.
It’s worth being precise about what an outlier is not: it is not automatically an error. Some outliers are data-entry mistakes or equipment malfunctions that should be corrected or removed. Others are genuine, important extreme values — a market crash, a record-breaking athletic performance, a rare disease case — that carry real information and should never simply be deleted. Distinguishing between these two cases requires judgement, not just a formula, but the formulas below are how you first find the candidates worth investigating.
Method 1: The IQR (Interquartile Range) Method
The IQR method uses quartiles, covered earlier in this series, to define a “normal” range and flag anything outside it. Recall that the interquartile range is IQR = Q3 − Q1, the spread of the middle 50% of the data. The standard outlier fences are:
Lower fence = Q1 − 1.5 × IQR Upper fence = Q3 + 1.5 × IQR
Any value below the lower fence or above the upper fence is flagged as a potential outlier. The multiplier 1.5 is a widely used convention (introduced by statistician John Tukey), not a law of nature — some analysts use 3.0 for a stricter “extreme outlier” threshold, flagging only the most severe cases.
Worked Example: IQR Method
Consider the dataset: 12, 14, 15, 16, 18, 19, 20, 21, 45. Is 45 an outlier?
With 9 ordered values, Q1 is the value at position (9+1)/4 = 2.5, interpolating between the 2nd (14) and 3rd (15) values: Q1 = 14.5. Q3 is at position 3 × 2.5 = 7.5, interpolating between the 7th (20) and 8th (21) values: Q3 = 20.5.
IQR = Q3 − Q1 = 20.5 − 14.5 = 6
Lower fence = 14.5 − 1.5(6) = 14.5 − 9 = 5.5
Upper fence = 20.5 + 1.5(6) = 20.5 + 9 = 29.5
Since 45 exceeds the upper fence of 29.5, it is flagged as an outlier by this method. Every other value in the dataset falls comfortably within the fences.
Method 2: The Z-Score Method
The Z-score method, building on the standard deviation and Z-score concepts covered earlier in this series, flags any value more than a chosen number of standard deviations from the mean — typically 2 or 3.
Z = (x − x̄) / s
A common rule of thumb: values with |Z| > 3 are flagged as outliers, since under a normal distribution, only about 0.3% of values should fall beyond 3 standard deviations — making such a value genuinely rare if the data really is approximately normal.
Worked Example: Z-Score Method
Using the same dataset (12, 14, 15, 16, 18, 19, 20, 21, 45), first calculate the mean and standard deviation.
Mean = (12+14+15+16+18+19+20+21+45)/9 = 180/9 = 20.
Deviations from the mean: −8, −6, −5, −4, −2, −1, 0, 1, 25. Squared deviations: 64, 36, 25, 16, 4, 1, 0, 1, 625. Sum = 772.
Sample variance = 772 / (9−1) = 96.5. Standard deviation = √96.5 ≈ 9.82.
Z-score for 45: Z = (45 − 20) / 9.82 ≈ 2.55.
Interestingly, under the common |Z| > 3 rule, 45 would not be flagged by the Z-score method, even though the IQR method flagged it clearly. This is not a contradiction — it’s an important lesson: the outlier itself has inflated the standard deviation being used to judge it, a self-masking effect that makes the Z-score method less reliable in small samples with one dominant outlier. The IQR method, built from quartiles rather than the mean and standard deviation, is far more resistant to this distortion, which is exactly why it’s generally preferred for outlier detection, even though Z-scores remain useful once you already trust the data is roughly clean.
What to Do With an Outlier Once You Find One
Finding an outlier is only step one; deciding what to do with it requires judgement, not a formula. Investigate first. Check whether the value is a data-entry error, a measurement fault, or a genuine extreme observation before touching anything. Correct genuine errors where the true value can be recovered — a misplaced decimal point or a unit conversion mistake should simply be fixed. Consider robust statistics when a genuine outlier can’t be removed but you still need a representative summary — the median and IQR are far less sensitive to extreme values than the mean and standard deviation, which is exactly why median household income, not mean, is the standard economic statistic. Report both versions when in doubt — showing results with and without the outlier included is often more honest than silently choosing one.
The Founder’s Salary, Revisited
Returning to the opening example: nine employees earning $45,000–$65,000, plus a founder at $2,000,000. The mean of all ten salaries is heavily distorted upward. The median, however, remains close to $55,000 regardless of the founder’s salary, because the median only cares about the middle-ranked value, not the magnitude of extreme ones. This is precisely why a company’s “typical employee compensation” is far more honestly reported using the median — the founder’s salary is real and shouldn’t be deleted, but it also shouldn’t be allowed to define what “average” looks like for everyone else.
Common Mistakes
Automatically deleting every flagged outlier. An outlier flag is the start of an investigation, not an automatic deletion order. Legitimate extreme values — a genuine market crash day, a real world-record performance — carry information that removing them would destroy.
Using the Z-score method on small samples with an extreme outlier. As shown above, a single dominant outlier inflates the standard deviation used to detect it, sometimes masking its own presence. The IQR method, built from order statistics rather than the mean, is more robust in exactly this situation.
Reporting only the mean for skewed data with outliers. Once an outlier is confirmed genuine and kept in the dataset, the median often communicates the “typical” value far more honestly than the mean, which the outlier will have pulled toward itself.
Practice Question
A dataset of daily website visits over 10 days is: 210, 225, 230, 240, 245, 250, 255, 260, 270, 890. Using the IQR method, determine whether 890 is an outlier. Q1 = 227.5 and Q3 = 262.5.
Answer: IQR = Q3 − Q1 = 262.5 − 227.5 = 35.
Upper fence = Q3 + 1.5 × IQR = 262.5 + 1.5(35) = 262.5 + 52.5 = 315
Since 890 > 315, the value is flagged as an outlier by the IQR method — likely a viral traffic spike or a data-logging error worth investigating before including it in a “typical daily traffic” report.
References
1. Tukey, J.W. (1977) Exploratory Data Analysis. Addison-Wesley.
2. Moore, D.S., McCabe, G.P. and Craig, B.A. (2021) Introduction to the Practice of Statistics. W.H. Freeman.
3. Triola, M.F. (2022) Elementary Statistics. Pearson.
4. Barnett, V. and Lewis, T. (1994) Outliers in Statistical Data. Wiley.
5. Field, A. (2018) Discovering Statistics Using IBM SPSS Statistics. SAGE.
