Sign In
Make a table of values to determine the residuals.
Sum for y=x+1.5: 9
Sum for y=x+1.7: 9.72
Better Line of Fit: y=x+1.5
We have been given the following table.
| x | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| y | 2 | 5 | 4 | 3 |
We have also been given two possible lines of fit.
| Lines of Fit | |
|---|---|
| y=x+1.5 | y=x+1.7 |
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+1.5 | Residual for y=x+1.5 | y Predicted by y=x+1.7 | Residual for y=x+1.7 |
|---|---|---|---|---|---|
| 1 | 2 | y= 1+1.5= 2.5 | 2- 2.5= -0.5 | y= 1+1.7= 2.7 | 2- 2.7= -0.7 |
| 2 | 5 | y= 2+1.5= 3.5 | 5- 3.5= 1.5 | y= 2+1.7= 3.7 | 5- 3.7= 1.3 |
| 3 | 4 | y= 3+1.5= 4.5 | 4- 4.5= -0.5 | y= 3+1.7= 4.7 | 4- 4.7= -0.5 |
| 4 | 3 | y= 4+1.5= 5.5 | 3- 5.5= -2.5 | y= 4+1.7= 5.7 | 3- 5.7= -2.7 |
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+1.5.
Calculate power
Add terms
Thus, the sum of the squared residuals for y=x+1.5 is 9. Next, we will continue with the line y=x+1.7.
Calculate power
Add terms
The sum of the squared residuals for y=x+1.7 is 9.72. As a result, we can say that y=x+1.5 is the better line of fit because it has a lesser sum.