Search topics and sections

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.

Dot plot with an outlier, showing mean and median0102030405060median 6.28mean 17.65four values near 6.3typo: 63.10 (should be 6.31)
Four measurements cluster near 6.3. A fifth value was mistyped as 63.10 instead of 6.31. The typo pulls the mean up to 17.6517.65, far from the clean mean of 6.296.29, while the median stays at 6.286.28.

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 1/n1/n for nn observations, which goes to 0% for large nn.[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]

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 Q1Q_1 is the lower quartile and Q3Q_3 the upper quartile, the interquartile range is IQR=Q3−Q1\mathrm{IQR} = Q_3 - Q_1.[1] Four cutoffs, called fences, follow from it:

inner fences: Q1−1.5 IQR,Q3+1.5 IQR\text{inner fences: } Q_1 - 1.5\,\mathrm{IQR},\quad Q_3 + 1.5\,\mathrm{IQR}
outer fences: Q1−3 IQR,Q3+3 IQR\text{outer fences: } Q_1 - 3\,\mathrm{IQR},\quad Q_3 + 3\,\mathrm{IQR}

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]

Box plot with inner and outer fences outer fence inner fence inner fence outer fence 3 IQR IQR = 312.5 1.5 IQR mild outlier (1441) median 559.5 Q1 429.75 Q3 742.25 -600 -300 0 300 600 900 1200 1500 1800
Box plot of the NIST 90-point example. The box runs from Q1=429.75Q_1 = 429.75 to Q3=742.25Q_3 = 742.25 (IQR=312.5\text{IQR} = 312.5), the inner fences sit 1.5 IQR1.5\,\text{IQR} beyond the quartiles at −39-39 and 12111211, and the outer fences sit 3 IQR3\,\text{IQR} beyond them at −507.75-507.75 and 1679.751679.75. The value 1441 falls between the upper inner and outer fences, so it is a mild outlier.

In a NIST example with 90 observations, Q1=429.75Q_1 = 429.75, Q3=742.25Q_3 = 742.25, and IQR=312.5\mathrm{IQR} = 312.5. The inner fences are at −39.0-39.0 and 1211.01211.0, and the outer fences at −507.75-507.75 and 1679.751679.75. 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]

zi=xi−xˉsz_i = \frac{x_i - \bar{x}}{s}

Here xix_i is one observation, xˉ\bar{x} is the sample mean, and ss is the sample standard deviation. Some books flag values with ∣zi∣|z_i| above a threshold, usually 3.[10]

This rule has known problems. Hyndman lists three:[10]

  1. Outliers inflate the mean and standard deviation used to compute zz, so they hide themselves.
  2. A fixed threshold flags more ordinary points as the sample grows.
  3. Most real data are not exactly normal.

The first problem has a hard limit. In a sample of nn values, no z-score can exceed (n−1)/n(n-1)/\sqrt{n} in absolute value.[2] So with n≤10n \le 10, 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]

Mi=0.6745 (xi−x~)MADM_i = \frac{0.6745\,(x_i - \tilde{x})}{\mathrm{MAD}}

Here x~\tilde{x} is the median and MAD is the median absolute deviation, the median of the distances ∣xi−x~∣|x_i - \tilde{x}|. They recommend labeling values with ∣Mi∣>3.5|M_i| > 3.5 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 ∣z∣>c|z| > c, where cc 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 cc at the (1−0.25/n)(1 - 0.25/n) 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 nn, 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]

G=max⁡i∣xi−xˉ∣sG = \frac{\max_i |x_i - \bar{x}|}{s}

The test uses a significance level α\alpha, the chance of a false alarm the test allows. For the two-sided test with NN observations, the hypothesis of no outliers is rejected when[6]

G>N−1Ntα/(2N), N−22N−2+tα/(2N), N−22G > \frac{N-1}{\sqrt{N}}\sqrt{\frac{t^2_{\alpha/(2N),\,N-2}}{N-2+t^2_{\alpha/(2N),\,N-2}}}

Here tα/(2N), N−2t_{\alpha/(2N),\,N-2} is the critical value of the t distribution with N−2N-2 degrees of freedom at significance level α/(2N)\alpha/(2N). 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 α/N\alpha/N.[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 G=2.4687G = 2.4687, above the critical value 2.032 at α=0.05\alpha = 0.05, 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]

