Core Assumptions of OLS Linear Regression, Diagnostics, and Remediation
Statistics & ExperimentsModel answerLast updated
Explain the underlying assumptions of ordinary least squares (OLS), their impact on bias versus inference, diagnostic techniques, and practical remedies.
When evaluating a standard Ordinary Least Squares (OLS) linear regression model, robust inference and unbiased estimation rely on several distinct assumptions.
Please address the following points:
- Categorized Assumptions: What are the foundational assumptions required for OLS? Group them explicitly by their impact—specifically distinguishing between assumptions required for coefficient unbiasedness, those needed for standard error validity (efficiency), and those required for exact finite-sample inference.
- Diagnostic Methods: How would you test or inspect for violations of each assumption in practice?
- Remediation Strategies: What techniques or methodological adjustments should be applied when specific assumptions fail?
Hints
Hint 1
Recall the closed-form matrix solution for $\hat{\beta}$ and consider what conditional expectation $E[\varepsilon \mid X]$ requires to isolate $\beta$.
Hint 2
Distinguish between issues that distort coefficient values (bias) versus issues that distort standard errors and $p$-values (efficiency/variance).
Hint 3
Think about whether residuals versus fitted plots, VIF, or specialized robust covariance matrices apply to each specific failure mode.
Model answer
Easy Try it yourself first — then compare your approach, complexity and edge cases.
Model Answer
A complete response to OLS assumptions requires separating assumptions by what property they guarantee: unbiasedness/consistency, efficiency (valid standard errors), or exact small-sample inference.
1. Theoretical Setup & Grouped Assumptions
Consider the standard linear system $y = X\beta + \varepsilon$. The OLS estimator is:
$$\hat{\beta} = (X^\top X)^{-1}X^\top y = \beta + (X^\top X)^{-1}X^\top \varepsilon$$
Taking the expectation conditional on $X$:
$$E[\hat{\beta} \mid X] = \beta + (X^\top X)^{-1}X^\top E[\varepsilon \mid X]$$
Taking the variance conditional on $X$:
$$\text{Var}(\hat{\beta} \mid X) = (X^\top X)^{-1} X^\top \text{Var}(\varepsilon \mid X) X (X^\top X)^{-1}$$
From these two identities, we can group the standard assumptions:
Group A: Assumptions for Unbiasedness and Consistency
If these fail, $\hat{\beta}$ is systematically wrong (biased), and increasing sample size $n$ will not eliminate the error.
- Linearity in Parameters: The true data-generating process is linear relative to parameters $\beta$ (e.g., $y = \beta_0 + \beta_1 x_1 + \beta_2 x_1^2 + \varepsilon$ is valid because parameters enter linearly).
- Full Rank (No Perfect Multicollinearity): $X$ has full column rank $k$. Matrix $X^\top X$ must be invertible so $(X^\top X)^{-1}$ exists uniquely.
- Exogeneity (Strict Exogeneity / Zero Conditional Mean): $E[\varepsilon \mid X] = 0$. The noise term has zero mean given any combination of feature values. This is violated in the presence of omitted confounders, simultaneous causality, or measurement errors in $X$.
Group B: Assumptions for Efficiency and Standard Variance Formulas (Gauss-Markov Theorem)
If these fail, $\hat{\beta}$ remains unbiased, but the standard error formula $\text{Var}(\hat{\beta}) = \sigma^2 (X^\top X)^{-1}$ becomes incorrect. As a result, test statistics ($t$-tests, $F$-tests) and $p$-values are invalid.
- Homoskedasticity: $\text{Var}(\varepsilon_i \mid X) = \sigma^2$ for all $i$. The error variance is constant across feature space.
- No Autocorrelation: $\text{Cov}(\varepsilon_i, \varepsilon_j \mid X) = 0$ for $i \neq j$. Observations possess independent error terms.
Group C: Assumptions for Exact Finite-Sample Inference
- Normality of Errors: $\varepsilon \mid X \sim \mathcal{N}(0, \sigma^2 I)$.
- Note: This is not required for $\hat{\beta}$ to be unbiased or optimal. Under large samples, the Central Limit Theorem guarantees that $\hat{\beta}$ is asymptotically normal even if errors are non-normal. Normality is only strictly necessary for exact $t$- and $F$-distributions in small samples.
2. Diagnostics
| Failure Mode | Visual Diagnostic | Statistical Test / Quantitative Metric |
|---|---|---|
| Non-linearity | Residuals vs. Fitted plot (displays curved patterns); Partial Residual (component-plus-residual) plots. | Ramsey RESET test. |
| Endogeneity / Omitted Variables | Cannot be fully diagnosed via residual plots because OLS residuals are orthogonal to $X$ by construction ($\sum e_i X_i = 0$). | Domain analysis; Durbin-Wu-Hausman test (if instrumental variables are available). |
| Heteroskedasticity | Residuals vs. Fitted plot (funnel/fan shape); Scale-Location plot. | Breusch-Pagan test; White test. |
| Autocorrelation | Residuals vs. Time/Sequence index; Autocorrelation Function (ACF) plot. | Durbin-Watson statistic (for AR(1)); Breusch-Godfrey test. |
| Multicollinearity | Matrix correlation heatmaps; high overall $R^2$ paired with insignificant individual coefficients. | Variance Inflation Factor ($\text{VIF} > 5 \text{ or } 10$); Condition Number. |
| Non-Normality of Errors | Quantile-Quantile (Q-Q) plot of standardized residuals. | Shapiro-Wilk test; Jarque-Bera test. |
| Outliers / Influential Points | Residuals vs. Leverage plot. | Cook's Distance ($> 4/n$ or $> 1$); Studentized residuals ($ |
3. Remediation Strategies
-
Handling Non-linearity:
- Transform features using log, polynomial, or spline terms.
- Switch to Generalized Additive Models (GAMs) or tree-based algorithms if non-linear structures dominate and interpretable linear coefficients are not strictly required.
-
Handling Endogeneity:
- Include missing confounders in the model.
- Use Instrumental Variables (2SLS - Two-Stage Least Squares).
- Apply Panel Data techniques (Fixed Effects, Difference-in-Differences) to eliminate time-invariant unobserved heterogeneity.
-
Handling Heteroskedasticity:
- Use Heteroskedasticity-Consistent (HC) Robust Standard Errors (e.g., HC3 or White standard errors). This fixes inference without altering coefficient estimates.
- Apply Weighted Least Squares (WLS) if the conditional variance structure $\sigma_i^2$ is known.
- Transform the target variable $y$ (e.g., $\log(y)$) when variance scales proportionally with the mean.
-
Handling Autocorrelation:
- Use Newey-West (HAC) standard errors for time-series data.
- Use Cluster-Robust Standard Errors for panel or grouped data.
- Model residual correlation structures directly using Generalized Least Squares (GLS) or explicit lag variables (ARIMA/Dynamic models).
-
Handling Multicollinearity:
- Drop redundant collinear variables or combine them into a composite index.
- Perform Principal Component Analysis (PCA) feature reduction.
- Apply L2 regularization (Ridge Regression), which stabilizes variance by introducing small estimation bias.
Common Pitfalls to Avoid
- Confusing feature distribution with error distribution: Claiming that $X$ or $y$ must follow a normal distribution is incorrect. Only the model's unobserved errors ($\varepsilon$) are assumed normal for small-sample hypothesis testing.
- Confusing variance issues with bias: Stating that heteroskedasticity or multicollinearity biases coefficient estimates $\hat{\beta}$. They affect coefficient variance and standard errors, not unbiasedness.
- Over-relying on statistical normality tests in large samples: Formal tests like Shapiro-Wilk will reject normality even on negligible departures when $n$ is large. Graphical Q-Q analysis combined with Central Limit Theorem reliance is usually sufficient.