All topics

Why Linear Regression Assumes its Assumptions

Linear regression is the workhorse of causal inference, yet every coefficient it hands you leans on a stack of assumptions. Write the model in matrix form and a sharp line appears: some assumptions live inside the algebra, where you can watch them break — while others sit entirely outside it, failing in silence while the numbers still look perfect.

1Why Regression, and Why Matrix Notation

Linear regression is one of the most widely used tools in causal inference because it provides a simple way to estimate the relationship between a treatment and an outcome while adjusting for other relevant variables. When used carefully, regression can help isolate the effect of a variable of interest by controlling for confounding factors, making it easier to compare otherwise similar observations. However, regression alone does not prove causality, and its causal interpretation depends on the assumptions being made.

These assumptions can feel abstract when stated in words, so the next step is to build intuition for them using the matrix notation of linear regression. Writing regression in matrix form helps show more clearly how coefficients are constructed, what variation is being used to estimate them, and why certain conditions are needed for those coefficients to have a causal interpretation. This perspective connects the algebra of regression to the causal assumptions that make regression estimates meaningful.

2Ordinary Regression Formula

For observation i, a standard two-feature linear regression model is

Yi = β0 + β1X1i + β2X2i + ui.

For any candidate coefficients b0, b1, b2, the predicted value is

Ŷi = b0 + b1X1i + b2X2i.

OLS selects the particular candidate values that minimize the squared residuals; we write those chosen estimates as β0, β1, and β2. The fitted value Ŷi and the residual below use these chosen estimates, not arbitrary candidates.

The residual for observation i is then

ei = Yi − Ŷi.

The terms mean:

  • Yi is the observed outcome for row i.
  • X1i and X2i are the two feature values for row i.
  • β0, β1, and β2 are the population coefficients in the target model.
  • ui is the unobserved error term for row i.
  • ei is the observed residual after fitting the model.

3Regression’s Two Layers

Before the detailed derivation, here is the main picture. Linear regression has two layers.

First, there is the linear algebra layer. OLS chooses the coefficient vector β that minimizes squared residuals (or Sum of Squared Errors — SSE in the formulas below). In the formulas below:

  • y is an n×1 outcome vector: each row is the observed outcome for one observation.
  • X is an n×3 design matrix in the two-feature model with an intercept: rows are observations and columns are the intercept, X1, and X2.
  • β is a 3×1 vector: its rows are the coefficients on the intercept, X1, and X2.

For a candidate coefficient vector β, the deviation vector y − Xβ is n×1, with one entry per observation; the residual vector e = y − Xβ is this quantity evaluated at the fitted β. The squared-error objective minimized by OLS is

SSE(β) = (y − Xβ)′(y − Xβ).

At the minimizing β this equals e′e = ∑i ei2, the sum of squared residuals.

The key matrix condition is full rank: X′X must be invertible for the coefficient vector to be uniquely computed using

β = (X′X)−1 X′y.

Here X′X is a 3×3 matrix whose rows and columns correspond to the same three model terms: intercept, X1, and X2.

Second, there is the statistical and causal layer. Exogeneity, correct adjustment, no omitted confounding, appropriate dependence structure, and valid standard errors determine whether the coefficients can be interpreted causally and whether inference is trustworthy. The variance formula makes this especially clear:

Var(β | X) = (X′X)−1 X′ Ω X (X′X)−1.

Here Ω = Var(u | X) is an n×n error covariance matrix. Its rows and columns correspond to observations. Diagonal entries are error variances for individual observations. Off-diagonal entries are covariances between errors from different observations.

If the off-diagonal elements of Ω are zero, the errors are uncorrelated across observations. If all diagonal elements of Ω are the same, the errors are homoskedastic. If both conditions hold, then Ω = σ2In and Var(β | X) = σ2(X′X)−1. The identity matrix In is n×n: its rows and columns correspond to observations; it has ones on the diagonal and zeros off the diagonal.

