Make a table of values to determine the residuals.
Sum for y=x+3: 88 Sum for y=x+2.6: 75.84 Better Line of Fit: y=x+2.6
Practice makes perfect
We have been given the following table.
x
2
4
6
8
y
1
5
7
3
We have also been given two possible lines of fit.
Lines of Fit
y=x+3
y=x+2.6
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+3
Residual for y=x+3
y Predicted by y=x+2.6
Residual for y=x+2.6
2
1
y= 2+3= 5
1- 5= -4
y= 2+2.6= 4.6
1- 4.6= -3.6
4
5
y= 4+3= 7
5- 7= -2
y= 4+2.6= 6.6
5- 6.6= -1.6
6
7
y= 6+3= 9
7- 9= -2
y= 6+2.6= 8.6
7- 8.6= -1.6
8
3
y= 8+3= 11
3- 11= -8
y= 8+2.6= 10.6
3- 10.6= -7.6
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+3.