KatInterview

Linear Regression Assumptions, OLS Residuals, and Violations

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentslinear-regressionolsgauss-markov

Last updated

Evaluate linear regression assumptions on 10,000 rows, prove sample residual orthogonality, analyze multicollinearity, and separate bias from standard error issues.

Assume you are evaluating an Ordinary Least Squares (OLS) regression model fit on a dataset containing $n = 10{,}000$ sample records across $k$ predictor attributes (including the constant intercept column).

Provide a rigorous analysis of the mathematical foundations, diagnostic tests, and remedies:

  1. Theoretical Assumptions & Geometric Derivation:

    • Enumerate the classical Gauss-Markov conditions for OLS estimators.
    • Prove mathematically that the estimated residual vector $e$ is orthogonal to the design matrix $X$.
    • Clarify why sample orthogonality between $X$ and $e$ holds strictly by construction and does not serve as proof of the exogeneity hypothesis $E[\varepsilon \mid X] = 0$.
  2. Unbiasedness vs. Error Covariance:

    • Prove mathematically which Gauss-Markov conditions are required to show that $\hat{\beta}$ is unbiased.
    • Show why non-constant variance (heteroskedasticity) or serial correlation in the error terms alters the variance matrix of $\hat{\beta}$ without introducing estimation bias.
  3. Multicollinearity Analysis:

    • Suppose three key feature vectors in $X$ exhibit strong mutual correlation.
    • Analyze the impact of this correlation on estimator bias, variance, and standard errors.
    • Outline formal diagnostic tools to identify multicollinearity, and describe mitigation techniques tailored to predictive modeling versus causal coefficient inference.
  4. Taxonomy of Regression Violations:

    • Classify standard modeling issues—such as omitted variable bias, measurement noise in regressors, endogeneity/reverse causality, non-spherical errors, and non-Gaussian error terms—into issues that induce coefficient bias versus issues that only compromise inference and standard errors.
    • Specify the standard methodological fix for each violation.

Hints

Hint 1

Express the sample residuals as e = (I - H)y using the projection matrix H = X(X^T X)^{-1}X^T to show orthogonality.

Hint 2

Substitute y = X\beta + \varepsilon into the definition of \hat{\beta} to isolate which conditions drive expectation vs variance.

Hint 3

Differentiate between sample properties that hold by construction (like X^T e = 0) and population properties concerning the unobserved error term \varepsilon.