UpSkill Sprint Consulting logoUpSkill Sprint Consulting
Browse lessons
Data AnalyticsIntermediate45 minutesInteractive

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.

Why this matters: delete a genuine high-grade ore pocket and you throw away the best day the pit ever had. Keep a mis-keyed tensile reading and you ship steel on a lie. Outlier handling is a judgment skill, not a delete key.

Learning objectives

By the end of this lesson, you will be able to:

  1. Define an outlier and distinguish measurement error, data error, and genuine extreme values.
  2. Calculate the Z-score, Modified Z-score (MAD-based), IQR/Tukey fences, and Grubbs' test statistic by hand and in Excel.
  3. Select the right detection method based on sample size, distribution shape, and data sensitivity.
  4. Investigate a flagged point using a disciplined root-cause procedure before deciding what to do with it.
  5. Explain masking and swamping, and why deleting outliers without investigation is a data-integrity risk.
  6. 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.

Measurement / instrument error

The sensor lied โ€” drift, no tare, a stuck gauge.

Data / transcription error

A human or a paste error โ€” 950 typed for 590.

โœ… The value is correct

Respect it โ€” investigate the process behind it.

Genuine process shift

A real, assignable cause โ€” material swap, tool change.

Genuine rare event

The process working exactly as it does โ€” a rich ore pocket, a true tail value.

Every flagged point sorts into one of these two houses before you decide what to do with 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.

The trap: statistical tests can tell you a point is far from the rest. They cannot tell you which of the four buckets it belongs in. That takes investigation โ€” walk the floor, pull the calibration log, check the sample log book.

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.

One rogue reading (1612ยฐC) added threshold |Z| = 3 max |Z| = 3.71 โ€” flagged โœ“ Second rogue reading (1615ยฐC) added too max |Z| = 2.68 โ€” missed โœ— SD grew from 28.17ยฐC to 37.75ยฐC โ€” enough to pull both extreme readings back under the |Z| > 3 threshold.
This is exactly why the decision framework says: cross-check the plain Z-score against IQR fences or the Modified Z-score before concluding "no outliers here."

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

Z = x โˆ’ xฬ„s

xฬ„ = sample mean, s = sample standard deviation. Common flag threshold: |Z| > 3.

2. Modified Z-score (MAD-based)

M = 0.6745 (x โˆ’ xฬƒ)MAD    MAD = median(|xแตข โˆ’ xฬƒ|)

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

Lower = Q1 โˆ’ 1.5(IQR)  |  Upper = Q3 + 1.5(IQR)

IQR = Q3 โˆ’ Q1. Use 3ร—IQR for "extreme" outliers instead of "mild" ones. This is the rule your boxplot's whiskers are already using.

Min (in fence) Q1 Median Q3 Upper fence Q3 + 1.5(IQR) 1310 mm flagged outlier Box width = IQR (Q3 โˆ’ Q1); whiskers reach the last point still inside the fences
Schematic view (axis broken for clarity) using the rolling-mill coil-width practice numbers: Q1 = 1249, Q3 = 1252, upper fence = 1256.5 mm. The 1310 mm reading sits far beyond the fence.

4. Grubbs' test (ESD, one-sided or two-sided)

G = max|xแตข โˆ’ xฬ„|s

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.

Note: Grubbs' test formally checks only the single most extreme point. To check for more than one outlier, use an iterative approach (remove, retest) or the Generalized ESD test โ€” but iterate carefully, since removing points changes your critical value each round.

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.

My rule of thumb after 30 years: run at least two methods. If the Z-score, Modified Z-score, IQR fences, and Grubbs' test all agree, you have real confidence. If they disagree, that disagreement is itself information โ€” usually about masking.

Step-by-step investigation procedure

  1. Plot it first. Boxplot, individual value plot, or run chart โ€” before any formula. Your eyes catch things statistics miss.
  2. Screen with a distribution-free method. IQR fences work regardless of shape and cost nothing to compute.
  3. Confirm with a formal test if needed. Grubbs' test if approximately normal; otherwise document the IQR/Modified-Z flag.
  4. 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.
  5. Classify it. Measurement error, data error, genuine process shift, or genuine rare event โ€” pick one, with evidence.
  6. 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.
  7. 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.
