Robust statistics

Intermediate

What you need first. Nothing else on this path comes first. This page is part of Statistical inference.

In statistical inference, robust statistics are summaries and fits that barely move when a small fraction of the data is moved a long way. A summary or a fit is robust when a small fraction of the data, moved a long way, does not move the answer very much. The median is the standard case. The arithmetic mean is not. Extreme changes to a small portion of the observations leave a robust method nearly where it was, and they pull a least-squares method with them.[1][2]

Robust statistics

Robust statistics
Fact Value
Topic Statistical inference
Listed on Statistical inference
Worked example 1

Motivating example

In a sample of 50 Lending Club loans, one had an interest rate of 26.3%. Replacing that one rate by 15%, or by 35%, leaves the median and the interquartile range where they were and shifts the mean and the standard deviation. In the published comparison the median stays at 9.93% and the interquartile range stays at 5.76 percentage points, while the mean moves from 11.57% to 11.34% or to 11.74% and the standard deviation moves from 5.05 to 4.61 or to 5.68. The two robust summaries describe the centre and the spread of the bulk of the loans. The mean describes a centre that has been pulled toward the extreme loan. Which description is wanted depends on the question. A typical loan is closer to the median. A total amount of money, added up across many loans, follows the mean.[2]

Intuition

Squared error charges a residual of size 10 as 100, and a residual of size 1 as 1. A single wild point can therefore dominate the fit. Absolute error charges that residual as 10, in proportion to its size. Huber’s loss uses the square while the residual is smaller than a chosen cutoff and then switches to a straight line, so ordinary points keep the efficiency of least squares and gross points lose their squared leverage. At a fixed covariate value, population squared-error loss is minimised by the conditional mean when the conditional second moment is finite, and population absolute-error loss is minimised by a conditional median when the conditional first absolute moment is finite. These targets can agree even for a symmetric heavy-tailed conditional distribution. In a finite sample, a gross response error can affect the squared-error and absolute-error fits differently, even when their population targets agree.[3][4]

Definition

A statistical method is robust when extreme changes to a small portion of the data do not change its answer strongly. An estimator of a regression coefficient, or of a location, is robust in the same sense when it is not sensitive to outliers or to small departures from the model that was written down. The arithmetic mean and other least-squares estimators are sensitive to outliers of that kind. The term for this resistance was introduced by Box in 1953, and the subject was recognised as a field by the middle of the 1960s. Laplace had already studied the distribution of the median in 1818, in the second supplement to the analytic theory of probability. Huber’s 1964 paper on robust estimation of a location parameter separated the later M-estimators from ordinary least squares.[1][4]

For a location tt and observations y1,…,yny_1,\ldots,y_n, least squares minimises ∑i(yi−t)2\sum_i(y_i-t)^2 and returns the sample mean. Least absolute deviations minimises ∑i∣yi−t∣\sum_i|y_i-t| and returns a sample median. An M-estimator replaces the square by a symmetric function δ\delta with a unique minimum at zero, and minimises ∑iδ(yi−t)\sum_i\delta(y_i-t). Huber’s choice, for a positive cutoff kk, is the square x2/2x^2/2 when ∣x∣≤k|x|\le k and the line k∣x∣−k2/2k|x|-k^2/2 when ∣x∣>k|x|>k. The absolute-deviation estimator is the special case of a pure line, δ(x)=∣x∣\delta(x)=|x|.[4][3]

In regression the same replacement is made inside the loss L(y,f(x))L(y,f(x)). Squared error, absolute error, and Huber loss are three such choices. The fitted function changes with the loss. Huber’s regression form is (y−f(x))2(y-f(x))^2 while ∣y−f(x)∣≤δ|y-f(x)|\le\delta, and 2δ∣y−f(x)∣−δ22\delta|y-f(x)|-\delta^2 otherwise.[3]

Properties

Write the sum of squared deviations from a candidate location tt as the quadratic

S(t)=∑i=1n(yi−t)2=∑i=1nyi2−2t∑i=1nyi+nt2.S(t)=\sum_{i=1}^{n}(y_i-t)^2=\sum_{i=1}^{n}y_i^2-2t\sum_{i=1}^{n}y_i+nt^2.

