Least absolute deviations

Intermediate

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

In statistical inference, least absolute deviations are a regression fit that minimises the sum of absolute residuals and tracks a conditional median. Squared residuals punish a wild point by the square of its distance, so one distant observation can swing a fitted line. Least absolute deviations fit the same linear summary by minimising the sum of absolute residuals instead. The criterion is an old alternative to least squares, and for a single location it picks a median. [1]

Least absolute deviations

Least absolute deviations
Fact Value
Topic Statistical inference
Listed on Statistical inference
Worked example 1

Motivating example

Three points sit at x=0,1,2x=0,1,2 with responses 0,0,30,0,3. The horizontal line y=0y=0 misses the third point by 3, so the sum of absolute residuals is 3. The line y=1.5xy=1.5x passes through (0,0)(0,0) and (2,3)(2,3) and misses (1,0)(1,0) by 1.5, so the sum is 1.5. The line through (1,0)(1,0) and (2,3)(2,3) misses the origin by 3. Among lines that pass through two of the points, y=1.5xy=1.5x has the smallest absolute-residual sum. That comparison is the geometric fact Dodge isolates for simple regression: a minimising line passes through at least two observations, and the pair is the one that makes the sum smallest. [1]

Definition

For the simple regression yi=β0+β1xi+εiy_i=\beta_0+\beta_1 x_i+\varepsilon_i, least absolute deviations chooses β^0\hat\beta_0 and β^1\hat\beta_1 to minimise

∑i∣ei∣=∑i∣yi−β^0−β^1xi∣.\sum_i |e_i|=\sum_i |y_i-\hat\beta_0-\hat\beta_1 x_i|.

There is no closed-form expression of the least-squares type. The fit is defined as the minimiser, and it is computed by an algorithm. The algorithm Dodge describes uses the fact that the regression line always crosses at least two data points. One searches, among lines through pairs of observations, for the pair whose line has the smallest sum of absolute residuals. [1]

In one dimension the same criterion estimates a location β0\beta_0 in yi=β0+εiy_i=\beta_0+\varepsilon_i by minimising ∑i∣yi−β0∣\sum_i |y_i-\beta_0|. That minimiser is a median of the observations. The regression fit is the extension of that idea to a line: absolute residuals rather than squared residuals, and no explicit formula. [1]

Ordinary least squares estimates the parameters by minimising the sum of squared deviations between the data and the model. NIST lists sensitivity to outliers among the disadvantages of that criterion: one or two unusual points can skew the fit. A line that minimises squared residuals and a line that minimises absolute residuals are not two attempts at one number. [2] [1]

Properties

Two particular cases appear when the algorithm is run. The solution need not be unique: at least two lines can share the same minimal sum of absolute residuals. Degeneracy, in Dodge’s geometric account, means the minimising line passes through more than two observations. The derivative of ∣e∣|e| does not exist at a zero residual, which is why the usual least-squares calculus does not deliver a closed equation at the solution. The algorithm searches pairs instead. [1]

For a single location the three descriptions agree when the criterion has a unique minimiser: the sample median, the minimiser of ∑∣yi−θ∣\sum |y_i-\theta|, and a centre at which the positive and negative residuals balance in the absolute-deviation sense. Boscovich’s eighteenth-century side condition, that the sums of the positive and negative residuals be equal, is the ancestor of that balance, together with the requirement that the sum of absolute residuals be minimal. [1]

A large residual still contributes to the sum, but only through its absolute value. Least squares contributes the square. That is the sense in which Dodge calls the L1 estimators less sensitive to outliers than least squares. The fit is not immune to a change of sign. A point that crosses the line changes which pair is best. [1]

Worked example

For the three points (0,0)(0,0), (1,0)(1,0), and (2,3)(2,3), the line through the first and third has slope 3/23/2 and equation y=1.5xy=1.5x. Absolute residuals are 00, 1.51.5, and 00, summing to 1.51.5. The line y=0y=0 has absolute residuals 00, 00, and 33, summing to 33. The line through (1,0)(1,0) and (2,3)(2,3) is y=−3+3xy=-3+3x, with absolute residuals 33, 00, and 00, summing to 33. The least absolute deviations fit among these pair-lines is y=1.5xy=1.5x, with criterion value 1.51.5. The mean of the three responses is 11, and the horizontal line at that mean has absolute residual sum ∣0−1∣+∣0−1∣+∣3−1∣=4|0-1|+|0-1|+|3-1|=4, larger still. [1]

