Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component 

Similar presentations


Presentation on theme: "1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component "— Presentation transcript:

1 1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component  2. We demonstrated mathematically that the expectation of the error term is zero and hence that b 2 is an unbiased estimator of  2. True model Fitted model

2 2 In this slideshow we will investigate the effect of the error term on b 2 directly, using a Monte Carlo experiment (simulation). A MONTE CARLO EXPERIMENT True model Fitted model

3 3 A Monte Carlo experiment is a laboratory-style exercise usually undertaken with the objective of evaluating the properties of regression estimators under controlled conditions. A MONTE CARLO EXPERIMENT Choose model in which Y is determined by X, parameter values, and u

4 4 We will use one to investigate the behavior of OLS regression coefficients when applied to a simple regression model. A MONTE CARLO EXPERIMENT Choose model in which Y is determined by X, parameter values, and u

5 5 We will assume that Y is determined by a variable X and a disturbance term u, we will choose the data for X, and we will choose values for the parameters. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose model in which Y is determined by X, parameter values, and u

6 6 We will also generate values for the disturbance term randomly from a known distribution. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Choose model in which Y is determined by X, parameter values, and u

7 7 The values of Y in the sample will be determined by the values of X, the parameters and the values of the disturbance term. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Choose model in which Y is determined by X, parameter values, and u

8 8 We will then use the regression technique to obtain estimates of the parameters using only the data on Y and X. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Choose model in which Y is determined by X, parameter values, and u

9 9 We can repeat the process indefinitely keeping the same data for X and the same values of the parameters but using new randomly-generated values for the disturbance term. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Choose model in which Y is determined by X, parameter values, and u

10 10 In this way we can derive probability distributions for the regression estimators which allow us, for example, to check up on whether they are biased or unbiased. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Choose model in which Y is determined by X, parameter values, and u

11 11 In this experiment we have 20 observations in the sample. X takes the values 1, 2,..., 20.  1 is equal to 2.0 and  2 is equal to 0.5. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Y =  1 +  2 X + u X = 1, 2,..., 20  1 = 2.0  2 = 0.5 u is independent N(0,1) Y = 2.0 + 0.5X + u Generate the values of Y Choose model in which Y is determined by X, parameter values, and u

12 12 The disturbance term is generated randomly using a normal distribution with zero mean and unit variance. Hence we generate the values of Y. A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Y =  1 +  2 X + u X = 1, 2,..., 20  1 = 2.0  2 = 0.5 u is independent N(0,1) Y = 2.0 + 0.5X + u Generate the values of Y Choose model in which Y is determined by X, parameter values, and u

13 13 We will then regress Y on X using the OLS estimation technique and see how well our estimates b 1 and b 2 correspond to the true values  1 and  2. Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Y =  1 +  2 X + u X = 1, 2,..., 20  1 = 2.0  2 = 0.5 u is independent N(0,1) Y = 2.0 + 0.5X + u Generate the values of Y Estimate the values of the parameters A MONTE CARLO EXPERIMENT Choose model in which Y is determined by X, parameter values, and u

14 Here are the values of X, chosen quite arbitrarily. 14 A MONTE CARLO EXPERIMENT X2.0+0.5X u YX 2.0+0.5X u Y 12.5–0.591.91117.51.599.09 23.0–0.242.76128.0–0.927.08 33.5–0.832.67138.5–0.717.79 44.00.034.03149.0–0.258.75 54.5–0.384.12159.51.6911.19 65.0–2.192.811610.00.1510.15 75.51.036.531710.50.0210.52 86.00.246.241811.0–0.1110.89 96.52.539.031911.5–0.9110.59 107.0–0.136.872012.01.4213.42 Y = 2.0 + 0.5X + u