Its derivative is S′(t)=−2∑iyi+2nt=2n(t−yˉ)S'(t)=-2\sum_i y_i+2nt=2n(t-\bar y), which is zero only at the sample mean yˉ\bar y. The second derivative is 2n>02n>0, so that critical point is a minimum. The mean is the least-squares location because it is the unique minimiser of this quadratic.

On the five numbers 1,2,3,4,201,2,3,4,20 the mean is 66 and the median is 33. Here ∑yi=30\sum y_i=30 and ∑yi2=430\sum y_i^2=430, so

S(t)=430−60t+5t2,S′(t)=10(t−6).S(t)=430-60t+5t^2,\qquad S'(t)=10(t-6).

The derivative vanishes at 66. Direct evaluation gives S(6)=250S(6)=250, S(5)=255S(5)=255 and S(7)=255S(7)=255. Moving one unit away from the mean raises the sum of squares by 55, which is the comparison that illustrates the identity just proved. The same quadratic at the median is S(3)=295S(3)=295. The sum of absolute deviations is 2828 at the mean and 2121 at the median, so the median wins the L1L_1 criterion and the mean wins least squares. Moving 2020 still further moves the mean and leaves the median at 33 until the extreme point crosses the middle of the ordered sample. That is the small-sample picture of robustness: the median’s breakdown happens only when the extreme points become half the sample, while the mean moves as soon as one point moves.[2][1][4]

Under Gaussian errors, least squares is efficient, and a robust criterion is chosen to stay close to that efficiency while resisting the long tail. Huber loss is built for that compromise. Absolute loss resists gross outliers more strongly and gives up more efficiency when the errors really are Gaussian.[3]

A median, an interquartile range, or an absolute-deviation fit is the summary to use when a few observations may be misrecorded and the target is the centre of the remaining mass. The mean and least squares are the summary to use when the squared loss really is the loss of interest, for example when the total of many units is the quantity to be reported, and when the extremes are genuine rather than mistakes. If a robust regression is fitted, the loss has to be named. A Huber fit with a large cutoff is least squares. A Huber fit with a small cutoff is close to absolute deviations.[3][4][2]

Worked example

The sample is 1,2,3,4,201,2,3,4,20. The mean is (1+2+3+4+20)/5=6(1+2+3+4+20)/5=6 and the median is 33.

The squared-error sum is the quadratic S(t)=430−60t+5t2S(t)=430-60t+5t^2. Then S′(t)=10(t−6)S'(t)=10(t-6), so the critical point is t=6t=6. Squared deviations from 66 are 25,16,9,4,19625,16,9,4,196, which add to 250250. Squared deviations from the neighbours 55 and 77 add to 255255 and 255255. Squared deviations from the median 33 are 4,1,0,1,2894,1,0,1,289, which add to 295295. The neighbour comparison illustrates the derivative calculation: the sum of squares is smaller at the mean than one unit away. Absolute deviations from 66 are 5,4,3,2,145,4,3,2,14, which add to 2828. Absolute deviations from 33 are 2,1,0,1,172,1,0,1,17, which add to 2121. The least-absolute location is 33 because that sum is the smaller of the two absolute-deviation sums. Replacing 2020 by 200200 moves the mean to (1+2+3+4+200)/5=42(1+2+3+4+200)/5=42 and leaves the median at 33. One recording error of that size changes the mean by 3636 and the median by nothing.[4][2]

Your turn. For the sample 5,5,5,5,1005,5,5,5,100, compute the mean, the median, and the sum of absolute deviations from each.

The mean is 120/5=24120/5=24 and the median is 55. Absolute deviations from 2424 are 1919 four times and 7676 once, totalling 152152. Absolute deviations from 55 total 9595. The median has the smaller absolute-deviation sum.

Assumptions and limits

