What assumptions does linear regression make?
Linear regression relies on several assumptions about the relationship between the features, target, and errors.
These assumptions matter because violating them can make coefficients, uncertainty estimates, or statistical conclusions unreliable.
1. Linearity
The expected target should be a linear combination of the included features.
In simple form:
ŷ = b0 + b1x1 + b2x2 + ...This does not mean every raw relationship in the real world must be perfectly straight, but the model must represent the relationship adequately through the features it uses.
2. Independent observations or errors
Observations should not have error terms that are systematically dependent on one another.
For example, measurements collected over time may have correlated errors if nearby time points influence each other.
This issue is often called autocorrelation.
3. Constant error variance
The variance of the residuals should be approximately constant across the range of predictions.
This assumption is called homoscedasticity.
If the error spread grows or shrinks systematically, the data shows heteroscedasticity.
4. No perfect multicollinearity
One predictor should not be an exact linear combination of other predictors.
For example:
x3 = x1 + x2would create perfect multicollinearity.
Strong near-multicollinearity may also make individual coefficients unstable.
5. Errors should have zero conditional mean
After accounting for the included predictors, the remaining error should not systematically depend on those predictors.
In practical terms, the model should not be missing important information that is both related to the included features and the target in a way that biases the coefficients.
This is closely related to the idea of exogeneity.
6. Normality of errors for classical inference
Residuals do not need to be perfectly normal for linear regression to produce predictions or ordinary least-squares coefficient estimates.
However, approximate normality of the errors is useful for classical hypothesis tests and confidence intervals, especially in smaller samples.
How are these assumptions checked?
Common diagnostic approaches include:
- residual plots
- plots of residuals against fitted values
- checking correlations or VIF for multicollinearity
- examining residual distributions
- checking residual dependence for ordered or time-based data
Residual analysis is covered in the next articles.
In short, linear regression works best when the relationship is adequately linear, errors are independent with roughly constant variance and zero conditional mean, predictors do not have perfect multicollinearity, and error normality is reasonable when classical statistical inference is required.
Learning Sequence
Machine Learning Curriculum
Explore Related Questions
Deepen your understanding across related Machine Learning topics.