Dealing with Outliers: A Steel & Mining Detective's Guide
Thirty years on shop floors and mine sites taught me one thing: every dataset has a troublemaker. Your job isn't to exorcise it โ it's to interrogate it. We'll use blast-furnace temperatures, tensile tests, ore grades, and a runaway conveyor to learn four detection methods and, more importantly, what to do once you've caught your suspect.
Learning objectives
By the end of this lesson, you will be able to:
- Define an outlier and distinguish measurement error, data error, and genuine extreme values.
- Calculate the Z-score, Modified Z-score (MAD-based), IQR/Tukey fences, and Grubbs' test statistic by hand and in Excel.
- Select the right detection method based on sample size, distribution shape, and data sensitivity.
- Investigate a flagged point using a disciplined root-cause procedure before deciding what to do with it.
- Explain masking and swamping, and why deleting outliers without investigation is a data-integrity risk.
- Execute the full workflow in both Excel and Minitab, and connect it to ASQ CSSBB/CQE exam expectations.
Prerequisites
You should be comfortable with the mean, median, and standard deviation, and have seen a boxplot before. If Chebyshev's inequality and the Empirical Rule are new to you, our Chebyshev vs. the Empirical Rule lesson is a good warm-up โ outlier fences are built directly on those spread ideas.
What exactly is an outlier?
Here's the definition I've used since my first plant assignment: an outlier is an observation that is inconsistent with the bulk of the data, given some assumed model of how the data should behave. That's it. Statistics gives you tools to flag candidates โ it does not tell you why a point is weird. That part is still your job, and it's the part most courses skip.
In thirty years of chasing weird numbers through blast furnaces, rolling mills, and open pits, every flagged point eventually sorted itself into one of four buckets:
๐ซ The value itself is wrong
Fix the pipeline, not just the number.
โ The value is correct
Respect it โ investigate the process behind it.
๐ง Measurement / instrument error
A thermocouple drifts, a scale isn't tared, a gauge sticks. The process was fine; the sensor lied.
โจ๏ธ Data / transcription error
Someone typed 950 instead of 590, pasted a column one row off, or a unit got mixed up (mm vs. cm).
โ๏ธ Genuine process shift (special cause)
A real, assignable cause changed the process โ a raw-material swap, a tool change, an operator error. Real, and worth fixing at the source, not the spreadsheet.
๐ Genuine rare event (natural extreme)
The process is behaving exactly as it always does, and this is simply a rare tail value โ or, on a good day, a genuinely rich ore pocket. Delete this and you're editing reality.
Key terminology
Z-score
Number of standard deviations a point sits from the mean. Sensitive to the very outliers it's trying to detect.
MAD
Median Absolute Deviation โ the median of the absolute deviations from the median. A robust stand-in for standard deviation.
Modified Z-score
A Z-score built from the median and MAD instead of the mean and SD, so it resists being fooled by the outlier itself.
IQR / Tukey fences
Q3 โ Q1 defines the middle 50% of the data. Fences at 1.5รIQR (mild) and 3รIQR (extreme) beyond Q1/Q3 flag candidates โ distribution-free.
Grubbs' test
A formal hypothesis test (assumes approximate normality) for whether the single most extreme value is a statistical outlier.
Masking & swamping
Masking: a second outlier hides the first by inflating the mean/SD. Swamping: a robust method over-flags normal points near a cluster of real outliers.
Winsorizing
Replacing extreme values with the nearest non-extreme value instead of deleting them โ keeps the sample size, tempers the influence.
Trimming
Removing a fixed percentage of the most extreme values from each end before calculating statistics (e.g., a 5% trimmed mean).
Influential point
In regression, a point that changes the fitted line disproportionately โ not always the same thing as an outlier in Y alone.
Watch masking happen, with real numbers
Same furnace data from the worked example. Adding a second extreme reading doesn't just fail to get caught โ it drags the mean and SD along enough to un-flag the first one too.
The four detection methods
Here are the four tools I keep in my back pocket, from quickest-and-dirtiest to most formal.
1. Z-score
xฬ = sample mean, s = sample standard deviation. Common flag threshold: |Z| > 3.
2. Modified Z-score (MAD-based)
xฬ = median. Iglewicz & Hoaglin's recommended flag threshold: |M| > 3.5. The 0.6745 constant rescales MAD to be comparable to a standard deviation under normality.
3. IQR / Tukey fences
IQR = Q3 โ Q1. Use 3รIQR for "extreme" outliers instead of "mild" ones. This is the rule your boxplot's whiskers are already using.
4. Grubbs' test (ESD, one-sided or two-sided)
Reject (flag as outlier) if G exceeds the critical value Gcrit, which depends on n and your significance level ฮฑ (typically 0.05) via the t-distribution. Assumes the data are approximately normal.
Which method, when?
Small n, unsure of shape
Use IQR fences. Distribution-free, robust, and it's literally what your boxplot already shows.
Approximately normal, need a formal test
Use Grubbs' test. Gives you a defensible p-value for a report or a capability study.
Suspect more than one outlier
Use the Modified Z-score. Median and MAD aren't dragged around by the very points you're hunting.
Quick screen, large n, normal-ish
Use the plain Z-score. Fast, familiar, but weak when the outlier itself has inflated the mean and SD (masking).
Time-ordered process data
Use a control chart (I-MR or X-bar/R). A point beyond 3ฯ control limits is a special cause in context, not just a static outlier.
Regression / multiple variables
Check leverage, Cook's distance, and Mahalanobis distance โ a point can be unremarkable on each variable alone and still be a multivariate outlier.
Step-by-step investigation procedure
- Plot it first. Boxplot, individual value plot, or run chart โ before any formula. Your eyes catch things statistics miss.
- Screen with a distribution-free method. IQR fences work regardless of shape and cost nothing to compute.
- Confirm with a formal test if needed. Grubbs' test if approximately normal; otherwise document the IQR/Modified-Z flag.
- Investigate the root cause before touching the data. Pull the calibration log, the sample log, the shift log, the material certs. Talk to the operator.
- Classify it. Measurement error, data error, genuine process shift, or genuine rare event โ pick one, with evidence.
- Decide and document. Correct (if the true value is known), exclude with a documented reason, Winsorize/trim for a specific analysis, or keep it as-is. Never delete silently.
- Re-run the analysis both ways. Report how the conclusion changes with and without the point โ this transparency is what separates rigor from cherry-picking.
Worked example: the furnace mystery
Problem: Sixteen consecutive hot-metal temperature readings (ยฐC) from a blast furnace: 1494, 1502, 1497, 1508, 1499, 1505, 1496, 1501, 1503, 1498, 1500, 1506, 1495, 1504, 1499, 1612. Is 1612ยฐC an outlier, and what should we do about it?
Before: including the glitch
SD โ 28.2ยฐC โ looks like a wild process.
After: glitch excluded
SD โ 4.2ยฐC โ a tight, well-behaved process.
Interactive investigation lab
Pick a case file from the plant or the pit, choose your detection lens, and see who gets flagged. Add a rogue reading of your own and watch masking happen in real time.
Case files
Choose your detection lens
Boxplot & strip plot
Every dot is one reading. Red dots are flagged under the current lens; the amber band shows that lens's fence(s).
| # | Value | Z-score | Modified Z | Inside IQR fences? |
|---|
๐ Investigation report:
Interpretation guide
| When you see this | It means this | What to say / do |
|---|---|---|
| All four methods flag the same point | Strong, convergent evidence of a genuine outlier. | Proceed to root-cause investigation with confidence. |
| Z-score misses it, but Modified Z and IQR flag it | Classic masking โ the outlier has inflated the mean and SD enough to hide itself from a plain Z-score. | Trust the robust methods (median/MAD, IQR) over the Z-score here. |
| Grubbs' test says "not significant" on skewed data | Grubbs assumes approximate normality; a skewed shape can violate that assumption. | Check a probability plot first; fall back to IQR fences if normality is doubtful. |
| A cluster of points near the fence all get flagged | Possible swamping โ legitimate points crowded by a genuinely shifted subgroup. | Investigate whether a real process shift (not individual point errors) occurred. |
| The flagged point has a confirmed calibration failure | Measurement error. | Exclude from analysis, document the reason and evidence, fix or replace the instrument. |
| The flagged point matches a known process/material change | Genuine special cause. | Keep it, but segment the analysis; investigate and correct the process, not the data. |
| The flagged point has no assignable cause after real investigation | Possibly a genuine rare event from natural variation. | Keep it in the primary analysis; consider reporting a robust statistic (median/IQR) alongside the mean/SD. |
Common mistakes and exam traps
Deleting without investigating
Why wrong: you may be discarding real, important information (or hiding a real defect). Avoid it: always document a root cause before removing a point.
Using Grubbs' test on clearly skewed data
Why wrong: Grubbs assumes approximate normality; skew inflates false positives/negatives. Avoid it: check shape first, or use IQR fences instead.
Confusing MAD with average absolute deviation
Why wrong: MAD uses the median of absolute deviations from the median โ not the mean. Excel's AVEDEV computes a different, less robust quantity. Avoid it: build MAD explicitly with MEDIAN(ABS(...)).
Ignoring masking
Why wrong: a second extreme point can inflate the mean and SD enough that the plain Z-score misses both. Avoid it: cross-check with Modified Z-score or IQR fences, which resist masking.
Treating "outlier" and "error" as synonyms
Why wrong: a statistical outlier can be a completely genuine, correctly recorded extreme value. Avoid it: the ASQ exams expect you to know that removal requires a documented, investigated reason.
Fixing the data instead of the process
Why wrong: if a genuine special cause produced the point, excluding it from a report without fixing the root cause lets the problem recur. Avoid it: route genuine special causes to corrective action, not just to the exclusions column.
Statistics Implementation: Excel & Minitab
Excel Functions
| Function | Syntax | Purpose | When to use it |
|---|---|---|---|
AVERAGE | =AVERAGE(range) | Sample mean, xฬ | Baseline center for the Z-score method. |
MEDIAN | =MEDIAN(range) | Robust center, xฬ | Foundation for the Modified Z-score and MAD; unaffected by the outlier itself. |
STDEV.S | =STDEV.S(range) | Sample standard deviation | Denominator of the Z-score and Grubbs' G, for a sample (n โ 1 divisor). |
STDEV.P | =STDEV.P(range) | Population standard deviation | Only when your data is the entire population, not a sample โ rare in process work. |
STANDARDIZE | =STANDARDIZE(x, mean, sd) | Computes a Z-score directly | Fast one-cell Z-score without building the subtraction/division yourself. |
QUARTILE.INC | =QUARTILE.INC(range, quart) | Q1 (quart=1) and Q3 (quart=3), inclusive method | Standard, most-taught method for building IQR/Tukey fences. |
QUARTILE.EXC | =QUARTILE.EXC(range, quart) | Q1/Q3, exclusive method | Use when your course or standard specifically calls for the exclusive definition; gives slightly different fences on small n. |
PERCENTILE.INC | =PERCENTILE.INC(range, k) | Any percentile | Cross-checking quartiles or building custom fences (e.g., 5th/95th percentile). |
ABS | =ABS(number) | Absolute value | Core building block for MAD, Modified Z-score, and Grubbs' numerator. |
AVEDEV | =AVEDEV(range) | Average absolute deviation from the mean | Note: this is not MAD. Don't substitute it for the median-based MAD formula. |
| MAD (array formula) | =MEDIAN(ABS(range-MEDIAN(range))) | Median Absolute Deviation | Enter as an array formula (Ctrl+Shift+Enter in older Excel, or automatically in dynamic-array Excel/365). Required for the Modified Z-score. |
LARGE / SMALL | =LARGE(range,1) / =SMALL(range,1) | Extreme values by rank | Pull the most extreme value to feed Grubbs' numerator, max|xแตข โ xฬ|. |
T.INV.2T | =T.INV.2T(probability, deg_freedom) | Two-tailed inverse t critical value | Computes the t value needed inside the Grubbs' critical-value formula. |
T.DIST.2T | =T.DIST.2T(x, deg_freedom) | Two-tailed p-value from a t statistic | Convert a Grubbs-derived t statistic back into a p-value for reporting. |
COUNT | =COUNT(range) | Sample size, n | Needed everywhere โ Grubbs' critical value depends heavily on n. |
IF / AND | =IF(ABS(z)>3,"Flag","OK") | Flagging logic | Turn any of the above statistics into a pass/fail column for review. |
Excel use cases
Building a Z-score column (data in A2:A17, mean in D1, SD in D2): =(A2-$D$1)/$D$2, filled down, then flag with =IF(ABS(B2)>3,"Flag","").
Building the Modified Z-score: with median in D3 and MAD in D4 (array formula above), =0.6745*(A2-$D$3)/$D$4, flag at |M| > 3.5.
Building IQR fences: =QUARTILE.INC($A$2:$A$17,1) and =QUARTILE.INC($A$2:$A$17,3) in two cells, then =Q3-Q1 for IQR, and =Q1-1.5*IQR / =Q3+1.5*IQR for the fences.
Assembling Grubbs' critical value: with n in D5, ฮฑ = 0.05: =T.INV.2T(0.05/D5, D5-2) gives the t value, then =((D5-1)/SQRT(D5))*SQRT(t^2/(D5-2+t^2)) gives Gcrit. Compare against G = =MAX(ABS(A2:A17-$D$1))/$D$2 (entered as an array formula).
Minitab Navigation
Descriptive statistics & quartiles
- Stat โ Basic Statistics โ Display Descriptive Statistics. Returns mean, median, SD, Q1, Q3, and IQR directly โ no manual formulas needed.
- Alternative: Stat โ Basic Statistics โ Graphical Summary adds a normality test and confidence intervals alongside the same statistics.
- Use Graphical Summary when you also need to judge whether Grubbs' normality assumption is reasonable.
Formal outlier test
- Stat โ Basic Statistics โ Outlier Test. Runs Grubbs' test directly on a column and reports the flagged value and p-value.
- Use this when you need a defensible, documented p-value rather than an eyeballed fence.
- Check the normality assumption first (Graphical Summary's Anderson-Darling test) โ Minitab will not stop you from misapplying it to skewed data.
Visual screening
- Graph โ Boxplot. Minitab marks points beyond 1.5รIQR with an asterisk automatically โ your fastest first look.
- Graph โ Individual Value Plot or Graph โ Scatterplot for a raw view without box-plot compression.
- Use the boxplot for a quick screen, then follow up with Outlier Test or Descriptive Statistics for the formal number.
Time-ordered process data
- Stat โ Control Charts โ Variables Charts for Individuals โ I-MR. Flags points beyond 3ฯ control limits in the context of process order, not just static distribution.
- Use this instead of a static outlier test whenever the data are collected over time โ a control chart also tells you whether the shift persisted.
- Stat โ Quality Tools โ Individual Distribution Identification helps confirm which distribution model is reasonable before trusting Grubbs or a capability study.
Exam tips
Practice activity
A rolling mill logs 12 coil widths (mm): 1250, 1248, 1252, 1251, 1249, 1253, 1247, 1250, 1252, 1249, 1251, 1310. Using the IQR method, is 1310 mm an outlier? (Q1 = 1249.00, Q3 = 1252.00.)
IQR = 1252.00 โ 1249.00 = 3.0 mm. Upper fence = 1252.00 + 1.5(3.0) = 1256.5 mm.
1310 mm is well above 1256.5 mm, so yes, it is flagged as an outlier by the IQR method โ and by a wide margin.
Conclusion: before removing it, check whether this reading came from a different gauge, a different coil altogether, or a genuine mill excursion. Don't just delete it because it's inconvenient.
Knowledge check
Check your understanding
Comprehension quiz
Pick the strongest answer, then submit. Explanations appear after you submit.
Final summary
- An outlier is a point inconsistent with the bulk of the data โ not automatically an error.
- Four core detection tools: Z-score, Modified Z-score (MAD-based), IQR/Tukey fences, and Grubbs' test โ each with different assumptions and blind spots.
- Masking (an outlier hiding itself or another) and swamping (flagging good points near a real cluster) are real failure modes โ cross-check methods.
- Detection is step one. Investigation โ instrument logs, sample logs, operator interviews โ decides what a flagged point actually is.
- Never delete a point without a documented, investigated reason; report results with and without the point when in doubt.
- Excel builds each method from AVERAGE/MEDIAN/STDEV.S/QUARTILE.INC/T.INV.2T; Minitab's Outlier Test, Boxplot, and I-MR chart give the same answers with far less manual formula work.
Suggested next lesson: Chebyshev vs. the Empirical Rule.
References
- NIST/SEMATECH, Grubbs' test for outliers, e-Handbook of Statistical Methods.
- NIST/SEMATECH, Detection of outliers, e-Handbook of Statistical Methods.
- Iglewicz, B. and Hoaglin, D., How to Detect and Handle Outliers, ASQC Quality Press.
- Microsoft Support, T.INV.2T function.
- Minitab Support, Outlier Test overview.