The cardinal sin: deleting a point because it "ruins the story" or fails a normality test, with no investigation and no documentation. An auditor โ€” or an ASQ exam question โ€” will find this every time.

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?

Plot it. Fifteen readings cluster tightly around 1500ยฐC; 1612ยฐC sits well clear of the pack on a boxplot.
Screen with IQR. Q1 = 1497.75, Q3 = 1504.25, IQR = 6.5. Upper fence = 1504.25 + 1.5(6.5) = 1514.0ยฐC. 1612ยฐC is far beyond it.
Confirm with Grubbs. Mean โ‰ˆ 1507.44, s โ‰ˆ 28.17, G โ‰ˆ 3.71. For n = 16 at ฮฑ = 0.05, Gcrit โ‰ˆ 2.59. Since G > Gcrit, we reject the null โ€” 1612ยฐC is a statistical outlier.
Investigate. The maintenance log shows the thermocouple was replaced two readings later after failing a calibration check โ€” it had drifted high after a furnace reline.
Classify and decide. This is a measurement error. We exclude the reading from the process-capability calculation, log the reason (thermocouple drift, confirmed by maintenance record), and flag the sensor for more frequent calibration.
Payoff: excluding this one documented point drops the calculated standard deviation from โ‰ˆ28.2ยฐC to โ‰ˆ4.2ยฐC โ€” the furnace was never actually running that wild. Reporting 28.2ยฐC as "typical" variation would have triggered an unnecessary and expensive process investigation.

Before: including the glitch

7 1490โ€“1500 8 1500โ€“1510 1 1610โ€“1620

SD โ‰ˆ 28.2ยฐC โ€” looks like a wild process.

After: glitch excluded

7 1490โ€“1500 8 1500โ€“1510

SD โ‰ˆ 4.2ยฐC โ€” a tight, well-behaved process.

One documented, investigated exclusion changes the entire capability story โ€” from "alarmingly variable" to "running exactly as designed."

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

n
โ€”
Mean / SD
โ€”
Median / MAD
โ€”
Q1 / Q3 / IQR
โ€”

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).

Every reading, every lens โ€” see the four methods argue with each other.
#ValueZ-scoreModified ZInside IQR fences?

Interpretation guide

When you see this, it means this.
When you see thisIt means thisWhat to say / do
All four methods flag the same pointStrong, convergent evidence of a genuine outlier.Proceed to root-cause investigation with confidence.
Z-score misses it, but Modified Z and IQR flag itClassic 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 dataGrubbs 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 flaggedPossible 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 failureMeasurement error.Exclude from analysis, document the reason and evidence, fix or replace the instrument.
The flagged point matches a known process/material changeGenuine 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 investigationPossibly 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

Judgment error

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.

Method error

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.

Calculation error

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(...)).

Statistical trap

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.

Exam trap

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.

Process error

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

Functions used to detect and characterize outliers in Excel.
FunctionSyntaxPurposeWhen 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 deviationDenominator of the Z-score and Grubbs' G, for a sample (n โˆ’ 1 divisor).
STDEV.P=STDEV.P(range)Population standard deviationOnly when your data is the entire population, not a sample โ€” rare in process work.
STANDARDIZE=STANDARDIZE(x, mean, sd)Computes a Z-score directlyFast one-cell Z-score without building the subtraction/division yourself.
QUARTILE.INC=QUARTILE.INC(range, quart)Q1 (quart=1) and Q3 (quart=3), inclusive methodStandard, most-taught method for building IQR/Tukey fences.
QUARTILE.EXC=QUARTILE.EXC(range, quart)Q1/Q3, exclusive methodUse 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 percentileCross-checking quartiles or building custom fences (e.g., 5th/95th percentile).
ABS=ABS(number)Absolute valueCore building block for MAD, Modified Z-score, and Grubbs' numerator.
AVEDEV=AVEDEV(range)Average absolute deviation from the meanNote: this is not MAD. Don't substitute it for the median-based MAD formula.
MAD (array formula)=MEDIAN(ABS(range-MEDIAN(range)))Median Absolute DeviationEnter 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 rankPull 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 valueComputes 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 statisticConvert a Grubbs-derived t statistic back into a p-value for reporting.
COUNT=COUNT(range)Sample size, nNeeded everywhere โ€” Grubbs' critical value depends heavily on n.
IF / AND=IF(ABS(z)>3,"Flag","OK")Flagging logicTurn 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).

