Uncertainty and models

Residual-versus-fitted plot

Displays residuals against fitted values to reveal structure, nonlinearity or unequal variance.

  • Plot
  • Model diagnostics
  • Error structure

What it answers

Do model errors show a pattern against fitted values?

Shape
Residual points against fitted values
What it shows
Nonlinearity, unequal variance and outliers.

Example

The question

Does our demand model fit equally well across the range?

Residuals against fitted values, demand model (illustrative)

Residuals against fitted values, demand model (illustrative)Residuals scatter around zero with no curve, but the spread widens as fitted demand grows: the model is less precise for high-demand items.Residual (actual minus fitted)-12-606120255075100Fitted demand (units)
Residuals against fitted values, demand model (illustrative)Residuals scatter around zero with no curve, but the spread widens as fitted demand grows: the model is less precise for high-demand items.Residual (actual minus fitted)-12-606120255075100Fitted demand (units)
Residuals scatter around zero with no curve, but the spread widens as fitted demand grows: the model is less precise for high-demand items.

Illustrative data. It belongs to no company.

When to use it

Use it when

Regression diagnostics.

Avoid it when

Residuals from incompatible definitions or transformed scales without explanation.

How to read it

Read residual sign, spread and shape around zero.

Note

Specify residual type and standardisation.

The data you need

Layout
Long table
Fields
CaseID: text; Fitted: number; Residual: number
One row is
One fitted observation and its model residual. What is the grain?
Rules
State residual definition, such as Actual-Fitted, and any standardisation.
Optional
Alternative Actual,Fitted plus model-specific residual calculation.
Preparation
Fit/obtain model predictions and calculate the specified residual type without mismatching observations.
Units
Residual unit depends on raw, standardised or deviance residual definition. Fitted values retain the model's specified outcome scale.
Example of the input layout: Long tableA long table: one row per observation, few columns. New data adds rows.CaseIDFittedResidualAABBC
A long table: one row per observation, few columns. New data adds rows.

Worked example

Fitted 10,15,20 with residuals 2,-1,3. Plot the pairs. Three points illustrate reading but cannot establish an error pattern.

CaseIDFittedResidual
A102
B15-1
C203