Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Jupyter notebook in code python for the following simulation exercise. Consider the linear model yi = alpha + beta xi +

Write a Jupyter notebook in code python for the following simulation exercise. Consider the linear model
yi =\alpha +\beta xi + ei where xi fx(\theta x), ei fe(\theta e) and fx, fe are PDFs of some random
variable. xi and ei are independent. For this question, assume that fx and fe are both
standard normal distribution but we will consider different distributions below. assume that xi and ei are correlated with a correlation
coefficient of \rho xe =0.5.
(a) What are the theoretical properties of the OLS estimators b\alpha and b\beta ? What is their
theoretical distribution given a sample size N?
(b) Draw M i.i.d. random samples of length N for xi and ei. Start with M =5000 and
N =50 but you should experiment with different values.
For each m =1,...,M, compute the OLS estimators b\alpha m and b\beta m and their standard
errors. Compute the means and standard deviations of the distribution of the M
estimators b\alpha m and b\beta m.
(c) Plot the histograms of the M b\alpha m and b\beta m.
(d) Compare the distribution of the simulated b\alpha m and b\beta m to their theoretical distributions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books