Math 2.0

Statistics Definition

Ordinary least squares

Builds on Linear regressionLeast squaresRank of a matrixInvertible matrixOrthogonal projectionEstimator

Definition

Consider the linear regression model y=Xβ+εy = X \beta + \varepsilon with an n×pn \times p design matrix XX and response y∈ℝny \in \R^n. The ordinary least squares estimator of β\beta is a vector β^∈ℝp\hat\beta \in \R^p that minimises the residual sum of squares S(b)=∣y−Xb∣2=∑i=1n(yi−xiTb)2,b∈ℝp.S(b) = \abs{y - X b}^2 = \sum_{i=1}^n (y_i - x_i^T b)^2, \qquad b \in \R^p. If XX has rank pp, then XTXX^T X is invertible and the minimiser is unique: β^=(XTX)−1XTy.\hat\beta = (X^T X)^{-1} X^T y.

Remarks

The minimisers are exactly the solutions of the normal equations XTXb=XTyX^T X b = X^T y. The fitted vector y^=Xβ^=Hy\hat y = X \hat\beta = H y, with H=X(XTX)−1XTH = X (X^T X)^{-1} X^T, is the orthogonal projection of yy onto the column space of XX. So the residual vector y−y^y - \hat y is orthogonal to every column of XX.

Example: fit y=b0+b1ty = b_0 + b_1 t to the points (0,0)(0, 0), (1,1)(1, 1), (2,3)(2, 3). Here tˉ=1\bar t = 1 and yˉ=4/3\bar y = 4/3, so b1=∑(ti−tˉ)(yi−yˉ)/∑(ti−tˉ)2=3/2b_1 = \sum (t_i - \bar t)(y_i - \bar y) / \sum (t_i - \bar t)^2 = 3/2 and b0=yˉ−b1tˉ=−1/6b_0 = \bar y - b_1 \bar t = -1/6. Check: the residuals are 1/61/6, −1/3-1/3, 1/61/6, which sum to 00 and are orthogonal to (0,1,2)(0, 1, 2). Non-example: if two columns of XX are equal, XX has rank less than pp and XTXX^T X is singular. Then SS has infinitely many minimisers, so the formula above does not apply and β\beta is not identified.

Reading path

To understand this page from the ground up, read these 25 pages in order. The foundations come first.

Show the path as a graph
Estimator, concept, no evidence levelEstimatorconceptInvertible matrix, concept, no evidence levelInvertible matrixconceptLinear regression, concept, no evidence levelLinear regressionconceptMatrix, definition, no evidence levelMatrixdefinitionOrthogonal projection, concept, no evidence levelOrthogonal projectionconceptRank of a matrix, concept, no evidence levelRank of a matrixconceptVector space, definition, no evidence levelVector spacedefinitionTranspose, definition, no evidence levelTransposedefinitionInner product, definition, no evidence levelInner productdefinitionLinear map, definition, no evidence levelLinear mapdefinitionLinear subspace, definition, no evidence levelLinear subspacedefinitionNorm, definition, no evidence levelNormdefinitionInner product space, definition, no evidence levelInner product spacedefinitionOrthogonal vectors, definition, no evidence levelOrthogonal vectorsdefinitionEndomorphism, definition, no evidence levelEndomorphismdefinitionSum of subspaces, definition, no evidence levelSum of subspacesdefinitionNorm induced by an inner product, definition, no evidence levelNorm induced by an in…definitionOrthogonal complement, definition, no evidence levelOrthogonal complementdefinitionDirect sum of subspaces, definition, no evidence levelDirect sum of subspac…definitionA space is the direct sum of a subspace and its orthogonal complement, statement, no evidence levelA space is the direct…statementProjection, definition, no evidence levelProjectiondefinitionOrthogonal projection, definition, no evidence levelOrthogonal projectiondefinitionOrthogonal projection is the closest point, statement, no evidence levelOrthogonal projection…statementLeast squares, concept, no evidence levelLeast squaresconceptOrdinary least squares, definition, no evidence levelOrdinary least squaresdefinition
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Estimator concept
  2. Invertible matrix concept
  3. Linear regression concept
  4. Matrix definition
  5. Orthogonal projection concept
  6. Rank of a matrix concept
  7. Vector space definition
  8. Transpose definition
  9. Inner product definition
  10. Linear map definition
  11. Linear subspace definition
  12. Norm definition
  13. Inner product space definition
  14. Orthogonal vectors definition
  15. Endomorphism definition
  16. Sum of subspaces definition
  17. Norm induced by an inner product definition
  18. Orthogonal complement definition
  19. Direct sum of subspaces definition
  20. A space is the direct sum of a subspace and its orthogonal complement statement
  21. Projection definition
  22. Orthogonal projection definition
  23. Orthogonal projection is the closest point statement
  24. Least squares concept
  25. Ordinary least squares definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Ordinary_least_squares
About this page
Tag5Y3DYMPVEG
URIm2://5Y3DYMPVEG
Kinddefinition
WritingW0 stub
MSC62J05
DefinesOrdinary least squares
UsesLinear regression, Least squares, Rank of a matrix, Invertible matrix, Orthogonal projection, Estimator

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.