Residual Analysis
& Influence
Master the art of diagnosing regression models: understand residuals, detect outliers, and identify points of high influence.
What Is a Residual?
A residual measures the vertical distance between an observed data point and the value predicted by your regression model. It tells you how much the model missed for that specific observation.
Visualizing Residuals on a Scatterplot
Why Residuals Matter
Residuals are the primary diagnostic tool for regression. If the model is appropriate, residuals should show no pattern: they should look like random scatter around zero.
Reading a Residual Plot
Problem Patterns in Residual Plots
Standardized Residuals
Raw residuals have units that depend on the response variable. To compare residuals on a common scale, we standardize them by dividing by their estimated standard deviation.
Outliers vs Influential Points
These terms are related but not the same. An outlier has an unusual \(y\)-value given its \(x\)-value. An influential point substantially changes the regression when removed.
Understanding Leverage
Leverage measures how far an observation's \(x\)-value is from \(\bar{x}\). Points far from the center of the \(x\)-distribution have more potential to pull the regression line.
Cook's Distance: Measuring Influence
Cook's distance combines leverage and residual size into a single measure of how much each observation influences the fitted values.
How the Pieces Fit Together
Key Distinctions at a Glance
| Outlier | High Leverage | Influential | |
|---|---|---|---|
| Definition | Large residual | Extreme \(x\)-value | Changes regression substantially |
| Detected by | \( |r_i| > 2 \) | \( h_{ii} > 2p/n \) | \( D_i > 4/n \) |
| Must have high leverage? | No | By definition | Usually, but not always |
| Must have large residual? | By definition | No | Usually, but not always |
How to Perform Residual Analysis
Example 1: Calculating a Residual
A regression model for predicting test score from study hours gives: \( \hat{y} = 40 + 5x \). A student who studied \( x = 8 \) hours scored \( y = 92 \). Find the residual.
Example 2: Identifying an Influential Point
Example 3: Using Cook's Distance
Given \(n = 25\), \(p = 2\), a point has standardized residual \(r_i = 2.5\) and leverage \(h_{ii} = 0.18\). Is it influential?
Common Mistakes to Avoid
Summary: Diagnostic Measures
| Measure | What It Detects | Threshold |
|---|---|---|
| Residual \(e_i\) | Model misfit at point \(i\) | Context-dependent |
| Standardized residual \(r_i\) | Outliers (unusual \(y\)) | \( |r_i| > 2 \) |
| Leverage \(h_{ii}\) | Extreme \(x\)-values | \( h_{ii} > 2p/n \) |
| Cook's distance \(D_i\) | Overall influence | \( D_i > 4/n \) or \( D_i > 1 \) |
Question 1 of 5
A regression model predicts \(\hat{y} = 25\) for an observation, but the actual value is \(y = 19\). What is the residual?
Question 2 of 5
Which residual plot pattern indicates that a linear model is inappropriate?
Question 3 of 5
A point has a standardized residual of \(r_i = 0.3\) and leverage \(h_{ii} = 0.45\). This point is best described as:
Question 4 of 5
With \(n = 50\) observations and \(p = 3\) parameters, what is the leverage threshold for flagging a high-leverage point?
Question 5 of 5
A data point in the center of the \(x\)-range has a very large positive residual. Which statement is most accurate?