Caution: Excel has no single built-in "Grubbs' test" function โ€” you assemble it from T.INV.2T, exactly as shown above. Don't confuse this with a simple Z-score screen.

Minitab Navigation

Descriptive statistics & quartiles

  1. Stat โ†’ Basic Statistics โ†’ Display Descriptive Statistics. Returns mean, median, SD, Q1, Q3, and IQR directly โ€” no manual formulas needed.
  2. Alternative: Stat โ†’ Basic Statistics โ†’ Graphical Summary adds a normality test and confidence intervals alongside the same statistics.
  3. Use Graphical Summary when you also need to judge whether Grubbs' normality assumption is reasonable.

Formal outlier test

  1. Stat โ†’ Basic Statistics โ†’ Outlier Test. Runs Grubbs' test directly on a column and reports the flagged value and p-value.
  2. Use this when you need a defensible, documented p-value rather than an eyeballed fence.
  3. Check the normality assumption first (Graphical Summary's Anderson-Darling test) โ€” Minitab will not stop you from misapplying it to skewed data.

Visual screening

  1. Graph โ†’ Boxplot. Minitab marks points beyond 1.5ร—IQR with an asterisk automatically โ€” your fastest first look.
  2. Graph โ†’ Individual Value Plot or Graph โ†’ Scatterplot for a raw view without box-plot compression.
  3. Use the boxplot for a quick screen, then follow up with Outlier Test or Descriptive Statistics for the formal number.

Time-ordered process data

  1. 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.
  2. 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.
  3. Stat โ†’ Quality Tools โ†’ Individual Distribution Identification helps confirm which distribution model is reasonable before trusting Grubbs or a capability study.

Exam tips

ASQ CSSBB / CQE exam connections: outlier detection sits under the Measure phase / basic statistics domain. Expect questions that (1) ask you to compute a Z-score, IQR fence, or interpret a Grubbs' test result by hand or from output; (2) test whether you know Grubbs' test requires an approximate normality assumption while IQR fences do not; (3) present a scenario and ask what you should do before removing a point (the answer is almost always "investigate and document," not "delete"); and (4) distinguish an outlier from a point that is merely influential in a regression context. In real-world capability studies, always report whether outliers were included or excluded and why โ€” an auditor will ask.

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.)

Knowledge check

Check your understanding

Comprehension quiz

Pick the strongest answer, then submit. Explanations appear after you submit.

1. Which detection method makes no assumption about the shape of the distribution?
2. A second extreme point inflates the mean and standard deviation enough that a plain Z-score fails to flag either point. This is called:
3. Median Absolute Deviation (MAD) is best described as:
4. A calibration log confirms a flagged reading came from a drifted, out-of-spec sensor. What should you do?
5. Which Excel function is required inside the Grubbs' critical-value formula?
6. A high-grade ore pocket produces a genuinely correct 68.9% Fe reading among values normally around 62%. What is the best characterization?

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.
Decision rule: screen with IQR fences (always works) โ†’ confirm with Grubbs' test if approximately normal โ†’ investigate root cause before any exclusion โ†’ document the decision either way.
Remember this: statistics finds the suspect. Investigation finds the verdict.

Suggested next lesson: Chebyshev vs. the Empirical Rule.

References

← Back to Data Analytics lessons