In: Statistics and Probability
Solve for the predicted values of y and the residuals
for the following data.
x | 12 | 21 | 28 | 8 | 20 |
y | 17 | 15 | 22 | 19 | 24 |
Do not round the intermediate values. (Round your
answers to 3 decimal places.)
x | y | Predicted (ŷ) | Residuals (y-ŷ) |
12 | 17 | ||
21 | 15 | ||
28 | 22 | ||
8 | 19 | ||
20 | 24 |
The following data are passed:
X | Y |
12 | 17 |
21 | 15 |
28 | 22 |
8 | 19 |
20 | 24 |
The independent variable is X, and the dependent variable is Y. In order to compute the regression coefficients, the following table needs to be used:
X | Y | X*Y | X2 | Y2 | |
12 | 17 | 204 | 144 | 289 | |
21 | 15 | 315 | 441 | 225 | |
28 | 22 | 616 | 784 | 484 | |
8 | 19 | 152 | 64 | 361 | |
20 | 24 | 480 | 400 | 576 | |
Sum = | 89 | 97 | 1767 | 1833 | 1935 |
Based on the above table, the following is calculated:
Therefore, based on the above calculations, the regression coefficients (the slope m, and the y-intercept n) are obtained as follows
Therefore, we find that the regression equation is:
Y = 16.5096 + 0.1624 X
x | y | Predicted (ŷ) | Residuals (y-ŷ) |
12 | 17 | 18.4584 | -1.4584 |
21 | 15 | 19.92 | -4.92 |
28 | 22 | 21.0568 | 0.9432 |
8 | 19 | 17.8088 | 1.1912 |
20 | 24 | 19.7576 | 4.2424 |