Make a table of values to determine the residuals.
Sum for y=2x+1: 238 Sum for y=2x+1.4: 259.44 Better Line of Fit: y=2x+1
Practice makes perfect
We have been given the following table.
x
2
4
6
8
y
3
6
4
5
We have also been given two possible lines of fit.
Lines of Fit
y=2x+1
y=2x+1.4
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=2x+1
Residual for y=2x+1
y Predicted by y=2x+1.4
Residual for y=2x+1.4
2
3
y=2( 2)+1= 5
3- 5= -2
y=2( 2)+1.4= 5.4
3- 5.4= -2.4
4
6
y=2( 4)+1= 9
6- 9= -3
y=2( 4)+1.4= 9.4
6- 9.4= -3.4
6
4
y=2( 6)+1= 13
4- 13= -9
y=2( 6)+1.4= 13.4
4- 13.4= -9.4
8
5
y=2( 8)+1= 17
5- 17= -12
y=2( 8)+1.4= 17.4
5- 17.4= -12.4
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=2x+1.