Describe › Outliers

Tukey's fence

Tukey's fence rule flags observations outside Q1 − k·IQR or Q3 + k·IQR — robust, distribution-free, and the rule behind the standard box plot.

What is Tukey's fence?

Tukey's fence is the simplest robust outlier rule. With k = 1.5 (the default in box plots) it flags roughly the most extreme 0.7% of observations under a Normal model — a sensible balance between catching real outliers and avoiding false alarms. With k = 3 (the "far outlier" cut) it flags only the truly extreme values, useful for quality-control charts.

Because the rule depends only on quartiles, it tolerates a handful of outliers without inflating the fences themselves — unlike mean-and-SD rules where a single extreme value pulls both estimates and masks itself. This makes Tukey the safest screening rule on data of unknown shape.

When should I use Tukey's fence?

  • First-pass screening on any new numeric variable before modelling.
  • When the underlying distribution isn't normal (skewed, heavy-tailed) and Grubbs/Dixon's normality assumption would be violated.
  • For visual reporting alongside a box plot — the flagged points are exactly the ones drawn beyond the whiskers.

What data does it need?

One numeric column + multiplier k (default 1.5; 3 for far outliers).

What does it report?

Q1, median, Q3, IQR, lower fence (Q1 − k·IQR), upper fence (Q3 + k·IQR), and a list of flagged values.

What does it assume?

  • Independent observations.
  • No distributional assumption — works on any continuous variable.

Formula

Lower fence = Q1 − k · IQR
Upper fence = Q3 + k · IQR

How do I interpret the result?

A flag is not a death sentence — it's a prompt to investigate. Check whether the value is a recording error, a true tail observation from a heavy-tailed distribution, or a member of a different population. Delete only when you can defend the deletion; otherwise winsorize, log-transform, or switch to a robust method.

On heavily skewed data the fence is itself asymmetric (the upper fence sits farther from the median than the lower one), so the rule still works without modification. On highly multimodal data Tukey can flag entire clusters as outliers; in that case the issue is your model, not the data.

See also

References

  • Tukey (1977). Exploratory Data Analysis.