Steply

Line of best fit y = x + 3, points (1, 5), (3, 5), (5, 9), (7, 9)…

Step by step, with the reason for every step · Residuals · Statistics

Step by step

The question

Question: find the residuals for the line of best fit y = x + 3 and the points (1, 5), (3, 5), (5, 9) and (7, 9).

The points are the real data.

y = x + 3; (1, 5), (3, 5), (5, 9), (7, 9)

A residual tells how far a point is from the line.

Residual = actual minus predicted.

Actual is the real y.

Predicted is the y the line gives.

residual = actual − predicted

1 Predict

First we predict each y: x = 1 into the line gives 4.

x = 1 : (1) + 3 = 1 + 3 = 4

Next: x = 3 into the line gives 6.

x = 3 : (3) + 3 = 3 + 3 = 6

Next: x = 5 into the line gives 8.

x = 5 : (5) + 3 = 5 + 3 = 8

Next: x = 7 into the line gives 10.

x = 7 : (7) + 3 = 7 + 3 = 10

2 Actual minus predicted

Careful!

Not predicted minus actual.

That flips the sign.

Actual comes first.

Careful: not 4 − 5 = −1 ✗

Actual minus predicted.

5 minus 4 is 1: 1 above the line.

x = 1 : 5 − 4 = 1

5 minus 6 is −1: 1 below the line.

x = 3 : 5 − 6 = −1

9 minus 8 is 1: 1 above the line.

x = 5 : 9 − 8 = 1

9 minus 10 is −1: 1 below the line.

x = 7 : 9 − 10 = −1

So the residuals are 1, −1, 1, −1.

Positive means above the line, negative means below.

3 Check

Let's check with a picture.

Each square up is 2.

The line of best fit.

The points.

The residual is the distance up or down from the line to the point.

And predicted plus residual gives the actual y: 5, 5, 9, 9.

So the answer is right!

4 + 1 = 5, 6 − 1 = 5, 8 + 1 = 9, 10 − 1 = 9

Let's look back.

First: predict.

Then: actual minus predicted.

Last: check.

Answer
x = 7 : 9 − 10 = −1

Your turn

Try this one yourself, then check:

Find the residuals for the line of best fit y = x + 5; (1, 9), (3, 7), (5, 12), (7, 9)
Show the answer
residuals 3, −1, 2, −3

More from Residuals

The whole lesson: Residuals →