Linear regression Created 2026-09-24 Updated 2026-10-14
Linear regression models a response's conditional expectation as a linear combination of specified predictors. In matrix form,where the design matrix describes the observations, contains the regression coefficients, and contains the errors. The fitted values estimate the response means. The model is linear in its regression coefficients; its columns may include powers, interactions, or other transformed predictors, so polynomial regression can fit curved relationships using the same machinery.
For a concrete example, take five constructed observationsAn ordinary least squares fit with an intercept gives the line . Its regression residuals are and its residual sum of squares is . A one-unit increase in the predictor corresponds to a one-unit increase in the fitted response. This is a description of this fitted association; interpreting a change as a causal effect requires the assumptions of a causal inference problem.
A five-point least-squares fit separates the fitted trend from residual deviations
. Details. The geometric reason for the fit is simple. The possible mean vectors form the column space of . Ordinary least squares chooses the orthogonal projection of the data vector onto that vector subspace, so the remaining regression residual is orthogonal to every permitted fitted direction. The least-squares normal equations express this orthogonality as . The data's explained component and unexplained component are therefore separated by the same geometry used in a Hilbert space.
The optimization definition makes sense for any observed data. Quantifying the uncertainty of the regression coefficients needs additional assumptions about the sampling and errors. With fixed of full column rank and mean-zero errors with covariance matrix , ordinary least squares is unbiased and has covariance ; the Gauss-Markov theorem compares it with other linear unbiased estimators. A normal linear model additionally makes Student t-distribution intervals and tests exact in finite samples. Model adequacy and predictive assessment remain relevant even when these calculations are available.
Two historical settings help explain the subject's appeal. Adrien-Marie Legendre's Nouvelles méthodes pour la détermination des orbites des comètes (1805) includes an appendix on the method of least squares: observations give more equations than unknowns, and squared errors provide a criterion for reconciling them. Its astronomical setting shows the motivation for combining imperfect measurements. [ref]
https://www.e-rara.ch/zut/content/titleinfo/10838079. Legendre, Nouvelles méthodes pour la détermination des orbites des comètes, 1805, appendix pp. 72–80
Francis Galton's Regression Towards Mediocrity in Hereditary Stature (1886) examines the association between parental and offspring heights and the tendency of group averages toward the population average. This is a historical use of the regression name; the modern linear model is a general statistical formulation. [ref]https://zenodo.org/records/1449548. Galton, Regression Towards Mediocrity in Hereditary Stature, 1886, original article
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 3 20H a Solution Created 2026-09-24 Updated 2026-10-05
The Gauss-Markov theorem states that with full-column-rank design, mean-zero errors and covariance , the ordinary least squares estimator is the best linear unbiased estimator: its covariance is no larger than any other such estimator's in the Loewner order. Normality is unnecessary for that theorem.
In the given normal linear model, maximizing the likelihood function is equivalent to minimizing . The normal equations and full rank giveFor a direct variance comparison, write . Unbiasedness for every requires . Set and , so . The cross covariance terms vanish because . ThereforeThis proves the requested comparison for every contrast without relying only on the theorem's name.
Past exam of the mathematics course of the University of Cambridge 2019 ib Paper 4 19H b Solution Created 2026-09-24 Updated 2026-09-29
For this model, the Gauss-Markov theorem states that is the unique minimum-variance linear unbiased estimator of : ifis unbiased for every , then .
Indeed,so unbiasedness is equivalent to . WriteThe constraint becomes . Since the errors are independent with common variance ,Equality holds exactly when every , which gives and .
Past exam of the mathematics course of the University of Cambridge 2022 ib Paper 3 18H c Solution Created 2026-09-24 Updated 2026-09-25
Write , whereAny other linear unbiased estimator is with , so and . The cross covariance vanishes becauseThereforeBy the Gauss-Markov theorem,
Put , with . Then , and therefore ; its transpose also vanishes. Expanding givesHenceThe difference from the least-squares covariance is positive semidefinite, since . In particular its th diagonal entry is , proving every stated variance inequality. For estimating , prefer least squares: among linear unbiased estimators it has minimum variance, and therefore minimum mean squared error in that class. A competitor can tie if the first row of is zero. This is the Gauss-Markov theorem; it does not assert optimality against all biased or nonlinear estimators.
Put . By (i), . Thus , and its transpose vanishes too. Expanding yieldsThe covariance difference is positive semidefinite. In particular its th diagonal entry is , proving the requested componentwise variance inequalities. Prefer within the class of linear unbiased estimators, since it has the least variance and the same expectation. A tie is possible if the first row of is zero. This is the Gauss-Markov theorem conclusion; no normal-distribution assumption on the errors is required.
