Step by step
The question
Question: find the line of best fit for (10, 19), (20, 26), (30, 38), (40, 46), (50, 59).
Then predict y when x is 60.
The line of best fit is the straight line that comes closest to all the points.
1 Find the means
The mean of the x numbers: 150 divided by 5 is 30.
The mean of the y numbers: 188 divided by 5 is 37.6.
The line of best fit always goes through the mean point, (30, 37.6).
2 Make the table
A table with the points.
Each x minus the mean x, 30.
Each y minus the mean y, 37.6.
For the first point: 10 minus 30 is −20, and 19 minus 37.6 is −18.6.
The product: the two distances multiplied.
−20 times −18.6 is 372.
And the x distance squared.
−20 squared is 400.
We add the last two columns: 1000 and 1000.
3 Find the slope
The slope is the total of the products, over the total of the squares.
Careful!
The bottom uses only the x distances, squared.
Not the y distances.
1000/1000 is 1.
4 Find b
The line goes through the mean point.
So b is the mean y, minus m times the mean x.
1 times 30 is 30.
37.6 minus 30 is 7.6.
So the line of best fit is y = x + 7.6.
5 Draw the line
Now the points on a graph.
Each point is a dot.
The line goes through the mean point.
The line y = x + 7.6: it passes close to all the points.
6 Predict
To predict, we put x = 60 into the line.
1 times 60 is 60.
Plus 7.6 is 67.6.
On the graph: at x = 60, the line is at 67.6.
7 Check
Let's check: the mean point must be on the line.
1 times 30 plus 7.6 is 37.6.
That is the mean y.
So it is right!
Let's look back.
First: find the means.
Then: make the table.
Then: find the slope.
Then: find b.
Then: draw the line.
Then: predict.
Last: check.