The guarantee is comparative: under contamination of a few points, the robust summary moves less than least squares. Equality with the population quantity of a model the data do not follow is a separate requirement, and robustness does not supply it. Huber’s cutoff kk has to be chosen. Very large kk recovers least squares and its sensitivity. Very small kk recovers a fit close to absolute deviations and its loss of efficiency on clean Gaussian errors. A shift that moves every observation, such as a miscalibrated instrument, moves the median by the same amount as the mean. Robustness here is resistance to a small fraction of wild points. Outliers in the predictors, as opposed to the response, are a separate problem. A wild xx can lever a line even when the loss on yy is robust. Absolute deviations applied to a straight line still fit a straight line. They change the influence of the points, not the list of curves under consideration.[3][4][1]

Connections

An outlier is the kind of point robust methods are built to resist. Least squares is the non-robust extreme of the same location and regression problem, and it is the procedure whose criterion S(t)S(t) is minimised at the mean. Mean squared error is the risk that least squares minimises, and it is the wrong score if the loss of interest is absolute. The bias of an estimator is a different defect: a median can be robust and still be biased for a mean. When the question is a total, the mean carries the information and the median throws the large values away. The interest-rate comparison and the loan-amount comparison in the same data set point in different directions for that reason.[3][4][2]

Check yourself

Try these questions before opening an answer.

Absolute deviations

For 1, 2, 3, 4 and 20, what are the sums of absolute deviations from the mean 6 and from the median 3?

The sums are 28 at the mean and 21 at the median.

Squared deviations

For the same five numbers, what are the sums of squared deviations from 6 and from 3?

The sums are 250 at the mean and 295 at the median.

One wild point

For 5, 5, 5, 5 and 100, what are the mean and the sum of absolute deviations from the median?

The mean is 24 and the sum of absolute deviations from the median 5 is 95.

See also

Line chart · Apriori algorithm · Asymptotic analysis · Average treatment effect · Base rate · Bayesian inference · Bayesian model · Bayesian probability

Glossary and index

References

  1. ^ a b c d a. (Glossary, "robust methods") b. (Glossary, "robust methods") c. (Glossary, "robust methods") d. (Glossary, "robust methods") Heckert, N. A., Filliben, J. J., Croarkin, C. M., Hembree, B., Guthrie, W. F., Tobias, P. & Prinz, J. (2002). Handbook 151: NIST/SEMATECH e-Handbook of Statistical Methods, Glossary. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/glossary.htm
  2. ^ a b c d e f a. (Ch. 2, §2.1.6) b. (Ch. 2, §2.1.6) c. (Ch. 2, §2.1.6) d. (Ch. 2, §2.1.6, mean versus median for a total) e. (Ch. 2, §2.1.6) f. (Ch. 2, §2.1.6) Diez, D. M., Çetinkaya-Rundel, M. & Barr, C. D. (2019). OpenIntro Statistics (4th ed.). OpenIntro. https://www.openintro.org/book/os/
  3. ^ a b c d e f g a. (pp. 349–350, §10.6, squared error, absolute error, and Huber loss) b. (p. 349, §10.6, equation (10.23)) c. (pp. 349–350, §10.6) d. (p. 349, §10.6) e. (pp. 349–350, §10.6) f. (p. 349, §10.6) g. (p. 349, §10.6) Hastie, T., Tibshirani, R. & Friedman, J. (2009). The Elements of Statistical Learning. Springer. https://doi.org/10.1007/978-0-387-84858-7
  4. ^ a b c d e f g h a. (p. 464, replacing the square by a function δ) b. (pp. 463–464) c. (p. 464) d. (p. 464) e. (p. 463, least squares is sensitive to outliers) f. (p. 464, L1L_1 and least squares) g. (pp. 463–464, the role of kk, and outliers) h. (p. 463) Dodge, Yadolah (2008). The Concise Encyclopedia of Statistics. Springer. https://doi.org/10.1007/978-0-387-32833-1
Cite this page
Plain text
StatWiki (2026). "Robust statistics." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/robust-statistics.html
BibTeX
@misc{statwiki_robust_statistics,
  author = {{StatWiki}},
  title = {{Robust statistics}},
  year = {2026},
  url = {https://www.statwiki.io/articles/robust-statistics.html},
  urldate = {2026-12-02},
  note = {StatWiki, last updated 2 December 2026}
}