Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SHOW CODE FOR FULL POINTS 2. Let be Beta 0 = 3. Beta 1 = -2 and sigma = 1.25. Se

ID: 3439159 • Letter: S

Question

SHOW CODE FOR FULL POINTS

2. Let be Beta 0 = 3. Beta 1 = -2 and sigma = 1.25. Set the seed for random number generation in B: before your code, type set. seed(123). (a) Create in B the observations for the predictor X: generate loo observation from a normal distribution with Mu =0 and sigma ^2 = 1. (b) Generate the response values, Yi, using the SLB model Yi, = Beta 0 + Beta 1 Xi +E i. (c) Create a scatterplot of Y vs X and compute the correlation coefficient of Y and X. Comment on your results.

Explanation / Answer

R-Code: