Course contentsShow
← Mathematics
Lesson 3085 of 3,12160. Statistics — ModelingFree lesson

Detecting Non-Constant Variance (Heteroscedasticity)

Identify patterns in residual plots that indicate non-constant variance and understand implications for inference.

Detecting Non-Constant Variance (Heteroscedasticity)

What you'll learn: How to spot patterns in residual plots that reveal non-constant variance and why this matters for your regression inferences.

The Core Idea

After fitting a regression model, you examine residuals (the differences between observed and predicted values) to check assumptions. One key assumption of linear regression is constant variance (homoscedasticity)—the spread of residuals should be roughly the same across all fitted values.

Heteroscedasticity occurs when this variance changes systematically. Imagine throwing darts: if your accuracy gets worse the farther you stand from the board, that's non-constant variance. In regression terms, your prediction errors might grow larger (or smaller) as predicted values increase.

Recognizing Heteroscedasticity in Residual Plots

When you plot fitted values vs. residuals, look for these telltale patterns:

  • Fan shape (expanding): Residuals spread out as fitted values increase—the "megaphone" pattern
  • Funnel shape (contracting): Residuals tighten as fitted values increase
  • Any systematic change in spread: The vertical scatter isn't roughly constant across the horizontal axis

A good plot looks like a random cloud with consistent vertical spread—no pattern, no trends.

Why This Matters for Inference

Non-constant variance violates regression assumptions, causing:

  1. Invalid standard errors: Your confidence intervals and hypothesis tests for coefficients become unreliable
  2. Inefficient estimates: While coefficient estimates remain unbiased, they're no longer the most precise possible
  3. Misleading p-values: You might incorrectly conclude predictors are significant (or not)

Think of it like measuring with a ruler that randomly stretches—your measurements might average correctly, but your uncertainty estimates are wrong.

Key Takeaway: Heteroscedasticity appears as changing spread in residual plots (fan, funnel, or other systematic patterns) and undermines the validity of standard errors, confidence intervals, and hypothesis tests in your regression model.