So the matrix intuition is important, but only one common assumption is literally about matrix invertibility. Most causal assumptions are about whether the unobserved error term u is related to the regressors, not about whether OLS can mechanically compute a coefficient.

4What the Algebra Can See — and What Breaks When It Can’t

The OLS derivation touches the error u only through its first two conditional moments: the mean E[u | X] and the covariance Ω = Var(u | X). An assumption is visible in the algebra exactly when it can be written with those two objects (and the design matrix X). Anything that needs more — the full shape of the errors, or knowledge of the causal process behind the data — is invisible to it.

Visible in the derivation

These enter the formulas directly, so the algebra shows you the mechanism of what goes wrong — and, for most of them, how to fix it. Exogeneity is the partial exception: it appears in the derivation, but because u is unobserved the algebra cannot warn you it has failed and offers no repair — see its entry below.

No perfect multicollinearity (full rank)

In the algebra: the condition that lets you form (X′X)−1 at all.

When violated.

X′X is singular and the inverse does not exist, so there is no unique coefficient vector — infinitely many β produce the identical fitted values. Software falls back to a generalized inverse or silently drops a column; either way the individual coefficients are meaningless and only estimable combinations survive. If x₂ = 2x₁, only b₁ + 2b₂ is identified, never the two separately.

Coefficients: not identified  ·  Std. errors: undefined  ·  Causal reading: nothing to interpret.

Sufficient variation / no near-collinearity

In the algebra: the independent variation left in each column, Var(x̃k), after the others are partialled out.

When violated.

The inverse still exists, so OLS runs, but X′X is ill-conditioned. Coefficients stay unbiased yet turn fragile and imprecise: since Var(βk) = σ2/Σx̃k2, shrinking a regressor’s independent variation inflates its variance. A tiny data change can swing an estimate wildly — in a deliberately ill-conditioned toy design, nudging one outcome from 17.0 to 17.1 can move a coefficient from about 4.0 to 7.1 — even while the overall fit stays excellent. Weak overlap pushes estimates onto extrapolation.

Coefficients: unbiased but unstable  ·  Std. errors: inflated  ·  Causal reading: weak, rests on little support.

Exogeneity, E[u | X] = 0

In the algebra: the cross-product X′u in β = β + (X′X)−1X′u.

When violated.

OLS is still perfectly computable — this is not an invertibility problem — but X′u no longer averages to zero, so β is biased and inconsistent, centered on the wrong value. Confounding is the most familiar source — an unobserved driver of the outcome correlated with the regressors — but the same failure arises from measurement error in a regressor (which attenuates its coefficient toward zero), reverse causality or simultaneity (the outcome also drives a regressor), and sample selection (conditioning on how units entered the data). More data does not rescue any of these; it just pins down the biased number more tightly. A process built from y = 1 + 2x₁ + … can return 3 for a coefficient whose truth is 2.

Note the asymmetry with the other visible assumptions: because u is unobserved, you cannot detect this failure from the data, and there is no algebraic repair. The fixes — instrumental variables, randomization, or a better adjustment set — all live in design, not in the matrices. Exogeneity is “visible” only in that E[u | X] is one of the two moments the derivation uses.

Coefficients: biased  ·  Std. errors: valid formula around the wrong center  ·  Causal reading: broken.

Homoskedasticity

In the algebra: equal diagonal entries of Ω in the sandwich variance.

When violated.

Heteroskedasticity leaves the coefficients untouched and still unbiased, but the classical σ2(X′X)−1 is the wrong variance — standard errors, t-statistics, p-values, and confidence intervals are invalid. Whether they come out too small or too large depends on how the error variance lines up with high-leverage points; the common case is understated standard errors, so you over-reject, but the bias can run the other way. OLS is also no longer the most efficient linear estimator. The repair is heteroskedasticity-robust (HC) standard errors; the point estimates never move.

Coefficients: fine  ·  Std. errors: wrong — use robust  ·  Causal reading: fine.

