Make a table of values to determine the residuals.
Sum for y=3x+4: 936 Sum for y=3x+4.1: 947.24 Better Line of Fit: y=3x+4
Practice makes perfect
We have been given the following table.
x
2
4
6
8
y
2
8
4
6
We have also been given two possible lines of fit.
Lines of Fit
y=3x+4
y=3x+4.1
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=3x+4
Residual for y=3x+4
y Predicted by y=3x+4.1
Residual for y=3x+4.1
2
2
y=3( 2)+4= 10
2- 10= -8
y=3( 2)+4.1= 10.1
2- 10.1= -8.1
4
8
y=3( 4)+4= 16
8- 16= -8
y=3( 4)+4.1= 16.1
8- 16= -8.1
6
4
y=3( 6)+4= 22
4- 22= -18
y=3( 6)+4.1= 22.1
4- 22.1= -18.1
8
6
y=3( 8)+4= 28
6- 28= -22
y=3( 8)+4.1= 28.1
6- 28.1= -22.1
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=3x+4.