Key - Lab 5 - OLS Live and Regression

Key - Lab 5 - OLS Live and Regression - X 1 2 3 4 5 6 7 8 9...

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: X 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 E[Y] 21.5 32 41.5 50 57.5 64 69.5 74 77.5 80 81.5 82 81.5 80 77.5 74 69.5 64 57.5 50 41.5 32 21.5 u -3.22 -3.9 2.25 4.95 2.22 6.85 -2.77 -1.66 -0.49 5.09 -3.27 -4.01 1.71 -0.41 -2.76 -0.32 1 7.53 -0.64 6.66 3.92 -6.72 4.2 Y 18.28 28.1 43.75 54.95 59.72 70.85 66.73 72.34 77.01 85.09 78.23 77.99 83.21 79.59 74.74 73.68 70.5 71.53 56.86 56.66 45.42 25.28 25.7 Put your graph here: Correlation Coefficient: We said that correlation is a measure of linear association, and that it can do poorly in detecting nonlinear association. In this exercise, you should see that. We've created a perfect nonlinear relationship the relationship of E[Y|X] to X is a perfect quadratic relationship. We then add disturbances so that it's not perfect. Does correlation detect this nearly perfect relationship? Check the correlation coefficient for the two variables X and Y. What is the value? SUMMARY OUTPUT Regression Statistics Multiple R R Square Adjusted R Square Standard Error Observations ANOVA df Regression Residual Total 1 8 9 SS 11112.8 999.7 12112.5 MS 11112.8 124.96 F Significance F 88.93 0 0.958 0.917 0.907 11.179 10 Intercept X Coefficients Standard Error 28.848 11.042 0.5803 0.0615 t Stat P-value 2.613 0.031 9.430 0.000 Lower 95% Upper 95% Lower 95.0% Upper 95.0% 3.38 54.31 3.38 54.31 0.4384 0.7222 0.4384 0.7222 Obs. 1 2 3 4 5 6 7 8 9 10 Totals Means: St. Dev: Corr(XY) corr-Sq Y 70 95 90 105 140 135 130 170 160 180 1275 127.5 36.69 0.9578 0.9175 X 80 100 120 140 160 180 200 220 240 260 1700 170 60.55 x -90 -70 -50 -30 -10 10 30 50 70 90 0 y -57.5 -32.5 -37.5 -22.5 12.5 7.5 2.5 42.5 32.5 52.5 0 x*y 5175 2275 1875 675 -125 75 75 2125 2275 4725 19150 xsq 8100 4900 2500 900 100 100 900 2500 4900 8100 33000 Relationship of Week Weekly Consumption Expen beta 1 hat beta 0 hat 0.5803 28.848 0.5803 28.848 Relationship of Weekly Consumption Expenditures to Weekly Income. 200 180 160 140 120 Weekly Consumption Expenditures (\$) 100 80 60 40 20 0 50 100 150 200 250 300 f(x) = 0.58x + 28.85 R² = 0.92 Weekly Income (\$) Table 1: Generating the sum of the squared errors. OLS: Finding the line of "best fit." 250 Y 70 95 90 105 140 135 130 170 160 180 Totals X 80 100 120 140 160 180 200 220 240 260 75.27 86.88 98.48 110.09 121.70 133.30 144.91 156.51 168.12 179.73 e -5.27 8.12 -8.48 -5.09 18.30 1.70 -14.91 13.49 -8.12 0.27 0.01 27.80 65.96 71.99 25.91 335.02 2.88 222.26 181.86 65.94 0.07 999.70 200 150 Y 100 50 0 0 50 100 150 X 200 250 300 OLS Live: What's ha these graphs? Plotting the Sum of Squared Errors 40000 35000 30000 25000 20000 15000 10000 5000 0 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 28.85 0.58 Enter values here for the intercept and slope of the fitted line. 0.90 0.80 0.70 0.60 0.58 0.50 0.40 0.30 33910.08 16541.59 5613.11 1124.62 999.70 3076.14 11467.65 26299.17 Slope Estimates We see that changin changes the line, ch squared errors, and errors. Thus, by cha change the line and mi ni mi zes the sum o see that the sum or virtually 0.00, when of the squared-error minimize the sum o consistent with gett of the data. We wou using calculus - find derivative (slope) of function is zero. Tha the u-shaped curve, 0.580303. The OLS function is zero. Tha the u-shaped curve, 0.580303. The OLS OLS Live: What's happening in the table and these graphs? We see that changing the slope, beta_1 hat, changes the line, changes all the errors, all the squared errors, and the sum of the squared errors. Thus, by changing the estimates, we change the line and can find the line that m i ni mi zes the sum of the squa r ed-er r or s. We also see that the sum or the errors is at 0.01, or virtually 0.00, when we have minimized the sum of the squared-errors. Thus, the OLS criterion, to minimize the sum of the squared-errors, is consistent with getting the line through the center of the data. We would find the best estimates by using calculus - finding the point where the derivative (slope) of the sum of the squared-errors function is zero. That is the point at the bottom of the u-shaped curve, the point where beta_1 hat = 0.580303. The OLS estimate. function is zero. That is the point at the bottom of the u-shaped curve, the point where beta_1 hat = 0.580303. The OLS estimate. Make EX DX DX LX EX EX LX DX LX EX EX EX EX LX EX EX EX EX EX EX EX EX EX EX EX EX EX EX EX EX Miles Price Distance Engine 82638 13995 100 26450 14495 71 23257 16900 49 58587 17490 42 38051 17495 20 35902 17993 70 12080 17995 90 37255 17995 72 30844 18590 42 34581 18975 67 28170 18995 50 29700 19200 100 21536 19485 50 33804 19850 41 20027 19995 59 36879 20495 69 12658 20895 63 20624 20962 67 34776 20990 42 14227 20995 36 14227 20995 36 20530 20995 66 31970 21440 38 28190 22450 41 22256 23980 81 23203 23988 68 15000 23995 42 19155 23995 70 27347 24988 68 24680 24995 64 Transmission Doors 4 Manual 4 Manual 4 Manual 4 Auto 4 Auto 4 Manual 4 Auto 4 Manual 4 Auto 4 Auto 4 Auto 6 Manual 4 Auto 6 Automatic 4 Manual 4 Auto 6 Automatic 4 Auto 4 Auto 6 Manual 6 Automatic 6 Automatic 6 Manual 6 Automatic 6 Manual 6 Automatic 6 Automatic 6 Automatic 6 Automatic 6 Automatic DX 4 4 4 4 4 2 2 4 4 2 4 2 4 2 4 4 2 4 4 2 4 2 2 4 2 4 4 4 4 4 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 LX 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SUMMARY OUTPUT Regression Statistics Multiple R 0.525 R Square 0.276 Adjusted R Square 0.250 Standard Error 2449.388 Observations 30 ANOVA df Regression Residual Total 1 28 29 SS ### ### ### MS ### ### F Significance F 10.68 0 Intercept Miles CoefficientsStandard Error t Stat 23191.85 1022.62 22.68 -0.105 0.032 -3.267 P-value 0.000 0.003 Lower 95% Upper 95% 21097.10 25286.60 -0.171 -0.039 Lower 95.0% Upper 95.0% 21097.10 25286.60 -0.171 -0.039 ...
View Full Document

This note was uploaded on 12/08/2011 for the course ECON 312 taught by Professor Daniellass during the Winter '10 term at UMass (Amherst).

Ask a homework question - tutors are online