Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

9. Outliers and the rejection of data

School of Engineering, Nazarbayev University

Track: core  ·  Prerequisites: Chapters 4 and 5

Reading: Taylor, ch. 6 · Fornasini, ch. 9.3 · Huber and Ronchetti, Robust Statistics, ch. 1

Sooner or later every experimenter meets a reading that does not fit: one value far from the others with no obvious cause. Is it a mistake to be discarded, a rare but legitimate fluctuation, or the most interesting measurement of the day? Statistics cannot answer the question, but it can say how unusual the reading is, what discarding it does to the result, and how to compute results that are not at the mercy of a single bad value.

This chapter

  1. presents Chauvenet’s criterion, the classic rule for rejecting data;

  2. tests it by simulation, on clean data and on data with genuine blunders;

  3. introduces robust estimators (median, trimmed mean, Huber’s M-estimator) that limit the influence of outliers without discarding anything;

  4. ends with a practical policy.

9.1 Chauvenet’s criterion

From NN readings compute xˉ\bar x and ss. For the suspect reading xsusx_\text{sus} compute t=∣xsus−xˉ∣/st = |x_\text{sus} - \bar x|/s and the probability P(∣z∣>t)P(|z| > t) that a normal reading deviates at least this much. The expected number of such readings among NN is n=N P(∣z∣>t)n = N\,P(|z| > t). Chauvenet’s criterion rejects the suspect reading if n<12n < \tfrac12 (Taylor, ch. 6). The threshold tCt_\text{C} therefore grows with NN:

N =     5: reject beyond 1.64 standard deviations
N =    10: reject beyond 1.96 standard deviations
N =    20: reject beyond 2.24 standard deviations
N =    50: reject beyond 2.58 standard deviations
N =   100: reject beyond 2.81 standard deviations
N =  1000: reject beyond 3.48 standard deviations

ten lengths: mean 45.8, s = 5.07; the reading 58 lies 2.40 s from the mean, n = 0.16 -> reject

Taylor himself is careful to call the criterion a compromise and to note that many scientists are uncomfortable with it. Two features deserve a test. First, the threshold is chosen so that on average half a legitimate reading per data set would be rejected; how often does the criterion throw out good data? Second, xˉ\bar x and ss are computed with the suspect reading included, which pulls them towards it. What do these choices do to the final result?

9.2 Chauvenet’s criterion on clean data

Apply the criterion to many sets of NN perfectly normal readings, once (to the most deviant reading), as recommended, and also repeatedly until nothing more is rejected, which is a common misuse.

  N   sets losing a good reading (once)   good readings lost (repeated)   coverage: all   once   repeated
  5               0.132                          0.13                   0.625   0.567   0.567
 10               0.279                          0.38                   0.656   0.586   0.575
 20               0.326                          0.46                   0.673   0.625   0.610
 50               0.353                          0.49                   0.677   0.650   0.642

Applied once, the criterion discards a perfectly good reading in a substantial fraction of data sets. Applied repeatedly, it keeps going: after the first rejection ss shrinks, the next most extreme reading now looks deviant, and it too is removed. The damage to the result is less visible but more important: by removing the readings that make the scatter look large, the criterion makes ss too small, and the interval xˉ±s/N\bar x \pm s/\sqrt N covers the true value less often than it claims.

9.3 Data with real blunders

Rejection rules exist for data that do contain mistakes: a misread scale, a transcription error, a moment of contact with the apparatus. Model this by replacing each reading, with probability ε\varepsilon, by a blunder drawn from a much wider distribution (standard deviation 10 instead of 1). Compare five ways of estimating the centre:

  • the mean of all readings;

  • the mean after a single application of Chauvenet’s criterion;

  • the median;

  • the trimmed mean, discarding the lowest and highest 10 %;

  • Huber’s M-estimator, ep.huber_location, a weighted mean in which readings more than 1.345 robust standard deviations from the centre are down-weighted in proportion to their distance (the robust standard deviation is the median absolute deviation times 1.4826, ep.mad).

The measure of quality is the root-mean-square error over many simulated data sets of 20 readings.

contamination:          0%     2%     5%    10%    20%
mean                 0.223  0.389  0.543  0.748  1.023
Chauvenet, then mean 0.235  0.255  0.316  0.462  0.771
median               0.272  0.276  0.284  0.300  0.340
10 % trimmed mean    0.229  0.238  0.254  0.315  0.536
Huber M-estimate     0.230  0.239  0.248  0.276  0.362