15 Given our choice of numbers for  1 and  2, we can derive the nonstochastic component of Y. 15 A MONTE CARLO EXPERIMENT X2.0+0.5X u YX 2.0+0.5X u Y 12.5–0.591.91117.51.599.09 23.0–0.242.76128.0–0.927.08 33.5–0.832.67138.5–0.717.79 44.00.034.03149.0–0.258.75 54.5–0.384.12159.51.6911.19 65.0–2.192.811610.00.1510.15 75.51.036.531710.50.0210.52 86.00.246.241811.0–0.1110.89 96.52.539.031911.5–0.9110.59 107.0–0.136.872012.01.4213.42 Y = 2.0 + 0.5X + u

16 The nonstochastic component is displayed graphically. 16 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

17 Next, we generate randomly a value of the disturbance term for each observation using a N(0,1) distribution (normal with zero mean and unit variance). 17 A MONTE CARLO EXPERIMENT X2.0+0.5X u YX 2.0+0.5X u Y 12.5–0.591.91117.51.599.09 23.0–0.242.76128.0–0.927.08 33.5–0.832.67138.5–0.717.79 44.00.034.03149.0–0.258.75 54.5–0.384.12159.51.6911.19 65.0–2.192.811610.00.1510.15 75.51.036.531710.50.0210.52 86.00.246.241811.0–0.1110.89 96.52.539.031911.5–0.9110.59 107.0–0.136.872012.01.4213.42 Y = 2.0 + 0.5X + u

18 18 A MONTE CARLO EXPERIMENT X2.0+0.5X u YX 2.0+0.5X u Y 12.5–0.591.91117.51.599.09 23.0–0.242.76128.0–0.927.08 33.5–0.832.67138.5–0.717.79 44.00.034.03149.0–0.258.75 54.5–0.384.12159.51.6911.19 65.0–2.192.811610.00.1510.15 75.51.036.531710.50.0210.52 86.00.246.241811.0–0.1110.89 96.52.539.031911.5–0.9110.59 107.0–0.136.872012.01.4213.42 Thus, for example, the value of Y in the first observation is 1.91, not 2.50. Y = 2.0 + 0.5X + u

19 19 Similarly, we generate values of Y for the other 19 observations. A MONTE CARLO EXPERIMENT X2.0+0.5X u YX 2.0+0.5X u Y 12.5–0.591.91117.51.599.09 23.0–0.242.76128.0–0.927.08 33.5–0.832.67138.5–0.717.79 44.00.034.03149.0–0.258.75 54.5–0.384.12159.51.6911.19 65.0–2.192.811610.00.1510.15 75.51.036.531710.50.0210.52 86.00.246.241811.0–0.1110.89 96.52.539.031911.5–0.9110.59 107.0–0.136.872012.01.4213.42 Y = 2.0 + 0.5X + u

20 The 20 observations are displayed graphically. 20 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

21 We have reached this point in the Monte Carlo experiment. 21 A MONTE CARLO EXPERIMENT Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Y =  1 +  2 X + u X = 1, 2,..., 20  1 = 2.0  2 = 0.5 u is independent N(0,1) Y = 2.0 + 0.5X + u Generate the values of Y A MONTE CARLO EXPERIMENT Choose model in which Y is determined by X, parameter values, and u

22 We will now apply the OLS estimators for b 1 and b 2 to the data for X and Y, and see how well the estimates correspond to the true values. 22 Choose data for X Choose parameter values Choose distribution for u Model Generate the values of Y Estimators Estimate the values of the parameters Y =  1 +  2 X + u X = 1, 2,..., 20  1 = 2.0  2 = 0.5 u is independent N(0,1) Y = 2.0 + 0.5X + u Generate the values of Y Estimate the values of the parameters A MONTE CARLO EXPERIMENT Choose model in which Y is determined by X, parameter values, and u

23 Here is the scatter diagram again. 23 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

24 The regression estimators use only the observed data for X and Y. 24 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

25 Here is the regression equation fitted to the data. 25 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

26 For comparison, the nonstochastic component of the true relationship is also displayed.  2 (true value 0.50) has been overestimated and  1 (true value 2.00) has been underestimated. 26 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

