Question: Need code for #4 to put into coding software called python. 3. ( 30 points) Simulate n=1,000 observations of the following process: yi=2+3xi+i, where xiN(0,4)

Need code for #4 to put into coding software called python. Need code for #4 to put into coding software called python. 3.

3. ( 30 points) Simulate n=1,000 observations of the following process: yi=2+3xi+i, where xiN(0,4) and iN(0,1), with xii. Set the seed to 1234. Now, using the same simulated data for xi and yi, determine b0,b1,sv, s.e e(b0), s.e e(b1) and R2 in the following Simple Linear Regression - SLR: yi=0+1xi+vi. where viN(0,v2). 4. ( 30 points) Run exactly the same simulation as in the previous question, but now assume that corr(xb,i)=0.95 (Hint: you can simulate xiN(0,4) first and then generate i= 21(0.95xi+10.952zi), where ziN(0,2) and xizi). Now, using the same simulated data for xi and yi, estimate the SLR: yt=0+1xi+vu where viN(0,v2) With these results, perform the following t-test: H0:1=3H1:1=3 At the 95% confidence level (i.e., =0.05 ), can you reject the null hypothesis? If you rejected the null, what is the most likely reason

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!