Make a table of values to determine the residuals.
Sum for y=x+5: 144 Sum for y=x+4.9: 139.24 Better Line of Fit: y=x+4.9
Practice makes perfect
We have been given the following table.
x
2
4
6
8
y
1
3
5
7
We have also been given two possible lines of fit.
Lines of Fit
y=x+5
y=x+4.9
In order to determine which line of fit is better, let's calculate the residuals for both lines.
x
y (Actual)
y Predicted by y=x+5
Residual for y=x+5
y Predicted by y=x+4.9
Residual for y=x+4.9
2
1
y= 2+5= 7
1- 7= -6
y= 2+4.9= 6.9
1- 6.9= -5.9
4
3
y= 4+5= 9
3- 9= -6
y= 4+4.9= 8.9
3- 8.9= -5.9
6
5
y= 6+5= 11
5- 11= -6
y= 6+4.9= 10.9
5- 10.9= -5.9
8
7
y= 8+5= 13
7- 13= -6
y= 8+4.9= 12.9
7- 12.9= -5.9
Now, we will square the residuals and find their sum s for each line so that we can compare which line is a better fit. Let's start with the line y=x+5.