ideal for clean data: 1/sqrt(20) = 0.224

Three conclusions follow.

  • On clean data the mean is best, as it must be (it is the maximum-likelihood estimate, Section 7.3). The median pays its price of about 20 % in uncertainty; the Huber estimate and the trimmed mean pay only a few per cent.

  • With even a few per cent of blunders the mean deteriorates quickly, and a single pass of Chauvenet’s criterion repairs only part of the damage, because it removes at most one reading and its threshold is computed from a standard deviation that the blunders themselves have inflated.

  • The robust estimators lose very little on clean data and stay close to the ideal as contamination grows. The Huber estimate is the best compromise across the whole range.

Robust estimators need uncertainties too. The bootstrap (Efron 1979; ep.bootstrap) provides one without any formula: draw many new samples of the same size from the data themselves, with replacement, compute the estimator for each, and take the standard deviation of the results as its standard uncertainty. (The jackknife of Section 17.5 is a close relative.) In the example below, two of twenty readings are blunders, both on the high side.

mean   : 10.30 ± 0.26
median : 9.97 ± 0.19
Huber  : 10.06 ± 0.17
true value 10.0; standard error of the mean of 20 clean readings: 0.11
<Figure size 1012x792 with 4 Axes>

(a) Chauvenet’s threshold against the number of readings, compared with a threshold that limits the chance of rejecting any good reading in a data set to 5 %. (b) Coverage of the usual interval after applying the criterion to clean data. (c) Accuracy of five estimators of the centre as blunders are added. (d) A data set with two blunders and three estimates of its centre.

9.4 A policy for suspect data

  1. Investigate first. Check the notebook, the instrument, the conditions. A reading with a known cause (a dropped weight, a misrecorded digit) is removed for that cause, whatever its size.

  2. Never reject silently. Report every rejected value, the reason, and the result with and without it. A reader who disagrees can then recompute.

  3. Prefer robust estimates to rejection rules when blunders are expected but cannot be identified individually. They use all the data and degrade gracefully.

  4. Be suspicious of your own suspicion. Readings that disagree with the expected answer are scrutinised more closely than readings that agree, which biases the result towards expectation. Decide the rule before seeing the data.

  5. Remember the history of science. Some outliers are discoveries.

Formal tests for a single outlier with a stated false-alarm probability, such as Grubbs’ test, are preferable to Chauvenet’s fixed n<12n < \tfrac12 when a test is wanted at all.

Summary

  • Chauvenet’s criterion rejects a reading if fewer than half a reading that deviant would be expected among NN; the threshold rises with NN.

  • On clean data it removes good readings in a sizeable fraction of data sets and makes the quoted uncertainty too small, especially if applied repeatedly.

  • Robust estimators (median, trimmed mean, Huber) resist blunders without discarding data; Huber’s estimator loses only a few per cent on clean data.

  • Investigate, document, and report with and without suspect values.

References

  • P. J. Huber and E. M. Ronchetti, Robust Statistics, 2nd ed. (Wiley, 2009).

  • B. Efron, “Bootstrap methods: another look at the jackknife”, Ann. Statist. 7, 1 (1979).

  • B. Efron and R. J. Tibshirani, An Introduction to the Bootstrap (Chapman & Hall, 1993).

  • F. E. Grubbs, “Procedures for detecting outlying observations in samples”, Technometrics 11, 1 (1969).

Exercises

  1. Apply Chauvenet’s criterion to the ten lengths of Section 9.1 a second time, after removing the value 58. What happens, and why does Taylor advise against doing this?

  2. Show that Chauvenet’s threshold for NN readings is the 1−1/(4N)1 - 1/(4N) quantile of the standard normal distribution.

  3. Repeat the simulation of Section 9.3 with blunders that are all positive (for example a reading error that always adds 5). Which estimators are now biased, and by how much?

  4. For normal data, the efficiency of the median relative to the mean tends to 2/π2/\pi. Verify by simulation for N=101N = 101.

  5. Find the Huber constant cc that gives 90 % efficiency on normal data, and compare its performance with c=1.345c = 1.345 at 10 % contamination.