Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Residuals measure how far each observed data value is from the value predicted by a regression model. This cheat sheet helps students calculate residuals, build residual plots, and decide whether a linear model is reasonable. Residual plots are important because they reveal patterns that a scatterplot or correlation value may hide.

Students use them to check model fit, spot outliers, and compare predictions to real data.

The main formula is e=yy^e = y - \hat{y}, where ee is the residual, yy is the observed value, and y^\hat{y} is the predicted value. A residual plot places the explanatory variable on the horizontal axis and the residuals on the vertical axis. A good linear model usually has residuals randomly scattered around 00.

Curved patterns, changing spread, or extreme points suggest the model may not be appropriate.

Key Facts

  • A residual is calculated using e=yy^e = y - \hat{y}, where yy is the observed value and y^\hat{y} is the predicted value.
  • A positive residual means the observed value is above the regression line because y>y^y > \hat{y}.
  • A negative residual means the observed value is below the regression line because y<y^y < \hat{y}.
  • For a least-squares regression line, the residuals always have a sum of e=0\sum e = 0, up to rounding error.
  • A residual plot graphs each point as (x,e)(x, e), using the original explanatory variable xx and the residual ee.
  • A residual plot with random scatter around e=0e = 0 supports using a linear model.
  • A curved pattern in a residual plot suggests that a nonlinear model may fit the data better than a line.
  • A fan-shaped residual plot shows nonconstant spread, meaning prediction errors change size as xx changes.

Vocabulary

Residual
A residual is the difference between an observed response value and the value predicted by a model, calculated as e=yy^e = y - \hat{y}.
Predicted Value
A predicted value, written y^\hat{y}, is the response value estimated by a regression equation for a given xx.
Residual Plot
A residual plot is a graph of residuals against the explanatory variable, usually shown as points (x,e)(x, e).
Least-Squares Regression Line
A least-squares regression line is the line that minimizes the sum of squared residuals, e2\sum e^2.
Outlier
An outlier is a data point with an unusually large residual or an unusual position compared with the rest of the data.
Nonlinear Pattern
A nonlinear pattern occurs when residuals show a curve or systematic shape instead of random scatter around 00.

Common Mistakes to Avoid

  • Reversing the residual formula is wrong because y^y\hat{y} - y gives the opposite sign; use e=yy^e = y - \hat{y}.
  • Thinking a high correlation always means a good linear model is wrong because a residual plot can reveal curvature or changing spread.
  • Ignoring the sign of a residual is wrong because positive residuals mean the point is above the line and negative residuals mean it is below the line.
  • Using yy instead of ee on the vertical axis of a residual plot is wrong because the plot must show prediction errors, not original response values.
  • Calling any large residual an error in the data is wrong because an outlier may be real and should be investigated before being removed.

Practice Questions

  1. 1 A regression model predicts y^=42\hat{y} = 42 for a data point with observed value y=50y = 50. Find the residual ee.
  2. 2 For the regression equation y^=3x+7\hat{y} = 3x + 7, find the residual when x=4x = 4 and the observed value is y=21y = 21.
  3. 3 A point has residual e=6e = -6 and predicted value y^=18\hat{y} = 18. Find the observed value yy.
  4. 4 A residual plot shows a clear U-shaped pattern around e=0e = 0. Explain what this suggests about using a linear model for the data.

Understanding Residuals & Residual Plots

Least-squares regression chooses a line by making the total squared error as small as possible. Squaring matters because errors above and below the line would otherwise cancel. It also gives extra weight to large misses.

This is useful when a model must make predictions, but it means one unusual observation can affect the line strongly. A point far from the center of the explanatory values has high leverage. If that point pulls the line noticeably when removed, it is influential.

Students should examine such points rather than automatically deleting them. An unusual value may be a recording mistake, or it may reveal an important real situation.

The shape of the leftover errors gives clues about what the line is missing. A U-shaped pattern often means the relationship bends. For example, the distance a ball travels may increase with launch angle up to a point, then decrease.

A straight line cannot represent that rise and fall well. A pattern that alternates above and below zero can show cycles, such as seasonal sales or daily temperatures. Clusters can suggest that different groups are mixed together.

Heights and weights for children of several age groups may form groups with different behavior. In these cases, adding a relevant variable or separating the groups can improve the analysis.

The vertical spread matters as much as the center of the pattern. If errors become wider as the explanatory value increases, predictions are less reliable in that region. House price models often show this effect.

A prediction for a low-cost home may miss by a few thousand dollars, while a prediction for an expensive home may miss by much more. The line can still describe the average trend, but it does not have equal accuracy everywhere.

Students should avoid saying that a model is good simply because the points center near zero. They should check whether the amount of scatter stays fairly similar across the graph.

Residuals connect statistics to decisions made with imperfect information. A school might use study time to predict a test score. A positive leftover error could reflect effective study methods, prior knowledge, sleep, tutoring, or an easier test version.

The error is not meaningless noise. It represents influences the model did not include. This helps explain why a regression prediction is an estimate, not a guarantee.

When reading a plot, first identify any curve, widening spread, clusters, or isolated points. Then state what that feature means for the model.

Finally, remember that a good pattern check does not prove that one variable causes another. A line can summarize an association without explaining its cause.