Steply

Line of best fit y = 3x - 1, points (1, 1), (2, 7), (3, 8), find the…

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 = 3x − 1 and the points (1, 1), (2, 7) and (3, 8).

The points are the real data.

y = 3x − 1; (1, 1), (2, 7), (3, 8)

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 2.

x = 1 : 3(1) − 1 = 3 − 1 = 2

Next: x = 2 into the line gives 5.

x = 2 : 3(2) − 1 = 6 − 1 = 5

Next: x = 3 into the line gives 8.

x = 3 : 3(3) − 1 = 9 − 1 = 8

2 Actual minus predicted

Careful!

Not predicted minus actual.

That flips the sign.

Actual comes first.

Careful: not 2 − 1 = 1 ✗

Actual minus predicted.

1 minus 2 is −1: 1 below the line.

x = 1 : 1 − 2 = −1

7 minus 5 is 2: 2 above the line.

x = 2 : 7 − 5 = 2

8 minus 8 is 0: on the line.

x = 3 : 8 − 8 = 0

So the residuals are −1, 2, 0.

Positive means above the line, negative means below.

3 Check

Let's check with a picture.

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: 1, 7, 8.

So the answer is right!

2 − 1 = 1, 5 + 2 = 7, 8 + 0 = 8

Let's look back.

First: predict.

Then: actual minus predicted.

Last: check.

Answer
x = 3 : 8 − 8 = 0

Your turn

Try this one yourself, then check:

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

More from Residuals

The whole lesson: Residuals →