Least Squares as Maximum Likelihood
Context: FIT2086_MOC ยท the bridge that licenses everything downstream โ least squares is maximum likelihood under normal errors, which is why a likelihood-based criterion can score regression models (Model Selection and Information Criteria (AIC, BIC)) and why residuals get a normal predictive distribution
Quick Revision
- ๐ฏ Objective: put on the regression errors โ the negative log-likelihood becomes โ minimising NLL in = minimising RSS.
- โก Key Constraint: only scales the RSS term, so it drops out of the argmin โ the equivalence holds for any , but only under the normal error assumption.
๐ Core
- Error form of the model โ with , independent across .
- Equivalent conditional statement โ โ the mean moves with the predictors, the variance does not.
- Residuals estimate the errors โ is the observable stand-in for the unobservable .
- What the equivalence buys โ a fitting rule (least squares) is upgraded to a probability model, unlocking -values on , predictive distributions, and penalised-likelihood model selection.
- ML variance estimate โ โ underestimates the true variance (same bias story as in Estimator Quality (Bias, Variance, MSE)).
- Unbiased variance estimate โ โ divisor is minus the fitted coefficients, not .
๐งฎ Proof Blueprint
Theorem. If then โ the ML and LS estimates coincide.
Strategy. Write the iid normal likelihood, collapse the product of exponentials, recognise RSS in the exponent, take , and note is a positive constant factor on the only -dependent term.
Derivation.
- Step 1 justification โ independence turns the joint density into a product; collapses the exponentials into one sum.
- Step 2 justification โ that sum is the residual sum-of-squares by definition.
- Step 3 justification โ in , the first term is free of and the second is divided by the positive constant โ the minimiser is unchanged by that scaling.
Q.E.D. from least squares are exactly the maximum-likelihood estimates under normal errors.
โ ๏ธ Common Mistakes
- ๐ก Claiming LS โassumes normalityโ โ least squares is a loss choice valid with no distributional assumption; normality is what makes it coincide with ML and is what the -values and predictive intervals need.
- ๐ก Dividing by for the regression variance โ the unbiased divisor is ; is the special case (the mean model).
- ๐ก Using for inference โ it is biased low โน over-narrow prediction intervals and over-confident tests; use . It is the right one inside the information criteria, where the NLL is evaluated at the ML estimates.
๐ง Active Recall
Why does not affect which maximises the likelihood?
- Hint: Look at where appears in .
Answer
- Short answer: appears only inside , which enters divided by the positive constant ; scaling a function by a positive constant moves its value but not its argmin.
- Why: โ the first term is -free, so for every .
Why is the unbiased error-variance divisor rather than ?
Answer
- Short answer: Fitting coefficients uses up degrees of freedom โ the residuals are shrunk by construction, so dividing by systematically understates the spread.
- Why: Degrees of freedom โ is biased low; corrects it, and the gap widens as approaches .