Outlier
An outlier is a data point that lies far from the other values in a set of data. In a list of adult heights, a value of 17 meters would be an outlier.
Some outliers are mistakes, and others are discoveries. A typing error can throw off an average, but an unusual reading can also be the first sign of something new.[1]
Statistical work on outliers is largely about telling these cases apart, and about methods that still work when outliers are present.
What counts as an outlier
No single rule defines an outlier. Statisticians have offered several working definitions:
- The NIST engineering statistics handbook calls an outlier "an observation that appears to deviate markedly from other observations in the sample."[2]
- Barnett and Lewis (1994) call an outlier "an observation (or subset of observations) which appears to be inconsistent with the remainder of that set of data."[3]
- Hawkins (1980) calls it "an observation which deviates so much from the other observations as to arouse suspicions that it was generated by a different mechanism."[3]
- Hyndman calls these definitions too vague to be useful. Following Hyndman and Frazier (2026), he defines an anomaly instead as an observation with very low probability under some assumed probability distribution, a model that assigns chances to the possible values of the data.[3]
The NIST definition leaves it up to the analyst, or to group agreement, to decide what counts as abnormal. Before anyone can single out unusual values, they first have to describe what the usual values look like.[1]
Whether a point is an outlier depends on the model of the data. A value that looks extreme under a normal distribution may be ordinary under a skewed one, meaning a lopsided distribution with a longer tail on one side.[2]
An unusual point does not have to sit at the edges of the data. Hyndman uses the word "inlier" for an unusual point that sits in an unlikely region inside the range of the data.[3]
The broader task of finding unusual observations is called anomaly detection. Hyndman notes that anomalies go by several other names:[3]
- outliers
- novelties
- deviants
- abnormalities
- discordants
Where outliers come from
Outliers have several common causes. The NIST handbook and other sources list these:
- Recording errors. Data may be coded or typed wrongly.[2]
- Faulty procedures. An experiment may not have been run correctly.[2]
- Chance. Random variation sometimes produces a value far from the rest.[2]
- A wrong model. The data may not follow the distribution the analyst assumed.[2]
- A different population. A point can be a correct measurement of something of a different kind, such as a giant star among main-sequence stars.[4] Main-sequence stars are stars in the usual, long-lasting phase of their lives, when they fuse hydrogen into helium in their cores.[5]
- Something new. An outlier may point to something scientifically interesting.[2]
A dataset of Old Faithful geyser eruptions shows the first cause. One eruption was recorded as lasting 1 second, which is surely a recording error, and two others came from mistakes in converting the written durations into numbers.[3]
Why outliers matter
A single outlier can badly distort common summaries. Rousseeuw and Hubert give five measurements of a length: 6.27, 6.34, 6.25, 6.31, and 6.28.[4] Three summaries show the effect:
- The mean is the arithmetic average.
- The median is the middle value when the data are sorted.
- The standard deviation measures how spread out the values are.
The mean of the five values is 6.29. If the fourth value is mistyped as 63.10, the mean jumps to 17.65 and the standard deviation rises from 0.035 to 25.41, while the median is 6.28, still a reasonable value.[4]
| Summary | Clean data | With the typo (63.10) |
|---|---|---|
| Mean | 6.29 | 17.65 |
| Median | 6.28 | 6.28 |
| Standard deviation | 0.035 | 25.41 |
Breakdown point
The breakdown point measures how many bad values a summary can take before it fails. It is the smallest fraction of observations that must be replaced to make the estimate move without limit.[4]
- The mean has a breakdown point of for observations, which goes to 0% for large .[4]
- The median has a breakdown point of about 50%, the best possible, since clean data must be in the majority.[4]
- The standard deviation has a breakdown point of 0%, because one outlier can make it grow without limit.[4]
Methods that are not easily thrown off by outliers belong to robust statistics. They try to fit the majority of the data first and then flag the points that deviate from that fit.[4]
Spotting outliers with plots and simple rules
Plots are the first tool for finding outliers. The NIST handbook says any of these plots should show obviously outlying points:[6]
- a normal probability plot
- a run sequence plot, which shows the values in the order they were recorded[7]
- a box plot
- a histogram
NIST also recommends using a normal probability plot to check whether the data are roughly normal before applying a formal outlier test.[2]
Box plot fences
The box plot rule uses quartiles, the values that cut off the lowest and highest quarters of the data. If is the lower quartile and the upper quartile, the interquartile range is .[1] Four cutoffs, called fences, follow from it:
NIST calls a point beyond an inner fence a mild outlier and a point beyond an outer fence an extreme outlier.[1]
John Tukey used the names "outside" and "far out" for these two levels.[8] His ideas spread with his 1977 book Exploratory Data Analysis, after a less widespread earlier edition in 1970.[9]
In a NIST example with 90 observations, , , and . The inner fences are at and , and the outer fences at and . Only the value 1441 lies beyond a fence, so it is a mild outlier.[1]
The box plot rule flags some points even in clean data. For a normal distribution, the chance that a value falls beyond the inner fences is about 0.0070. With 1000 normal observations, the chance of flagging at least one point that is not truly anomalous is 0.9991.[8]
Z-scores
The z-score measures how many standard deviations a value lies from the mean:[2]
Here is one observation, is the sample mean, and is the sample standard deviation. Some books flag values with above a threshold, usually 3.[10]
This rule has known problems. Hyndman lists three:[10]
- Outliers inflate the mean and standard deviation used to compute , so they hide themselves.
- A fixed threshold flags more ordinary points as the sample grows.
- Most real data are not exactly normal.
The first problem has a hard limit. In a sample of values, no z-score can exceed in absolute value.[2] So with , no z-score can exceed 3, whatever the data.[10]
Modified z-scores
Iglewicz and Hoaglin recommend a modified z-score built from the median instead of the mean:[2]
Here is the median and MAD is the median absolute deviation, the median of the distances . They recommend labeling values with as potential outliers.[2] Because the median and MAD resist outliers, one bad value cannot hide itself the way it can with ordinary z-scores.[4]
Formal outlier tests
Formal tests use a hypothesis test to decide whether an extreme value is too extreme to come from the assumed distribution. The most popular classical tests assume the data follow a normal distribution.[3] For data that are roughly lognormal, NIST suggests taking logarithms first and then applying the normal-theory tests.[2]
Early criteria
The earliest known z-score tests came from astronomers. Benjamin Peirce, a Harvard mathematician who worked with astronomical data, proposed the first known test based on what are now called z-scores in 1852.[10] Peirce's criterion rejects observations with , where is a complicated function of the sample size and the number of suspected outliers.[10]
The astronomer William Chauvenet proposed a simpler rule in 1863.[10] Chauvenet's criterion sets the cutoff at the quantile of the standard normal distribution, where a quantile is the cutoff below which a given share of the distribution falls. For normal data it rejects, on average, half an observation regardless of , but it can reject many more genuine points in non-normal data.[10]
Grubbs's test and its extensions
Grubbs's test checks for exactly one outlier in roughly normal data. Its statistic is the largest absolute deviation from the mean, in units of the standard deviation:[6]
The test uses a significance level , the chance of a false alarm the test allows. For the two-sided test with observations, the hypothesis of no outliers is rejected when[6]
Here is the critical value of the t distribution with degrees of freedom at significance level . Degrees of freedom count the independent pieces of information available for estimating a quantity. One-sided versions test only the largest or only the smallest value and use level .[6]
In a NIST example of eight mass spectrometer measurements on a uranium isotope, seven ranged from 199.31 to 202.18 and the eighth was 245.57. The one-sided test gave , above the critical value 2.032 at , so the largest value was declared an outlier.[6]
Other tests handle more than one outlier or use a different idea:[2][10]
| Test | Checks for | What it needs | Main idea |
|---|---|---|---|
| Grubbs | One outlier | Normal data | Largest distance from the mean |
| Tietjen-Moore | Several outliers | The exact number of outliers | Generalizes Grubbs |
| Generalized extreme studentized deviate (ESD) | Several outliers | Only an upper bound on the number | Recommended by NIST when the exact number is unknown |
| Dixon's Q test | One outlier at either end | Normal data | Gap to the nearest neighbor |
Dixon's statistic for the largest value compares its gap to the next value with the whole range:[10]
Here are the sorted observations.
Masking and swamping
Multiple outliers cause two failures, together called masking and swamping:[2]
- Masking. When a test looks for too few outliers, the extra outliers shift the test statistic and hide one another, so none is declared.
- Swamping. When a test looks for too many, a single real outlier can drag an ordinary point along with it, so ordinary points get flagged. Many tests declare either all or none of the tested points.
For this reason, NIST warns against applying a single-outlier test over and over to find several outliers. Masking can make the first test report no outlier, so the search stops.[2] NIST recommends pairing formal tests with plots, which can reveal masking or swamping.[2]
Limits of distribution-based tests
Tests built on an assumed distribution can fail in both directions. Hyndman compared several rules on simulated and real data, with these counts of flagged points:[10]
| Data (true outliers) | z-score | Peirce | Chauvenet | Grubbs | Dixon |
|---|---|---|---|---|---|
| 18 normal values plus 2 planted outliers (2) | 0 | 2 | 2 | 0 | 0 |
| 1000 normal values (0) | 1 | 1 | 1 | 0 | 0 |
| 1000 values from a t distribution with 3 degrees of freedom (0) | 18 | 10 | 12 | 6 | 1 |
| 1000 values from a chi-squared distribution with 4 degrees of freedom (0) | 15 | 6 | 7 | 1 | 0 |
The first row shows masking, since two outliers of similar size inflate the standard deviation and leave no large gap for Dixon's test. The last two rows show heavy-tailed or skewed data producing false alarms.[10]
Hyndman argues that these methods were the only practical ones until about 1975, when hand calculation and tables were the norm. He sees little reason to keep using them now.[10]
Outliers in several variables
A point can be unusual in combination even when each of its values is ordinary. In Old Faithful data, two eruptions lasting 110 to 120 seconds were followed by waits of over 6000 seconds. Neither the duration nor the wait was unusual on its own, but the pair was.[3]
The figure shows such an outlier involving two variables.
Mahalanobis distance
The Mahalanobis distance measures how far a point is from the center while taking the spread and correlation of the variables into account:[4]
Here is the point, is the mean vector, and is the sample covariance matrix. Points with equal distance lie on an ellipsoid, a stretched or flattened sphere (an ellipse when there are two variables).[4]
The 97.5% tolerance ellipsoid contains the points with . Here is the 0.975 quantile, the cutoff below which 97.5% of values fall, of the chi-squared distribution with degrees of freedom, and is the number of variables.[4]
Robust distances
The classical Mahalanobis distance suffers from masking. In a data set of animal brain and body weights, three dinosaurs with low brain weight and high body weight pulled the classical ellipse toward themselves, so their distances were not very large.[4]
Robust distances fix this by using a center and spread fitted to the majority. The minimum covariance determinant (MCD) method searches for the observations whose covariance matrix has the smallest determinant.[4]
The MCD uses the mean of those points as the center and their covariance matrix, times a correction factor, as the spread. With these estimates, the robust ellipse exposed the three dinosaurs.[4]
The MCD has a breakdown point of . It is highest when , and Rousseeuw and Hubert suggest a value such as when fewer outliers are expected.[4]
Distance and density methods
Newer methods judge points by their distance to other points or by the estimated density around them. There are two main approaches:[3]
- Distance-based methods flag points far from other points.
- Density-based methods flag points in regions of very low estimated density.
The local outlier factor, introduced by Breunig and colleagues in 2000, is a density-based example from the data mining literature.[11]
These methods are used in areas such as these:[3]
- detecting intrusions in computer security
- finding credit-card fraud
- tracking changes in land use with remote sensing, which collects information about Earth from a distance, usually from aircraft or satellites[12]
Outliers in regression
In regression, an outlier is judged against the pattern linking the response (the variable being predicted) to the explanatory variables (the input variables used to predict it).[4]
Ordinary least squares is extremely sensitive to outliers. It minimizes the sum of squared residuals, the gaps between observed and fitted responses.[4]
Rousseeuw and Hubert sort points by two measures:[4]
- the residual from a robust fit
- the distance of the point's explanatory variables from those of the other points, where a large distance marks a leverage point
| Point type | Residual | Distance in explanatory variables | Effect |
|---|---|---|---|
| Regular observation | Small | Small | Normal data |
| Vertical outlier | Large | Small | Outlying response only |
| Good leverage point | Small | Large | Improves the accuracy of the fit |
| Bad leverage point | Large | Large | A regression outlier that is also a leverage point |
A robust alternative is least trimmed squares (LTS), which adds up only the smallest squared residuals. In a star data set, the LTS line fit the main-sequence stars and left four giant stars with large residuals. The giants were correct observations of a different population, not errors.[4]
Handling outliers
Iglewicz and Hoaglin separate three tasks:[2]
- Labeling: flag potential outliers for further investigation.
- Accommodation: use robust methods that are not changed too much by outliers.
- Identification: formally test whether observations are outliers.
NIST and Hyndman advise removing an outlier only for a known reason. NIST advises correcting a point shown to be erroneous if possible and deleting it if not, but not deleting a point without careful thought when there is no reason to think it is wrong.[6] Hyndman calls throwing away anomalies without understanding them a dangerous practice, since the most interesting observations are often the ones that look anomalous.[3]
Robust methods often give less weight to outlying points instead of deleting them.[6] Common robust measures of the center include:[13]
- The median, the middle value of the sorted data.
- The trimmed mean, the mean after dropping a share of points from each tail, often 5%.
- The Winsorized mean, which sets values beyond chosen percentiles equal to those percentiles instead of dropping them.
The ozone hole example
The discovery of the Antarctic ozone hole shows how outlier rules depend on their assumptions. A widespread story says NASA missed the hole because it threw away anomalous data, but Hyndman says this is a myth.[3]
NASA flagged daily satellite readings below 180 Dobson units as anomalous, a rule meant to catch instrument problems.[3] A Dobson unit measures the total amount of ozone in a column of air stretching from the ground to space, and the world average is roughly 300 Dobson units.[14] When NASA checked unusually low readings before 1985, other data available to it showed values of about 300 Dobson units, so it assumed the sensor was faulty.[3]
The hole was confirmed in two steps. British scientists had seen low values at Halley station as early as 1981 and published in 1985. NASA scientists confirmed the finding in 1986 and showed the hole was widespread across the Antarctic.[3]
Extreme events: kings and dragon kings
In heavy-tailed data, very large values are common enough that rules built for normal data flag many ordinary points as outliers.[10] Physicist Didier Sornette argues that some extreme events still do not belong to the same population as the others. He calls them dragon kings.[15]
Where the name comes from
The word "king" comes from Laherrère and Sornette (1998), whose idea is now known as the king effect.[15]
In certain countries, the wealth of everyone except the king follows a Pareto distribution, a kind of power law. The king's wealth is many times larger than that distribution predicts.[15]
Sornette's hypothesis is that dragon kings come from processes that magnify an effect and that are not necessarily fully active in the rest of the population.[15]
A log-log plot shows the idea. Both of its axes use logarithmic scales, where equal steps stand for equal ratios, so a power law appears as a straight line.
Evidence from city sizes
Statistical tests have been proposed to check whether the largest events depart from the distribution of the rest. Using such tests, Pisarenko and Sornette (2011) reported these results:[15]
- London is a dragon king among city sizes in Great Britain.
- Moscow and Saint Petersburg are dragon kings among city sizes in Russia.
- Paris is a dragon king among French urban areas.
- German cities show no dragon kings.
How dragon kings differ from outliers
The term "outlier" was once used for these events. Johansen and Sornette first called them "outliers" in their work on financial drawdowns, and the term was later dropped.[15] A drawdown is a fall in an asset's value from a previous high.[16]
Sornette treats the two kinds of extreme value differently. Statistical outliers usually mean data to be discarded as likely measurement errors, while dragon kings are treated as important parts of the system.[15]
Dragon kings also differ from black swans, which are seen as unforeseeable. Dragon kings linked to critical transitions, sudden changes of a system into a different regime, might in some cases be somewhat predictable.[15]
References
- What are outliers in the data? (7.1.6), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
- Detection of Outliers (1.3.5.17), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
- That's weird! Anomaly detection using R, Chapter 1: Introduction, Rob J Hyndman, OTexts, 2026.
- Anomaly Detection by Robust Statistics, Peter J. Rousseeuw and Mia Hubert, WIREs Data Mining and Knowledge Discovery, 2018.
- Stars, NASA Science, NASA.
- Grubbs' Test for Outliers (1.3.5.17.1), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
- Run-Sequence Plot (1.3.3.25), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
- That's weird! Anomaly detection using R, Chapter 5: Boxplots, Rob J Hyndman, OTexts, 2026.
- Boxplots: Definition, History, Extensions, and Examples, Karen Kafadar, WIREs Computational Statistics, 2026.
- That's weird! Anomaly detection using R, Chapter 4: Statistical tests, Rob J Hyndman, OTexts, 2026.
- There and back again: Outlier detection between statistical reasoning and data mining algorithms, Arthur Zimek and Peter Filzmoser, WIREs Data Mining and Knowledge Discovery, 2018.
- What is remote sensing?, National Ocean Service, NOAA.
- Measures of Location (1.3.5.1), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
- What is a Dobson Unit?, NASA Ozone Watch, NASA Goddard Space Flight Center.
- Dragon-kings: mechanisms, statistical methods and empirical evidence, Didier Sornette and Guy Ouillon, European Physical Journal Special Topics, 2012.
- Drawdown Minimization, Encyclopedia of Quantitative Finance, Wiley, 2010.
