Make a table of values to determine the residuals.
Sum for y=x+5: 15 Sum for y=1.3x+5: 16.5 Better Line of Fit: y=x+5
Practice makes perfect
We have been given the following table.
x
1
2
3
4
y
7
5
11
8
We have also been given two possible lines of fit.
Lines of Fit
y=x+5
y=1.3x+5
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=1.3x+5
Residual for y=1.3x+5
1
7
y= 1+5= 6
7- 6= 1
y=1.3( 1)+5= 6.3
7- 6.3= 0.7
2
5
y= 2+5= 7
5- 7= -2
y=1.3( 2)+5= 7.6
5- 7.6= -2.6
3
11
y= 3+5= 8
11- 8= 3
y=1.3( 3)+5= 8.9
11- 8.9= 2.1
4
8
y= 4+5= 9
8- 9= -1
y=1.3( 4)+5= 10.2
8- 10.2= -2.2
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.