In: Math
Distance |
3.4 |
1.8 |
4.6 |
2.3 |
3.1 |
5.5 |
0.7 |
3.0 |
Damage |
26.2 |
17.8 |
31.3 |
23.1 |
27.5 |
36.0 |
14.1 |
22.3 |
Distance |
2.6 |
4.3 |
2.1 |
1.1 |
6.1 |
4.8 |
3.8 |
|
Damage |
19.6 |
31.3 |
24.0 |
17.3 |
43.2 |
36.4 |
26.1 |
Write the equation (formula) for a residual and then calculate its value “by hand” for the observation in the data set whose distance between the fire and nearest fire station (in miles) is 3.0; show your work. Based on this value, was the observation overestimated (below average) or underestimated (above average) by the regression? Explain. See page 191 in the course text.
residual(e)=y-y^=y-(a+bx)=y-(10.26+4.92*x)
for x=3, the estimated value of y is y^=10.26+4.92*3=25.02
residual for this value is y-y^=22.3-25.02=-2.72, negative residual means it is overestimated
Residual = Observed – Predicted
positive values for the residual mean the prediction was too low, and negative values mean the prediction was too high.when the model overestimates the observation: the residual is negative.
here Damage(y) is dependent variable and Distance(x) is independent variable.
the regression equation y^=a+bx=10.26+4.92*x
a=(sum(y)*sum(x2)-sum(x)*sum(xy))/(n*sum(x2)-(sum(x))2)=(396.16*196.16-49.2*1470.65)/(15*196.16-49.2*49.2)=10.26
b=(n*sum(xy)-sum(x)*sum(y))/ (n*sum(x2)-(sum(x))2)=(15*1470.65-49.2*396.2)/(15*196.16-49.2*49.2)=4.92
S.N. | Distance(x) | Damage(y) | x2 | y2 | xy |
1 | 3.4 | 26.2 | 11.56 | 686.44 | 89.08 |
2 | 1.8 | 17.8 | 3.24 | 316.84 | 32.04 |
3 | 4.6 | 31.3 | 21.16 | 979.69 | 143.98 |
4 | 2.3 | 23.1 | 5.29 | 533.61 | 53.13 |
5 | 3.1 | 27.5 | 9.61 | 756.25 | 85.25 |
6 | 5.5 | 36 | 30.25 | 1296 | 198 |
7 | 0.7 | 14.1 | 0.49 | 198.81 | 9.87 |
8 | 3.0 | 22.3 | 9 | 497.29 | 66.9 |
9 | 2.6 | 19.6 | 6.76 | 384.16 | 50.96 |
10 | 4.3 | 31.3 | 18.49 | 979.69 | 134.59 |
11 | 2.1 | 24 | 4.41 | 576 | 50.4 |
12 | 1.1 | 17.3 | 1.21 | 299.29 | 19.03 |
13 | 6.1 | 43.2 | 37.21 | 1866.24 | 263.52 |
14 | 4.8 | 36.4 | 23.04 | 1324.96 | 174.72 |
15 | 3.8 | 26.1 | 14.44 | 681.21 | 99.18 |
sum= | 49.2 | 396.2 | 196.16 | 11376.5 | 1470.65 |
n= | 15 | 15 | 15 | 15 | 15 |
a=(sum(y)*sum(x2)-sum(x)*sum(xy))/(n*sum(x2)-(sum(x))2)=(396.16*196.16-49.2*1470.65)/(15*196.16-49.2*49.2)=
b=(n*sum(xy)-sum(x)*sum(y))/ (n*sum(x2)-(sum(x))2)=(15*1470.65-49.2*396.2)/(15*196.16-49.2*49.2)=