Your turn. For the points (0,1)(0,1), (1,1)(1,1), and (2,5)(2,5), compute the sum of absolute residuals for the line y=1y=1 and for the line y=1+2xy=1+2x. Which sum is smaller?

The line y=1y=1 has absolute residuals 00, 00, and 44, summing to 44. The line y=1+2xy=1+2x has residuals 00, −2-2, and 00, summing to 22. The smaller sum is 22.

Assumptions and limits

The geometric claim that a solution passes through two observations is for simple regression. Non-uniqueness and degeneracy are both possible, so “the” least absolute deviations line may be a set of lines, or a line through more than two points. With a handful of points the pair search gives the minimal sum exactly, up to ties among pairs. An asymptotic standard error is a different summary, and Dodge’s history records that asymptotic theory for the regression estimator arrived late: Bassett and Koenker developed it in 1978, after a long period in which the lack of a closed formula and the lack of that theory kept the method out of routine use. The small-sample answer is the minimal sum itself. [1]

If the scientific target is the least-squares fit, absolute deviations estimate a different summary. Least squares is sensitive to unusual points; absolute deviations replace the square with the absolute value. Least absolute deviations is the estimator for that second criterion. It is not a re-expression of the least-squares coefficient. [2] [1]

Check yourself

Try these questions before opening an answer.

Three-point line

For the points (0,0), (1,0), and (2,3), what is the sum of absolute residuals of y=1.5x?

The sum is 1.5.

Horizontal comparison

For those same three points, what is the sum of absolute residuals of the line y=0?

The sum is 3.

A second triple

For (0,1), (1,1), and (2,5), which line has the smaller absolute-residual sum: y=1 or y=1+2x?

y=1+2x, with sum 2, against sum 4 for y=1.

History

Boscovich, in 1757, proposed two criteria for a line: the positive and negative residuals should balance, and the sum of absolute residuals should be minimal. He used the idea while reconciling inconsistent measurements. Laplace gave an analytical procedure for those criteria in 1793. Least squares, associated with Legendre and Gauss, then dominated, because the squared criterion has easy calculus and a closed linear solution. Through the first half of the twentieth century the numerical difficulty and the missing asymptotic theory kept L1 regression in the background. From about 1970 the computation became routine, Bassett and Koenker gave the asymptotic theory in 1978, and a 1987 conference in Neuchâtel was devoted to L1 methods. The one-dimensional ancestor remains the centre that minimises the sum of absolute deviations. [1]

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 e f g h i j k l a. (pp. 291, 299) b. (pp. 299–300) c. (pp. 299–300) d. (pp. 291, 299) e. (p. 299) f. (p. 300) g. (p. 291) h. (pp. 291, 299–300) i. (pp. 299–300) j. (pp. 291, 300) k. (p. 299) l. (pp. 291, 299) Dodge, Yadolah (2008). The Concise Encyclopedia of Statistics. Springer. https://doi.org/10.1007/978-0-387-32833-1
  2. ^ a b a. (§4.1.4.1, “Why Least Squares?” and “Disadvantages”) b. (§4.1.4.1, “Disadvantages of Linear Least Squares”) NIST/SEMATECH (2002). NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1: Linear Least Squares Regression. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm
Cite this page
Plain text
StatWiki (2026). "Least absolute deviations." StatWiki. Last updated 2 December 2026. https://www.statwiki.io/articles/least-absolute-deviations.html
BibTeX
@misc{statwiki_least_absolute_deviations,
  author = {{StatWiki}},
  title = {{Least absolute deviations}},
  year = {2026},
  url = {https://www.statwiki.io/articles/least-absolute-deviations.html},
  urldate = {2026-12-02},
  note = {StatWiki, last updated 2 December 2026}
}