No autocorrelation / independence

In the algebra: zero off-diagonal entries of Ω.

When violated.

Correlated errors — repeated rows from the same user, clustered groups, serial dependence over time — again leave the coefficients unbiased under exogeneity, but the sandwich variance no longer collapses to the classical form. Standard errors are wrong, usually too small when the correlation is positive, so significance is overstated. Fix the inference with clustered or HAC (Newey–West) standard errors, or model the dependence directly with panel or GLS methods — the latter re-estimate the coefficients, not just the standard errors. Inference is the casualty, not the estimate.

Coefficients: fine  ·  Std. errors: wrong — cluster / HAC  ·  Causal reading: fine.

Invisible to the derivation

The computation runs happily whether or not these hold; the coefficient can be precise and significant and still be meaningless. Nothing in the matrices warns you.

The whole list at a glance

AssumptionVisible?Effect on coefficientsEffect on standard errorsEffect on causal reading
No perfect multicollinearityvisiblenot identifiedundefinedn/a
Sufficient variation / overlapvisibleunbiased, unstableinflatedweak
Exogeneity, E[u | X] = 0visible*biasedvalid formula, wrong centerbroken
Homoskedasticityvisiblefinewrong — use robustfine
No autocorrelation / independencevisiblefinewrong — cluster / HACfine
Normality of errorsinvisiblefinefine in large nfine
Correct functional forminvisiblewrong shape / biasedcan misleadbroken
Correct adjustment setinvisiblenon-causalfinebroken
Consistency / no interferenceinvisiblemixes effectscan be affectedambiguous

*Exogeneity enters the algebra through the two error moments, but a violation cannot be detected from the data and has no algebraic fix — it is “visible” only in that limited sense.

Appendix

One Picture for Specification, Overlap, and Multicollinearity

The Frisch–Waugh–Lovell theorem turns three separate‑looking assumptions into a single matrix quantity. Each coefficient in a multiple regression equals a simple regression slope on the part of that regressor left over after the other columns are partialled out:

βk = Cov(y, x̃k) / Var(x̃k)

where k is the residual from regressing column k on all the other columns (Angrist & Pischke’s “regression anatomy,” eq. 3.1.3, after Frisch & Waugh, 1933). Read from this one formula:

Holding controls fixed is not a metaphor — it is the residualization k. Sufficient variation and overlap is the requirement that Var(x̃k) — the independent variation left in the regressor — is not near zero. And near‑multicollinearity is exactly the case where the other columns explain xk so well that Var(x̃k) collapses. Because the coefficient’s own variance is σ2 divided by that leftover variation, a coefficient with little independent variation is both fragile and imprecise. The same denominator that identifies a coefficient also sets how well you can estimate it. This orthogonalization is also the engine behind modern debiasing methods (Facure, Causal Inference in Python, ch. 4).

Homoskedasticity, No Autocorrelation, and the Gauss–Markov Theorem

The two “inference-only” assumptions in Section 4 — homoskedasticity and no autocorrelation — are exactly the pair that makes the error covariance spherical, Ω = σ2In. That is the condition of the Gauss–Markov theorem: given exogeneity, full rank, and spherical errors, OLS is the best linear unbiased estimator (BLUE) — it has the smallest variance among all linear unbiased estimators. Neither assumption is needed for OLS to be unbiased, which is why violating them leaves the point estimates intact and damages only their efficiency and the standard-error formula.

When either fails, a generalized least squares (GLS) estimator that reweights by Ω−1 restores efficiency; when it is not worth modeling Ω, robust or clustered standard errors keep inference valid while leaving the OLS point estimates unchanged. Adding normality of the errors on top of Gauss–Markov upgrades OLS to best among all unbiased estimators, not merely the linear ones, and makes the t and F distributions exact in small samples — which is why normality sits in the “invisible” group: it sharpens the guarantees but never enters the computation of β or its variance.