Skip to content

Residual-versus-Fitted Plot

Diagnostic plot — instantiates Residual-Driven Model Refinement

Plots each residual against the model's fitted value (or a predictor) so leftover curvature and changing spread show up as visible shape.

The Residual-versus-Fitted Plot is the cheapest, most-reached-for look at what a model is still getting wrong. Its defining move is the choice of axes: it puts the residual on the vertical and the model's own fitted value — or a candidate predictor — on the horizontal, so that any shape in the resulting cloud is precisely the structure the mean function has failed to capture. A smile or a frown means the true relationship bends where the model runs straight; a widening fan means the spread depends on where you are along the fit; a lone point far from the herd is a candidate anomaly. Where its siblings interrogate the distribution of the residuals or their behaviour over time, this plot interrogates the residuals' relationship to the fit itself, and it does so by eye, in one glance, before any test is run.

Example

A logistics team fits a straight-line model predicting delivery time from trip distance. The headline numbers look healthy — a decent R², a mean residual of essentially zero. Then they plot residuals against fitted times and see an unmistakable U: both very short and very long trips are under-predicted, while mid-range trips are over-predicted. That curve is not noise. It says the real relationship bends — fixed loading-and-parking overhead dominates short trips, highway efficiency compresses long ones — so a single straight line is structurally wrong even though it is on average right.

The fix follows directly from the shape. They add a nonlinear distance term (a log or a piecewise break), re-fit, and re-draw the plot; the U flattens into a centred, structureless band. The plot converted a vague "the model is roughly fine" into a specific, actionable verdict: the mean function is misspecified in exactly this way, and here is the term that repairs it.

How it works

  • Choose the horizontal axis deliberately. Plot against fitted values to catch global mean-function misspecification, against a specific predictor to check that predictor's functional form, or against a suspected omitted variable — if structure appears there, that variable belongs in the model.
  • Read the shape, not the scatter. Curvature signals a wrong mean function; a systematic tilt signals bias; a fan signals variance that grows with the fit; isolated far-flung points are anomaly candidates. Each shape maps to a different repair.
  • Overlay a smoother (a LOESS trend line) so the eye is anchored to the actual local average rather than a pattern it wants to see. The target is a flat band hugging zero with no residual structure left to explain.

Tuning parameters

  • Horizontal-axis choice — fitted values, a named predictor, or a suspected omitted variable; each axis interrogates a different failure, and the defect on an axis you never draw stays invisible.
  • Residual type — raw, standardized, or studentized; standardizing makes the vertical spread comparable across the range, which matters the moment variance stops being constant.
  • Smoother span — how aggressively the overlaid trend is smoothed; a wide span reveals gross curvature, a narrow one risks tracing noise into an apparent pattern.
  • Jitter and transparency — for large samples, how a dense cloud is kept legible so genuine density is not misread as structure.

When it helps, and when it misleads

Its strength is speed and directness: it is the fastest way to catch a misspecified mean function, and a single picture surfaces curvature[1] that a lone fit statistic hides entirely. It also tells you where the trouble sits along the fit, which is exactly what points to the repair.

Its weakness is that the human eye is a relentless pattern-finder and will read a trend into pure noise, especially at small sample sizes where a handful of points suggest a curve that is not there. And because the axis you happen to plot against bounds what you can see, a real defect living on an unplotted predictor simply goes unnoticed. The classic misuse is plotting against variable after variable until some cloud looks bad enough to justify a change already decided upon. The discipline that guards against this is to compare what you see against what random residuals actually look like — a simulated null band — and to confirm that any added term improves held-out fit, not merely the appearance of the plot.

How it implements the components

  • residual_pattern_scan — this is its core: the visual sweep across the cloud for curvature, tilt, and changing spread that flags whatever structure the model has left behind.
  • residual_construction_rule — it fixes which residual actually goes on the axis (raw versus standardized), the choice that determines whether the spread is even readable.

It does not judge the residuals' distributional shape — the tails and skew are the province of Quantile-Quantile Residual Check — nor formally test the fanning it can reveal, which is the Heteroscedasticity and Scale Test; the isolated outliers it flags are sized by the Influence and Leverage Diagnostic.

Editorial Notes

Form Classification

Form family: Analysis, Modeling & Optimization

Rationale: Residual Versus Fitted Plot operates by plots residuals against fitted values or predictors and diagnoses systematic mean-function misspecification. That concrete deployed or enacted form is Analysis, Modeling & Optimization under the frozen taxonomy.

Nearest alternative: Interface, Display & Cue — Although Interface, Display & Cue can support this mechanism, the frozen evidence makes its operative form the act that plots residuals against fitted values or predictors and diagnoses systematic mean-function misspecification; the alternative is therefore secondary rather than defining.

Review outcome: Adjudicated after independent review; high confidence.

Origin Attribution

Primary origin: Statistics & Experimental Design

Origin pattern: Single lineage

Present-day reach: Universal

Rationale: Residual-versus-fitted plots are canonical regression diagnostics for nonlinearity and heteroscedasticity.

Review resolution: Both blind reviewers agree that statistics_experimental_design is the primary historical origin. Explicit reconciliation of alternate origin disagreement, domain reach disagreement adopts reviewer_a's evidence: Residual-versus-fitted plots are canonical regression diagnostics for nonlinearity and heteroscedasticity. The selected record uses alternates=none, origin_mode=single_lineage, and domain_reach=universal; the other review proposed alternates=data_science, mathematics, origin_mode=single_lineage, and domain_reach=specialized. The selected combination better preserves the mechanism-specific formative lineages and calibrated scope; broader present-day use is not treated as proof of additional historical origin.

Review outcome: Reconciled after independent review; high confidence.

Notes

A clean residual-versus-fitted plot is necessary but not sufficient. It only shows structure along the one or two axes you chose to draw, and it is blind to defects that live in the distribution of the residuals or in their ordering over time — which is exactly why the distributional and serial-dependence siblings exist alongside it rather than being replaced by it.

References

[1] Anscombe, F. J. "Graphs in Statistical Analysis". The American Statistician 27(1), 17–21 (1973). Shows that a plot can surface curvature that a lone fit statistic hides. registry