Skip to content

Detecting and Handling Outliers

How to spot unusual values, decide whether they are errors or genuine extremes, and treat them appropriately.

Editorial team 2 min read

Outliers are values far from the rest of the data. Some are errors; some are the most important observations you have.

Finding Outliers

  • Visual checks: box plots, histograms and scatter plots.
  • Rules of thumb: values beyond 1.5 times the interquartile range from the quartiles, or more than three standard deviations from the mean (for roughly normal data).
  • Domain rules: a human height of 3 metres or a negative age is impossible.
  • Multivariate methods: a value may be normal on its own but unusual in combination, such as a high salary for a junior role.

Error or Real?

Investigate before acting. Typos, unit mix-ups (grams versus kilograms), sensor faults and default values are errors. Big purchases, extreme weather and fraud are real — and often exactly what you care about.

Treatment Options

  • Correct errors when the true value can be recovered.
  • Remove clear errors that can't be fixed.
  • Cap (winsorise) extreme values at a chosen percentile.
  • Transform long-tailed data, for example with a logarithm.
  • Use robust methods: medians, robust scaling, tree-based models and absolute-error losses are less sensitive to outliers.
  • Model them separately when extremes behave differently.

Document Decisions

Record which outliers were changed or removed and why. Treating outliers inconsistently between training and production causes silent errors.

More in Data for AI

All Data for AI guides →
Data for AI Guide · 1 min

How to Read a Dataset Card

The questions a dataset card should answer — what one row is, where the data came from, its licence and its quirks — before you use it.

Data for AI 1 min read 5 Apr 2026

Data for AI Guide · 2 min

Data Quality Dimensions

Accuracy, completeness, consistency, timeliness, validity and uniqueness: a framework for checking whether data is fit for purpose.

Data for AI 2 min read 4 Apr 2026

Data for AI Guide · 2 min

Handling Missing Data

Why data goes missing, how to find out, and the options — dropping, imputing, flagging — with their trade-offs.

Data for AI 2 min read 3 Apr 2026

Data for AI Guide · 2 min

Labelling Data for Machine Learning

How to create high-quality labels: clear guidelines, measuring agreement, handling ambiguity and reducing cost.

Data for AI 2 min read 1 Apr 2026