Outlier

An outlier is a data point that differs markedly from the rest of a dataset, either because of an error or because something genuinely unusual happened.

NIST's engineering statistics handbook defines an outlier as an observation that deviates markedly from the others in a sample. A dataset of room temperatures that reads 20 to 25 degrees, plus one oven at 175, has an outlier. So does a list of adult heights with one entry of 17 metres, which is almost certainly a typo.

Those two cases show why outliers need judgement. Some are mistakes: a misread instrument, a transcription error, a bug in a data pipeline. Others are real and may be the most important points in the dataset, such as a fraudulent transaction or a rare side effect. NIST's advice is to correct or remove values confirmed to be errors, but not to delete points simply because they look odd. Removing inconvenient data without saying so is a well-known way to reach the conclusion you wanted.

There are standard ways to find them. Tukey's fences flag values more than 1.5 times the interquartile range below the first quartile or above the third. Grubbs's test and the generalised ESD test assume roughly normal data and test whether extreme points are plausible. Box plots and histograms often show them faster. For handling, analysts can keep them and use methods less sensitive to extremes, such as the median instead of the mean, cap them at a threshold, or exclude confirmed errors and report that they did.

Outliers matter to AI in two ways. In training data, extreme values can pull a model off course, which is why preprocessing often clips them. And finding outliers is itself a product: fraud detection, equipment monitoring and security tools all look for the unusual case. The second use is called anomaly detection.

Common questions

Should outliers be removed from data?

Only if they are confirmed errors, and then correcting them is better than deleting them where possible. Genuine extreme values carry information, so the usual advice is to keep them, use methods that are less sensitive to extremes, and report any exclusions.

How do you detect outliers?

Common approaches are plotting the data with box plots or histograms, Tukey's fences based on the interquartile range, and formal tests such as Grubbs's test for roughly normal data. Machine learning methods based on density or distance to neighbours are used for larger, multi-dimensional datasets.

What is the difference between an outlier and an anomaly?

The terms overlap. Outlier is the statistical word for a point far from the rest of the data, whatever the cause. Anomaly usually implies something unusual worth investigating, and anomaly detection is the practice of finding such cases automatically.

Why are outliers a problem for averages?

The mean is pulled towards extreme values, while the median is not. In a set of ten temperatures where nine are room temperature and one is an oven, the median stays near room temperature but the mean rises well above it.

Finding more

Search for "outlier detection methods", "Tukey fences" or "when to remove outliers". Reliable sources include the NIST/SEMATECH engineering statistics handbook, statistics textbooks and university course notes, and machine learning course material on data preparation. Be cautious of guides that recommend deleting outliers automatically without checking why they occurred.

Working out what this means for your business?

Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.