In: Economics
Almost all U.S. light-rail systems use electric cars that run on
tracks built at street level. The Federal Transit Administration
claims light-rail is one of the safest modes of travel, with an
accident rate of .99 accidents per million passenger miles as
compared to 2.29 for buses. The following data show the miles of
track and the weekday ridership in thousands of passengers for six
light-rail systems.
City | Miles of Track | Ridership (1000s) |
Cleveland | 13 | 14 |
Denver | 15 | 34 |
Portland | 36 | 80 |
Sacramento | 19 | 30 |
San Diego | 45 | 74 |
San Jose | 29 | 29 |
St. Louis | 32 | 41 |
SSE | |
SST | |
SSR | |
MSE |
1.
x(miles) | y(ridership) |
13 | 14 |
15 | 34 |
36 | 80 |
19 | 30 |
45 | 74 |
29 | 29 |
32 | 41 |
x(miles) | y(ridership) | mean x | mean y | x - mean x | (x - mean x)^2 | y - mean y | (y - mean y)^2 | (x - mean x)(y-mean y) |
13 | 14 | 27 | 43.14 | -14 | 196 | -29.14 | 849.1396 | 407.96 |
15 | 34 | 27 | 43.14 | -12 | 144 | -9.14 | 83.5396 | 109.68 |
36 | 80 | 27 | 43.14 | 9 | 81 | 36.86 | 1358.6596 | 331.74 |
19 | 30 | 27 | 43.14 | -8 | 64 | -13.14 | 172.6596 | 105.12 |
45 | 74 | 27 | 43.14 | 18 | 324 | 30.86 | 952.3396 | 555.48 |
29 | 29 | 27 | 43.14 | 2 | 4 | -14.14 | 199.9396 | -28.28 |
32 | 41 | 27 | 43.14 | 5 | 25 | -2.14 | 4.5796 | -10.7 |
a. The formula for b1 is SSxy/SSxx
from the table we calculate SSxy= (x-mean x)(y- mean y) summing over for all cities = 1471 and SSxx = (x-mean x)^2 summing over for all cities = 838. So b1 = 1471/838 = 1.76
b0 = mean y - b1mean x
b0 = 43.14 - (1.76 * 27)
b0 = -4.38
So the estimated regression equation can be written as :y = -4.38 + 1.76 x
b. The sum of squares total (SST), is the squared differences between the observed dependent variable and its mean
So here SST = summation of (y - mean y)^2 for all cities.
SST = 3620.86
The sum of squares due to regression (SSR) is the sum of the differences between the predicted value and the mean of the dependent variable. The predicted value is calculated using the estimated regression equation:
predicted y | predicted y - mean y | (predicted y - mean y)^2 |
18.5 | -24.64 | 607.1296 |
22.02 | -21.12 | 446.0544 |
58.98 | 15.84 | 250.9056 |
29.06 | -14.08 | 198.2464 |
74.82 | 31.68 | 1003.6224 |
46.66 | 3.52 | 12.3904 |
51.94 | 8.8 | 77.44 |
The summation of square of predicted y minus mean y over all cities gives the SSR.
SSR = 2595.79
SSE is the sum of square of error which is the residual after SSR. So SSE = SST- SSR
SSE = 1025.07
MSE is the mean squared error which takes the summation of the square of the difference between actual y and predicted y.
error | error^2 |
-4.5 | 20.25 |
11.98 | 143.5204 |
21.02 | 441.8404 |
0.94 | 0.8836 |
-0.82 | 0.6724 |
-17.66 | 311.8756 |
-10.94 | 119.6836 |
MSE = 1038.73
c. Coefficient of determination is SSR/SST = 2595.79/3620.86 = .72
The value is closer to 1 so a greater part of the variation in dependent variable can be explained by the independent variable. So, the model is a good fit.