OLS from three angles
REG · Chapter 113 min readAsked at Two Sigma, Citadel, DE Shaw, AQR
After this lesson you should be able to
- Derive the OLS estimator by calculus and by projection.
- Interpret a coefficient in a multiple regression precisely.
- Say what each Gauss–Markov assumption buys you.
Least squares is the workhorse, and interviewers probe whether you understand it or merely call it. Three views of the same object — minimise a sum of squares, project onto a column space, take a ratio of covariance to variance — and each answers a different follow-up.
Equation 1.1
The model
Linear in the parameters — not necessarily in the variables, since and are perfectly acceptable columns.
- The design matrix, including a column of ones for the intercept.
- The error, assumed mean-zero conditional on the regressors.
Derivation 1.2
The normal equations
Minimise the sum of squared residuals with respect to .
Setting the gradient to zero gives the normal equations.
The projection view. The normal equations say : the residual is orthogonal to every column of . So is the point in the column space of closest to , and is the projection matrix onto that space. Everything mechanical about OLS follows from this picture — residuals sum to zero when there is an intercept, adding a regressor can never increase the residual sum of squares, and fitted values are uncorrelated with residuals.
Equation 1.3
The one-regressor case
Worth memorising in the second form: a beta is a correlation scaled by the ratio of standard deviations.
- The correlation between and .
Proposition 1.5
What a coefficient means
In a multiple regression, is the expected change in for a one-unit change in *holding the other regressors fixed*. That clause is the whole content of the estimate, and by the Frisch–Waugh–Lovell theorem it is literally true: equals the simple regression coefficient of the residualised on the residualised .
Holds when
- Holding fixed is a statistical operation, not a causal one — it is not the same as intervening.
- If is nearly collinear with the others there is little residual variation left, which is why the standard error explodes.
The rest of this lesson is in Premium
You have read the opening. 10 more sections follow, including 4 worked examples and 3 quick checks.
Nothing is charged for 7 days, and you can cancel before then. Or read The law of large numbers and the central limit theorem in full, free.