27 We will repeat the process, starting with the same nonstochastic components of Y. 27 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

28 As before, the values of Y are modified by adding randomly-generated values of the disturbance term. 28 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

29 The new values of the disturbance term are drawn from the same N(0,1) distribution as the previous ones but, except by coincidence, will be different from them. 29 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

30 This time the slope coefficient has been underestimated and the intercept overestimated. 30 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

31 We will repeat the process once more. 31 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

32 A new set of random numbers has been used in generating the values of Y. 32 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

33 As last time, the slope coefficient has been underestimated and the intercept overestimated. 33 A MONTE CARLO EXPERIMENT Y = 2.0 + 0.5X + u

34 The table summarizes the results of the three regressions and adds those obtained repeating the process a further seven times. 34 sample b 1 b 2 11.630.54 22.520.48 32.130.45 42.140.50 51.710.56 61.810.51 71.720.56 83.180.41 91.260.58 101.940.52 A MONTE CARLO EXPERIMENT

35 Here is a histogram for the estimates of  2. Nothing much can be seen yet. 35 A MONTE CARLO EXPERIMENT 10 samples

36 Here are the estimates of  2 obtained with 40 further replications of the process. 36 1-10 11-20 21-30 31-40 41-50 0.540.490.540.520.49 0.480.540.460.470.50 0.450.490.450.540.48 0.500.540.500.530.44 0.560.540.410.510.53 0.510.520.530.510.48 0.560.490.530.470.47 0.410.530.470.550.50 0.580.600.510.510.53 0.520.480.470.580.51 A MONTE CARLO EXPERIMENT

37 The histogram is beginning to display a central tendency. 37 A MONTE CARLO EXPERIMENT 50 samples

38 This is the histogram with 100 replications. We can see that the distribution appears to be symmetrical around the true value, implying that the estimator is unbiased. 38 A MONTE CARLO EXPERIMENT 100 samples

39 However, the distribution is still rather jagged. It would be better to repeat the process 1,000,000 times, perhaps more. 39 A MONTE CARLO EXPERIMENT 100 samples

40 The red curve shows the limiting shape of the distribution. It is symmetrical around the true value, indicating that the estimator is unbiased. 40 A MONTE CARLO EXPERIMENT 100 samples

41 The distribution is normal because the random component of the coefficient is a weighted linear combination of the values of the disturbance term in the observations in the sample. We demonstrated this in the previous slideshow. 41 A MONTE CARLO EXPERIMENT 100 samples

42 We are assuming (Assumption A.6) that the disturbance term in each observation has a normal distribution. A linear combination of normally distributed random variables itself has a normal distribution. 42 A MONTE CARLO EXPERIMENT 100 samples

43 Copyright Christopher Dougherty 2012. These slideshows may be downloaded by anyone, anywhere for personal use. Subject to respect for copyright and, where appropriate, attribution, they may be used as a resource for teaching an econometrics course. There is no need to refer to the author. The content of this slideshow comes from Section 2.4 of C. Dougherty, Introduction to Econometrics, fourth edition 2011, Oxford University Press. Additional (free) resources for both students and instructors may be downloaded from the OUP Online Resource Centre http://www.oup.com/uk/orc/bin/9780199567089/http://www.oup.com/uk/orc/bin/9780199567089/. Individuals studying econometrics on their own who feel that they might benefit from participation in a formal course should consider the London School of Economics summer school course EC212 Introduction to Econometrics http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx http://www2.lse.ac.uk/study/summerSchools/summerSchool/Home.aspx or the University of London International Programmes distance learning course EC2020 Elements of Econometrics www.londoninternational.ac.uk/lsewww.londoninternational.ac.uk/lse. 2012.11.02


Download ppt "1 A MONTE CARLO EXPERIMENT In the previous slideshow, we saw that the error term is responsible for the variations of b 2 around its fixed component "

Similar presentations


Ads by Google