Make a table of values to determine the residuals.
Sum for y=2x+3: 49 Sum for y=2.4x+3: 45 Better Line of Fit: y=2.4x+3
Practice makes perfect
We have been given the following table.
x
1
2
3
4
y
4
11
5
15
We have also been given two possible lines of fit.
Lines of Fit
y=2x+3
y=2.4x+3
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+3
Residual for y=2x+3
y Predicted by y=2.4x+3
Residual for y=2.4x+3
1
4
y=2( 1)+3= 5
4- 5= -1
y=2.4( 1)+3= 5.4
4- 5.4= -1.4
2
11
y=2( 2)+3= 7
11- 7= 4
y=2.4( 2)+3= 7.8
11- 7.8= 3.2
3
5
y=2( 3)+3= 9
5- 9= -4
y=2.4( 3)+3= 10.2
5- 10.2= -5.2
4
15
y=2( 4)+3= 11
15- 11= 4
y=2.4( 4)+3= 12.6
15- 12.6= 2.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+3.