Presentation is loading. Please wait.

Presentation is loading. Please wait.

Econ 140 Lecture 121 Prediction and Fit Lecture 12.

Similar presentations


Presentation on theme: "Econ 140 Lecture 121 Prediction and Fit Lecture 12."— Presentation transcript:

1 Econ 140 Lecture 121 Prediction and Fit Lecture 12

2 Econ 140 Lecture 122 Today’s plan Prediction using the regression equation –Plugging in values into the equation to get predictions of Y Coefficient of determination (R 2 ) Lessons on the predictive ability of an equation

3 Econ 140 Lecture 123 Prediction For our regression equation we can plug in values of X to get predictions of Y Keep in mind that these coefficients are estimates that are bound by confidence intervals If X o =17, Since Y is measured in natural logs, our estimate of Y is

4 Econ 140 Lecture 124 Prediction (2) This is different from the confidence interval around the regression line. (See oops.pdf from Lecture 1). Now we’re dealing with the sampling distribution around The mean is E(Y|X 0 ) = a + bX 0 where X 0 is the chosen value for the prediction –here, X 0 =17

5 Econ 140 Lecture 125 Prediction (3) The variance for the prediction is: –The right hand part of the term takes into account how far X 0 is away from the mean of X divided by the variation of X as a whole –The further away X 0 is from the mean of X, the higher the variability we get, given the variation in X.

6 Econ 140 Lecture 126 Prediction (4) The standard error of the predicted value for Y given a value of X is the square root of the variance term We know: so The standard error is the square root, or: = 0.03

7 Econ 140 Lecture 127 Confidence interval around Y 0 Confidence interval around the predicted values of Y looks like: X Y X 0 = 17

8 Econ 140 Lecture 128 Confidence interval around Y 0 (2) We can see that the further away the value of X 0 is from the mean of X, the larger the variation in the standard error for the predicted value of Y ( ) A confidence interval estimate of the true value of Y 0 will be

9 Econ 140 Lecture 129 Confidence interval around Y 0 (3) The 95% confidence interval for Y 0 is Thus the expected value of Y given that X is 17 lies between

10 Econ 140 Lecture 1210 Returning to Palm Beach County Let’s return to what we looked at in lecture 1 The number of registered voters versus the number of cotes cast for each political party in Florida For the number of Reform votes cast versus the number of registered Reform voters, the regression line seems to fit the data except for one outlier - Palm Beach County L12.xls is on the the web –Does the number of votes cast fall within a 95 percent confidence interval for the prediction?

11 Econ 140 Lecture 1211 Returning to Palm Beach County (2) The prediction of the number of votes cast in Palm Beach County is approximately 875! This compares with the actual votes cast of 3407. The 95 percent confidence interval estimate for Palm Beach county is: 806 < E(Y|X=337) < 943. Still along way from 3407. Could we really expect so many votes for Buchanan given the statistical evidence?

12 Econ 140 Lecture 1212 Coefficient of determination R 2 R 2 will be part of the output from most statistical software, (see the Stata output or the LINEST output). We can rewrite R 2 as

13 Econ 140 Lecture 1213 Coefficient of determination R 2 (2) R 2 has two properties: 0  R 2  1. –If the model has explained all of the variation, R 2 will be 1. If the model has explained none of the variation, R 2 will be zero R 2 will always be positive

14 Econ 140 Lecture 1214 Coefficient of determination R 2 (3) From L9.xls we know From this we can calculate R 2 = 6.181/ 16.112 = 0.38 We will see that there is a relationship between R 2 and the coefficient of correlation, which is the measure of correlation between X and Y

15 Econ 140 Lecture 1215 Coefficient of determination R 2 (4) To get the coefficient of correlation, we can think of the model as You can square and sum both sides of the equation so that There should be no correlation between the independent variable and the errors so

16 Econ 140 Lecture 1216 Coefficient of determination R 2 (5) Now we’re left with We have R 2 and b 2 equal to Model Sum of Squares Residual Sum of Squares We can substitute R 2 and b 2 to get:

17 Econ 140 Lecture 1217 Coefficient of determination R 2 (6) The coefficient of correlation R is: So from this we can see that there is a relationship between the coefficient of determination and the coefficient of correlation –We can see how correlated X and Y are and how good of a job the model is doing –A higher R 2 doesn’t necessarily mean that the causal relationship implied by the model increases - your reasoning should come from economic theory

18 Econ 140 Lecture 1218 Coefficient of determination R 2 (7) If we can write we know that what matters to R 2 as a predictive indicator, once we know b, is  x 2, or the variation in X To improve the predictive ability of a regression equation, the observations on X should not be clustered around the mean of X, but should range over as many values as possible.

19 Econ 140 Lecture 1219 Lessons on the regression equation Lesson One : the predictive ability of any regression equation declines as X 0 moves away from the mean of X Lesson Two : For strong predictive ability, you need wide variation in X

20 Econ 140 Lecture 1220 Next time Next time we’ll be moving from a bivariate world to a multivariate world –We will look at how the multivariate equation relates to the bi-variate equation –We will use the LINEST function to obtain estimates in the same way that we have for the bi-variate case


Download ppt "Econ 140 Lecture 121 Prediction and Fit Lecture 12."

Similar presentations


Ads by Google