1. To complete this exercise you need a software package that allows you to generate data from the uniform and normal distributions. (i) Start by generating 500 observations on xi —the explanatory...


1. To complete this exercise you need a software package that allows you to generate data from the uniform and normal distributions.


(i) Start by generating 500 observations on
xi—the explanatory variable—from the uniform distribution with range [0,10]. (Most statistical packages have a command for the Uniform(0,1) distribution; just multiply those observations by 10.) What are the sample mean and sample


standard deviation of the
xi?


(ii) Randomly generate 500 errors,
ui, from the Normal(0,36) distribution. (If you generate a


Normal(0,1), as is commonly available, simply multiply the outcomes by six.) Is the sample average of the
ui
exactly zero? Why or why not? What is the sample standard deviation of the
ui?


(iii) Now generate the
yi
as
yi
5 1 1 2xi
1
ui
; b0 1 b1xi
1
ui; that is, the population intercept is one and the population slope is two. Use the data to run the


regression of
yi
on
xi. What are your estimates of the intercept and slope? Are they equal to the


population values in the above equation? Explain.


(iv) Obtain the OLS residuals,
u^
i, and verify that equation (2.60) holds (subject to rounding error).


(v) Compute the same quantities in equation (2.60) but use the errors
ui
in place of the residuals. Now what do you conclude?


(vi) Repeat parts (i), (ii), and (iii) with a new sample of data, starting with generating the
xi. Now what do you obtain for b^ 0 and b^ 1? Why are these different from what you obtained in part (iii)?






May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here