Ordinary Least Squares (OLS)
Ordinary Least Squares Regression · Also known as: OLS, OLS regression, linear least squares, classical linear regression, least squares estimation
Ordinary Least Squares (OLS) is the canonical method for estimating the parameters of a linear regression model by minimizing the sum of squared differences between observed and predicted values. First published by Adrien-Marie Legendre in 1805 and independently developed by Carl Friedrich Gauss (who claimed priority from 1795), OLS is provably optimal under the Gauss-Markov theorem: given its assumptions, it yields the Best Linear Unbiased Estimator (BLUE) of the regression coefficients.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use OLS when the outcome variable is continuous and you hypothesize a linear relationship between it and one or more predictors. The method is appropriate under the classical linear regression assumptions: (1) the true model is linear in the parameters; (2) the predictor matrix X has full column rank (no perfect multicollinearity); (3) the errors have zero conditional mean E(ε | X) = 0 (exogeneity); (4) errors are homoskedastic with constant variance σ²; and (5) errors are uncorrelated across observations. Under these five conditions, the Gauss-Markov theorem guarantees that OLS is BLUE. If errors are also normally distributed, exact t- and F-inference follows in finite samples. Violations of homoskedasticity call for heteroskedasticity-robust standard errors or Weighted Least Squares; serial correlation calls for feasible GLS; endogeneity calls for Instrumental Variables or Two-Stage Least Squares.
Strengths & limitations
- Closed-form analytical solution — no iterative optimization is required, making computation fast and numerically stable.
- Optimal under the Gauss-Markov conditions: BLUE among all linear unbiased estimators.
- Coefficient estimates have a direct causal/associational interpretation as marginal effects, holding other predictors constant.
- Rich inferential toolkit: t-tests, F-tests, confidence intervals, and R² all follow naturally from the OLS framework.
- Universal availability in every statistical software package and transparent enough to audit by hand for small systems.
- Assumes a correctly specified linear functional form; nonlinear relationships require transformations or nonlinear models.
- Sensitive to outliers and high-leverage observations because squared errors magnify the influence of extreme points.
- Inefficient and standard errors are incorrect under heteroskedasticity or autocorrelation unless corrections are applied.
- Produces biased and inconsistent estimates when predictors are endogenous (correlated with the error term).
- Coefficient estimates are unstable and difficult to interpret when predictors are highly collinear.
Frequently asked
What does the Gauss-Markov theorem actually guarantee?
Under five classical assumptions — linearity, full rank X, zero conditional mean errors, homoskedasticity, and uncorrelated errors — the Gauss-Markov theorem proves that the OLS estimator has the smallest variance among all estimators that are both linear in y and unbiased. This is the 'BLUE' property. It does not require the errors to be normally distributed; that additional assumption is needed only for exact finite-sample t- and F-inference.
When should I use robust standard errors instead of conventional OLS standard errors?
When the homoskedasticity assumption is in doubt — that is, when the variance of the errors may differ across observations — conventional OLS standard errors are incorrect, even though the coefficient estimates β̂ remain consistent. Heteroskedasticity-robust (White) standard errors correct the estimated covariance matrix without requiring a specific model for the variance. They are now routinely used in applied econometrics as a precaution even when heteroskedasticity is not strongly suspected.
How is OLS different from Maximum Likelihood Estimation (MLE) for a linear model?
When the errors are assumed to be independent and identically distributed as Normal(0, σ²), the OLS estimator of β is identical to the MLE. OLS does not require the normality assumption to obtain the point estimates; it only requires it for exact distributional results in small samples. MLE for non-normal error distributions (e.g. logistic, Poisson) yields different estimating equations and requires iterative optimization rather than the OLS closed form.
What is the difference between OLS and Weighted Least Squares (WLS)?
OLS treats all observations equally. WLS generalizes this by assigning a weight wᵢ to each observation, minimizing Σwᵢ(yᵢ − xᵢᵀβ)². WLS is the appropriate estimator when the error variances are known to differ proportionally across observations (heteroskedasticity with a known structure), or when observations represent aggregates with different reliabilities. Under the Gauss-Markov framework, WLS is more efficient than OLS in the presence of heteroskedasticity.
Sources
- Legendre, A.-M. (1805). Nouvelles méthodes pour la détermination des orbites des comètes. Firmin Didot, Paris. [Appendix: Sur la Méthode des moindres quarrés, pp. 72–80.] link ↗
- Gauss, C. F. (1809). Theoria Motus Corporum Coelestium in Sectionibus Conicis Solem Ambientium. Perthes & Besser, Hamburg. link ↗
- Wooldridge, J. M. (2019). Introductory Econometrics: A Modern Approach (7th ed.). Cengage Learning. ISBN: 978-1337558860
- Greene, W. H. (2018). Econometric Analysis (8th ed.). Pearson. ISBN: 978-0134461366
How to cite this page
ScholarGate. (2026, June 3). Ordinary Least Squares Regression. ScholarGate. https://scholargate.app/en/statistics/ordinary-least-squares
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Generalized Least SquaresStatistics↔ compare
- Instrumental Variables in Health ResearchHealth Economics↔ compare
- Lasso RegressionMachine learning↔ compare
- Multiple Linear RegressionStatistics↔ compare
- Ridge RegressionMachine learning↔ compare
- Robust RegressionStatistics↔ compare
- Simple Linear RegressionStatistics↔ compare
- Weighted Least SquaresStatistics↔ compare