Q=x(n)−x(n−1)x(n)−x(1)Q = \frac{x_{(n)} - x_{(n-1)}}{x_{(n)} - x_{(1)}}

Here x(1)≤⋯≤x(n)x_{(1)} \le \dots \le x_{(n)} 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.

A bivariate outlier in a scatter plotoutlier onlyin combinationvariable 1variable 2
The red point lies within the range of the other points on each variable taken alone, but it falls well below the band they form. It is an outlier only when both variables are considered together.

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]

MD(x)=(x−μ^)T Σ^−1 (x−μ^)\mathrm{MD}(\mathbf{x}) = \sqrt{(\mathbf{x} - \hat{\boldsymbol{\mu}})^{\mathsf{T}}\, \hat{\Sigma}^{-1}\, (\mathbf{x} - \hat{\boldsymbol{\mu}})}

Here x\mathbf{x} is the point, μ^\hat{\boldsymbol{\mu}} is the mean vector, and Σ^\hat{\Sigma} 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 MD(x)≤χd,0.9752\mathrm{MD}(\mathbf{x}) \le \sqrt{\chi^2_{d,0.975}}. Here χd,0.9752\chi^2_{d,0.975} is the 0.975 quantile, the cutoff below which 97.5% of values fall, of the chi-squared distribution with dd degrees of freedom, and dd 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]

Masking of outliers by a classical covariance ellipse classical 97.5% ellipse robust (MCD) 97.5% ellipse outliers masked by classical fit variable 1 variable 2
Outliers pull the classical mean and covariance toward themselves, so the classical 97.5% tolerance ellipse stretches to include them. The robust minimum covariance determinant (MCD) ellipse is fitted to most of the data while leaving unusual points out, so the three outliers fall clearly outside it.

Robust distances fix this by using a center and spread fitted to the majority. The minimum covariance determinant (MCD) method searches for the hh observations whose covariance matrix has the smallest determinant.[4]

The MCD uses the mean of those hh 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 (n−h+1)/n(n - h + 1)/n. It is highest when h=⌊(n+d+1)/2⌋h = \lfloor (n + d + 1)/2 \rfloor, and Rousseeuw and Hubert suggest a value such as 0.75n0.75n 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
Types of outliers in linear regressionvertical outliergood leverage pointbad leverage pointregular observationrobust fitleast squares fitresponseexplanatory variable
In a simple linear regression, a vertical outlier has an unusual response. A good leverage point has an extreme explanatory value but follows the trend, and a bad leverage point pulls the least squares fit away from the robust fit.
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 hh 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.

A dragon king in a power-law tailpower law fitted to the restextrapolationdragon kingmuch larger than predictedevent size (log scale)fraction of events larger (log scale)
Both axes use logarithmic scales, so the fraction of events larger than a given size follows a straight power-law line for most events. A dragon king lies far to the right of where that line, extended beyond the observed data, puts the largest event.

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

  1. What are outliers in the data? (7.1.6), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
  2. Detection of Outliers (1.3.5.17), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
  3. That's weird! Anomaly detection using R, Chapter 1: Introduction, Rob J Hyndman, OTexts, 2026.
  4. Anomaly Detection by Robust Statistics, Peter J. Rousseeuw and Mia Hubert, WIREs Data Mining and Knowledge Discovery, 2018.
  5. Stars, NASA Science, NASA.
  6. Grubbs' Test for Outliers (1.3.5.17.1), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
  7. Run-Sequence Plot (1.3.3.25), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
  8. That's weird! Anomaly detection using R, Chapter 5: Boxplots, Rob J Hyndman, OTexts, 2026.
  9. Boxplots: Definition, History, Extensions, and Examples, Karen Kafadar, WIREs Computational Statistics, 2026.
  10. That's weird! Anomaly detection using R, Chapter 4: Statistical tests, Rob J Hyndman, OTexts, 2026.
  11. 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.
  12. What is remote sensing?, National Ocean Service, NOAA.
  13. Measures of Location (1.3.5.1), NIST/SEMATECH e-Handbook of Statistical Methods, NIST, 2012.
  14. What is a Dobson Unit?, NASA Ozone Watch, NASA Goddard Space Flight Center.
  15. Dragon-kings: mechanisms, statistical methods and empirical evidence, Didier Sornette and Guy Ouillon, European Physical Journal Special Topics, 2012.
  16. Drawdown Minimization, Encyclopedia of Quantitative Finance, Wiley, 2010.

Figure