Answered step by step
Verified Expert Solution
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 fxtheta x ei fetheta 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
a What are the theoretical properties of the OLS estimators balpha and bbeta What is their
theoretical distribution given a sample size N
b Draw M iid random samples of length N for xi and ei Start with M and
N but you should experiment with different values.
For each m M compute the OLS estimators balpha m and bbeta m and their standard
errors. Compute the means and standard deviations of the distribution of the M
estimators balpha m and bbeta m
c Plot the histograms of the M balpha m and bbeta m
d Compare the distribution of the simulated balpha m and bbeta m to their theoretical distributions.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started