โ† Home ยท Residuals, four ways
Residuals & residual plots
Same idea, four ways to study it. Tap a style and find the one that clicks for you. ๐Ÿ“บ Prefer to watch? Videos are on the lesson page.
๐Ÿ” A residual is just actual โˆ’ predicted (y โˆ’ ลท): how far off the line was for that point. A random residual plot = the line fits. A patterned one = a straight line isn't the right model.

What it is

Once you have a regression line, how do you know it actually fits? A residual is the gap between an actual data point and what the line predicted, how wrong the model was for that point.

residual = actual โˆ’ predicted = y โˆ’ ลท

Positive, negative, and the zero rule

Positive residual: the point is above the line, the model under-predicted (e.g. predicted 70, scored 75 โ†’ +5).

Negative residual: the point is below the line, the model over-predicted (e.g. predicted 80, scored 74 โ†’ โˆ’6).

For a least-squares line, the sum of all residuals is always 0, the over- and under-predictions balance out. Handy as a check.

The residual plot rule

Plot the residuals against x, with a zero line through the middle:

Random scatter around zero โ†’ a linear model is appropriate. โœ“
A clear pattern (curve, fan shape) โ†’ the relationship is non-linear, a straight line isn't the best model.

Worked example

Using ลท = 4.5x + 38, find Cal's residual. Cal studied x = 6 hours and scored 67.

  1. Predict: ลท = 4.5(6) + 38 = 27 + 38 = 65.
  2. Residual = actual โˆ’ predicted = 67 โˆ’ 65 = +2.
  3. Positive, so Cal scored 2 marks above what the line predicted.

Watch out

โ€ข Residual = actual โˆ’ predicted, in that order (not predicted โˆ’ actual).
โ€ข Read the residual plot's shape, not the original scatter, to judge the fit.
โ€ข Sum of residuals near 0 is a sign your line is right.
โ€ข A point far from the zero line is an outlier, mention it.

Good fit vs bad fit

random โ†’ fits โœ“ U-shape โ†’ no fit โœ—

Left: residuals scattered randomly around the zero line, the straight-line model is fine. Right: residuals make a clear curve, the data is really non-linear.

Where a residual comes from

residual the line (ลท)

The residual is the vertical gap from the actual point to the line: actual minus predicted.

Warm up first

Don't read yet, just have a go in your head:

Predicted 70, actual 75. Residual?
75 โˆ’ 70 = +5. Positive, so the point is above the line.
Predicted 80, actual 74. Residual?
74 โˆ’ 80 = โˆ’6. Negative, so the point is below the line.
A residual plot makes a clear U-shape. Good fit?
No. A pattern means the relationship is non-linear, a straight line isn't the best model.

Faded example: residuals from ลท = 4.5x + 38

Rung 1 ยท watch one done fully

Cal: x = 6, scored 67. Predicted = 4.5(6) + 38 = 65. Residual = 67 โˆ’ 65 = +2.

Rung 2 ยท you fill the gaps

Brooke: x = 4, scored 54. Predicted = 4.5(4) + 38 = ?. Residual = 54 โˆ’ ? = ?

Check my gaps
Predicted 56, so residual = 54 โˆ’ 56 = โˆ’2 (below the line).
Rung 3 ยท all you

Dana: x = 8, scored 72. Find Dana's residual, and say if Dana is above or below the line. Check below.

Check my answer
Predicted = 4.5(8) + 38 = 74. Residual = 72 โˆ’ 74 = โˆ’2. Negative, so Dana is below the line.

Exam-style stretch: read the plot

A residual plot shows the points forming a clear downward-then-upward curve. What does this tell you about the model?

Show the answer
The curved pattern means the residuals are not random, so a linear model is not appropriate. The true relationship between the variables is non-linear, and a different (curved) model would fit better.

Say it back

In one sentence, out loud: what does a residual plot tell you that the correlation alone doesn't?

โšก Residuals, one look

Residualactual โˆ’ predicted = y โˆ’ ลท
Positivepoint above the line (model under-predicted)
Negativepoint below the line (model over-predicted)
Sumall residuals add to 0 (least-squares check)
Plot: randomโ†’ linear model fits โœ“
Plot: patternโ†’ non-linear, line not the best model โœ—
Examplex=6 scored 67, ลท=65 โ†’ residual +2
Trapactual โˆ’ predicted (that order) ยท read the plot's shape