Gauss-Markov Assumptions › Visualizing Assumption Violations

Michael BrenndoerferMay 22, 20255 min read
Machine Learning from ScratchAll chapters
Part 3 of 9Foundations
Chapter 27Gauss-Markov Assumptions › Visualizing Assumption Violations
Reading section 5 of 11 · Visualizing Assumption Violations · 5 minSection 5 of 11 · 5 min

Book contents

Section 5 of 11 · 5 min read

Gauss-Markov Assumptions › Visualizing Assumption ViolationsOne section · Sections in this chapter5 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Understanding what happens when assumptions are violated supports proper model diagnosis and the selection of appropriate remedies.

Example: Homoscedasticity vs. Heteroscedasticity

This example demonstrates the difference between homoscedastic (constant variance) and heteroscedastic (non-constant variance) error terms:

Out[2]:
Visualization
Scatter plot of 200 observations with constant variance around a fitted regression line, titled Homoscedastic Errors, Constant Variance.
Homoscedastic errors with constant variance. Across 200 observations, the vertical spread around the fitted regression line remains approximately uniform from low to high X.
Scatter plot of 200 observations with increasing variance around a fitted regression line, titled Heteroscedastic Errors, Non-constant Variance.
Heteroscedastic errors with non-constant variance. Across 200 observations, the vertical spread around the fitted regression line increases as X grows.

Example: Residual Plots for Assumption Testing

Residual plots are essential diagnostic tools for checking Gauss-Markov assumptions:

Out[3]:
Visualization
Scatter plot of homoscedastic residuals against fitted values with a dashed horizontal zero reference line.
Homoscedastic residuals versus fitted values. The residual cloud stays centered on the dashed zero line with a roughly constant vertical spread across the fitted range.
Scatter plot of heteroscedastic residuals against fitted values with an expanding spread and a dashed horizontal zero reference line.
Heteroscedastic residuals versus fitted values. The residual cloud remains centered near the dashed zero line, but its vertical spread expands as fitted values increase.
Out[4]:
Visualization
Normal Q-Q plot of homoscedastic residuals with theoretical quantiles, ordered residual values, and a fitted reference line.
Normal Q–Q plot for the homoscedastic residuals. Ordered residual values are compared with theoretical normal quantiles against the fitted reference line.
Normal Q-Q plot of heteroscedastic residuals with theoretical quantiles, ordered residual values, and a fitted reference line.
Normal Q–Q plot for the heteroscedastic residuals. Ordered residual values are compared with theoretical normal quantiles against the fitted reference line.