SHOW CODE FOR FULL POINTS 2 Let be Beta 0 3 Beta 1 2 and s
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.Solution
R-Code:
