Sub topic 3
The Assumptions Behind the Multiple Regression Model
Prerequisites and the working model
This chapter assumes that you understand simple linear regression, t-tests, p-values, random variables, and the meaning of a slope coefficient. You should also be comfortable reading regression output.
A multiple linear regression explains a dependent variable \(Y\) with several explanatory variables:
\[ Yi=\beta0+\beta1X{1i}+\beta2X{2i}+\cdots+\betakX{ki}+\varepsilon_i \]
Here, \(\beta0\) is the intercept, each \(\betaj\) is a population coefficient, and \(\varepsilon_i\) is the error for observation \(i\). The error contains influences on \(Y\) that are not included in the model.
The assumptions determine whether ordinary least squares (OLS) produces useful estimates and whether its standard errors support valid tests.
The main OLS assumptions
Linearity in parameters
The model must be linear in the unknown coefficients. This does not mean every variable must appear as a straight line. For example, this model is still linear in its parameters:
\[ Yi=\beta0+\beta1Xi+\beta2Xi^2+\varepsilon_i \]
The variable \(Xi^2\) changes the shape of the relationship, but the coefficients still enter as \(\beta0\), \(\beta1\), and \(\beta2\).
Random sampling and independent observations
The observations should come from a random sample, or from a process that makes the observations independent enough for the intended analysis. If the sample is selected in a systematic way, the relationship in the sample may not represent the population.
Time-series observations require special care. An error in one period may be related to an error in another period. This problem is called serial correlation, or autocorrelation. It can make the usual standard errors unreliable.
Zero conditional mean
The central assumption is:
\[ E(\varepsiloni\mid X{1i},X{2i},\ldots,X{ki})=0 \]
This says that after conditioning on all explanatory variables, the average error is zero. In practical terms, the explanatory variables must not be systematically related to omitted influences in the error.
If this assumption fails, OLS coefficients can be biased and inconsistent. A common cause is an omitted variable that affects both an included explanatory variable and the dependent variable. Reverse causality and measurement error can also cause endogeneity, which is dependence between an explanatory variable and the error.
Constant error variance
Homoskedasticity means that the conditional variance of the error is constant:
\[ \operatorname{Var}(\varepsiloni\mid Xi)=\sigma^2 \]
If the error variance changes with the level of an explanatory variable, the data are heteroskedastic. OLS coefficient estimates can still be unbiased under zero conditional mean, but the usual standard errors may be wrong. Consequently, t-tests and F-tests may give misleading conclusions.
No perfect multicollinearity
No explanatory variable can be an exact linear combination of the other explanatory variables. For example, including both a person's age and age measured in months creates perfect multicollinearity.
With perfect multicollinearity, OLS cannot estimate separate coefficients. High, but imperfect, correlation is called multicollinearity. OLS can still estimate the coefficients, but their standard errors may become large.
Normally distributed errors for exact small-sample tests
Normality is not required for OLS to estimate coefficients. It is mainly used to justify exact t-tests and F-tests in small samples:
\[ \varepsiloni\mid Xi\sim N(0,\sigma^2) \]
In large samples, the central limit theorem often makes approximate inference possible without normal errors. Severe non-normality, outliers, or small samples still require caution.
What each assumption affects
| Assumption | Main consequence when it fails |
|---|---|
| Linearity in parameters | Biased or inefficient interpretation if the functional form is wrong |
| Random sampling or independence | Estimates may not generalize; standard errors may be wrong |
| Zero conditional mean | OLS coefficients can be biased and inconsistent |
| Homoskedasticity | Usual standard errors, t-tests, and F-tests can be invalid |
| No perfect multicollinearity | Some coefficients cannot be estimated |
| Normal errors | Exact small-sample inference may fail |
A useful distinction is between assumptions about coefficients and assumptions about inference. Violating zero conditional mean threatens the coefficient estimates themselves. Violating homoskedasticity often leaves the coefficient estimates usable but threatens the reported standard errors.
A small diagnostic workflow
The following code fits a model and displays residual information. A residual is the observed value minus its fitted value. Patterns in residuals can suggest nonlinearity or changing variance, although no diagnostic test proves that every assumption holds.
import numpy as np
import statsmodels.api as sm
rng = np.random.default_rng(42)
n = 200
x1 = rng.normal(size=n)
x2 = rng.normal(size=n)
y = 1.0 + 2.0 * x1 - 1.0 * x2 + rng.normal(size=n)
X = sm.add_constant(np.column_stack([x1, x2]))
model = sm.OLS(y, X).fit()
print(model.summary())
print("Maximum absolute residual:", np.max(np.abs(model.resid)))Exercise
If heteroskedasticity is present but the zero conditional mean assumption holds, what is usually threatened first: the OLS coefficient estimates or the usual standard errors?
Show answer
The usual standard errors are threatened first. The OLS coefficients can remain unbiased, but inference may require heteroskedasticity-robust standard errors.