liveBook · Manning

Residual error

As explained in Statistics Slam Dunk

A residual is the difference between an observed response value and its fitted value in a statistical model.

A residual is the vertical difference between an observed response and its fitted value on a regression model. Positive residuals lie above the fitted value; negative residuals lie below it. section 5.7.5 section 14.5.2

Use residuals to check whether a model behaves as its assumptions require:

  • Plot residuals against fitted values; an unstructured cloud around the horizontal line supports linearity and normally distributed errors. section 5.7.5
  • Use a Normal QQ plot to compare standardized residual quantiles with theoretical normal-distribution quantiles; strong tail deviations raise concern. section 5.7.5
  • In ANOVA, compare residual spread across fitted group means to assess equal variances; less dispersion at one level suggests a violation. section 14.5.2

NBA wins and fitted wins

A model may predict 39 wins for a team that actually wins 49. Its residual is 10 wins, indicating that the observed result exceeds the fitted value. In R, augment(fit2) adds .fitted and .resid columns to the model data, making these differences inspectable for every team. section 5.7.6

par(mfrow = c(2, 2))
plot(fit1)

Run par(mfrow = c(2, 2)) followed by plot(fit1) to inspect four model-diagnostic views, including residual and fitted-value behavior. section 5.7.5

How Statistics Slam Dunk covers it

How deep it goes
Defines residuals and interprets diagnostic plots for normality, linearity, and equal variance without deriving model internals.
Examples
Demonstrates NBA wins, group means, Residuals vs. Fitted plots, Normal QQ plots, and augmented R model output.
What it assumes
Assumes fitted values and basic regression or ANOVA models while defining residuals through observed-versus-fitted differences.
What you can do after
Diagnose/debug with base R plots and augmented model output to identify assumption problems and inspect prediction errors.
How it connects
Connects residuals with fitted values, linear regression, ANOVA, normality, linearity, homoscedasticity, and diagnostic plots.

Also explained in

Compare how 11 books explain residual error →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.