What are the core assumptions of linear regression, and what breaks when each is violated?
The usual five assumptions are linearity, independent errors, constant error variance, normal residuals for exact small-sample inference, and no perfect multicollinearity; a technically complete answer also requires zero conditional mean. Each violation harms a different part of OLS: fit and bias, efficiency, standard errors, inference, or coefficient identifiability.
How to think about it
The short answer is that the usual five assumptions are linearity, independent errors, constant error variance, normally distributed residuals for exact small-sample inference, and no perfect multicollinearity. A technically complete answer also includes zero conditional mean, or exogeneity: the predictors must not be related to the unobserved part of the outcome. Each violation breaks a different thing. Some damage coefficient estimates, some mainly damage standard errors and hypothesis tests, and some make coefficients impossible to identify.
The model behind the assumptions
Suppose an energy company predicts an apartment’s monthly electricity bill:
bill_i = beta_0 + beta_1 area_i + beta_2 occupants_i + beta_3 heating_days_i + epsilon_i
Here, epsilon_i is the unobserved error for apartment i, such as appliance usage or insulation quality. After fitting the model, we observe a residual, which is the actual bill minus the predicted bill. If the model predicts USD 118 and the actual bill is USD 136, the residual is USD 18.
Ordinary Least Squares, or OLS, chooses coefficients that minimize the sum of squared residuals. Squaring makes large mistakes expensive, which is useful but also makes outliers influential.
The assumptions answer three practical questions:
- Is the model estimating the relationship we think it is estimating?
- Are the coefficient estimates precise?
- Can we trust the standard errors, confidence intervals, and p-values?
The interview shorthand calls these “the five assumptions,” but they are not equally important. Normality is mainly about exact finite-sample inference. Exogeneity is about whether the coefficient estimates are biased in the first place.
1. Linearity
The conditional mean of the outcome must be representable by the features and coefficients in the model. In plain English, the model must have the right shape for the average relationship.
This does not mean every feature must enter as a straight line. A model containing area and area^2 is still linear regression because it is linear in the unknown coefficients. The coefficients are not multiplied by each other or passed through another unknown function.
For the electricity example, suppose bills rise slowly with apartment size up to 60 square metres, then rise faster because larger apartments have more appliances. A model containing only area forces one straight slope across both regions.
The first symptom is a curved pattern in a residual-versus-fitted plot. Residuals may be mostly negative at middle fitted values and positive at both ends, forming a U shape. The model is systematically wrong, not merely noisy.
What breaks is the interpretation of the coefficients and often the predictions. OLS may still produce the best straight-line approximation, but that approximation can change when the sample’s range of apartment sizes changes. A standard error adjustment cannot repair a wrong mean structure.
Typical fixes are a log transform, polynomial terms, splines, interactions, or a different model class. The right choice depends on the domain and the extrapolation you need. A high-degree polynomial can fit the training data beautifully and behave absurdly outside it.
2. Zero conditional mean, or exogeneity
This is the assumption many quick interview answers omit:
E[epsilon | X] = 0
It means that after accounting for the predictors, the remaining error is not systematically related to those predictors.
Imagine insulation quality is absent from the electricity model. Better-insulated apartments may also be larger and therefore more likely to have higher area values. If insulation lowers the bill, the area coefficient absorbs part of insulation’s effect. The coefficient on area is then biased as an estimate of the causal effect of apartment size.
This problem is called endogeneity, meaning a predictor is related to the unobserved error. Common causes include omitted variables, reverse causality, selection into the sample, and measurement error in predictors.
The symptom can be deceptively mild: clean residual plots and a high R-squared. Statistical diagnostics based only on observed columns cannot reliably detect a missing cause. The model may predict well in the current environment while giving misleading coefficients, and its predictions can fail when the relationship between the omitted variable and the predictors changes.
Robust standard errors do not solve endogeneity. They change uncertainty estimates, not the source of bias. Possible responses include collecting the missing variable, using a randomized design, adding fixed effects, or using instrumental variables when a genuinely valid instrument exists. Each requires substantive justification; there is no magic “control for everything” button.
3. Independence of errors
Errors from different observations should not carry information about one another, after accounting for the predictors. In notation, their conditional covariance should be zero.
This assumption fails immediately if the dataset contains twelve monthly bills for each apartment and we treat all rows as unrelated. An unusually cold month may increase one apartment’s residual, and the same apartment may still have an unusually high residual the following month. Those errors are correlated.
Positive serial correlation often makes ordinary OLS standard errors too small. The model may report a p-value of 0.01 when the effective amount of independent information is much lower. Coefficient estimates can remain unbiased if exogeneity holds, but the model becomes inefficient and the inference becomes overconfident.
The first symptom is a pattern in residuals ordered by time, customer, store, or geography. A Durbin–Watson statistic far from 2 can indicate first-order serial correlation, but it is not a universal test and can miss more complicated dependence.
Use cluster-robust standard errors when observations are grouped, heteroscedasticity-and-autocorrelation-consistent methods for suitable time series, or a mixed-effects or time-series model when the dependence is part of the data-generating process. Clustered errors do not fix a missing time trend or a wrong mean structure.
4. Homoscedasticity
Homoscedasticity means constant conditional error variance:
Var(epsilon | X) = sigma^2
It does not mean every observation has the same error. It means the spread of errors is roughly the same across the range of predictions or predictors.
Suppose residuals for small apartments typically fall within plus or minus USD 12, while residuals for large apartments range within plus or minus USD 65. That funnel shape is heteroscedasticity.
Under exogeneity, OLS coefficient estimates can still be unbiased. The main damage is to conventional standard errors, confidence intervals, and hypothesis tests. OLS is also no longer the most efficient linear unbiased estimator. Ordinary prediction intervals may be too narrow in the high-variance region.
A residual-versus-fitted plot is often more informative than a formal test. The Breusch–Pagan test can provide evidence, but with a very large dataset it may flag a practically irrelevant deviation, while with a small dataset it may miss an important one.
For cross-sectional inference, heteroscedasticity-consistent standard errors such as HC3 are a common first response. Weighted Least Squares can improve efficiency when the variance pattern is understood. Transforming the target, such as modelling log bill rather than bill, may make both the mean and variance more sensible. HC3 changes inference; it does not make the residuals homoscedastic or automatically produce perfect prediction intervals.
5. Normality of residuals
The normality assumption is that the errors, conditional on the predictors, follow a normal distribution:
epsilon | X ~ Normal(0, sigma^2)
This assumption is often overstated. OLS does not require normal residuals to calculate coefficients, and normality is not required for the Gauss–Markov result that OLS is the Best Linear Unbiased Estimator.
Normality gives exact t-tests, F-tests, and confidence intervals in finite samples under the other assumptions. With a large, genuinely independent sample and finite variance, the Central Limit Theorem often makes coefficient estimates approximately normal. That is why modest skew is usually less worrying than dependence or endogeneity.
The first symptom of non-normality is a curved or heavy-tailed Q–Q plot. In the electricity example, rare power outages or billing corrections may create several very large residuals. Because OLS squares errors, those observations can influence the fitted line even if they are rare.
Check whether the tail observations are data errors, legitimate rare events, or evidence that a different distribution is appropriate. Consider a transformation, bootstrap intervals, robust regression, or a model designed for the outcome. Do not test whether the raw outcome is normal; the relevant object is the conditional error, approximated by residuals.
Common trap: A large sample does not rescue invalid standard errors caused by clustered or autocorrelated observations. The Central Limit Theorem needs appropriate independence and regularity conditions.
6. No perfect multicollinearity
The predictor matrix must have full column rank. In plain English, no feature can be computed exactly as a linear combination of the others.
If a model includes both area and area_in_square_feet, one is an exact multiple of the other. OLS cannot determine two unique coefficients for the same information. With one-hot encoded categories, including every category dummy plus an intercept creates the same problem, known as the dummy-variable trap.
Near-multicollinearity is different. Suppose apartment area and number of rooms have a correlation of 0.97. OLS can still fit the model, but it has difficulty deciding which feature deserves credit for a bill increase. Coefficients become sensitive to small data changes, their standard errors grow, and signs can look surprising even when overall predictions are good.
If regressing one predictor on the others gives R_j^2 = 0.96, its Variance Inflation Factor, or VIF, is:
VIF_j = 1 / (1 - R_j^2) = 1 / 0.04 = 25
VIF thresholds are heuristics, not laws. Keep correlated variables if the combined prediction matters, redefine them if a domain-level quantity is more meaningful, or use ridge regression when prediction is the goal. Ridge shrinks coefficients and changes their interpretation; it does not recover a causal effect that the data cannot identify.
How I would diagnose the model
I would not begin with a list of p-values. I would ask how the data were collected, then inspect:
- residuals against fitted values and each important feature for curvature and changing spread;
- residuals in time, customer, store, or geographic order for dependence;
- Q–Q plots for skew and heavy tails;
- feature correlations, VIFs, and matrix rank for collinearity;
- influential observations using leverage and influence diagnostics.
A compact statsmodels workflow looks like this:
import statsmodels.api as sm
from statsmodels.stats.diagnostic import het_breuschpagan
from statsmodels.stats.outliers_influence import variance_inflation_factor
from statsmodels.stats.stattools import durbin_watson
X = df[["area_m2", "occupants", "heating_degree_days"]]
X = sm.add_constant(X)
fit = sm.OLS(df["bill_usd"], X).fit()
dw = durbin_watson(fit.resid)
bp = het_breuschpagan(fit.resid, fit.model.exog)
hc3_fit = fit.get_robustcov_results(cov_type="HC3")
vif = {
column: variance_inflation_factor(X.to_numpy(), i)
for i, column in enumerate(X.columns)
}
sm.graphics.qqplot(fit.resid, line="45")
These diagnostics provide clues, not proof. A formal test can reject a harmless assumption with enough data, and no residual plot can reveal an important variable that was never collected.
The senior-level nuance
I would separate prediction from inference.
For a prediction service, mild non-normality may be acceptable if validation on future-like data is good. Heteroscedasticity may still require calibrated prediction intervals. For estimating the effect of insulation on bills, exogeneity is central; a model with excellent predictive accuracy can still give a biased effect estimate.
I also would not abandon linear regression because real data are imperfect. OLS remains valuable when the relationship is approximately additive, interpretability matters, and extrapolation is limited. But robust standard errors only address certain inference problems. They do not fix curvature, omitted confounding, leakage, or dependence in the mean structure.
What they’ll ask next
Which assumption is most important?
For causal coefficient interpretation, zero conditional mean is usually the most important. For valid uncertainty estimates, independence and the variance structure matter. Normality is generally the least critical with a large, well-behaved sample.
Does heteroscedasticity make OLS coefficients biased?
Not by itself. If the predictors remain exogenous, the coefficients can be unbiased, but ordinary standard errors and efficiency suffer. HC3 or a variance-aware model can address the inference problem.
Can robust standard errors fix every assumption violation?
No. They can help with heteroscedasticity and, with an appropriate dependence structure, some correlation problems. They cannot fix a nonlinear mean, omitted-variable bias, measurement error, perfect collinearity, or data leakage.
Say this in the interview
“The common five are linearity, independent errors, constant variance, normal residuals for exact small-sample inference, and no perfect multicollinearity; technically I also check zero conditional mean, because violations there bias coefficients, while the others mainly affect efficiency, standard errors, inference, or identifiability.”