Generate X and e to be independent standard normal random vectors of length n. Compute Y = 2 + 3X + σe, where in this problem we take σ = 1. Draw the scatterplot of Y versus X, add the true regression line Y = 2 + 3X, and the ols regression line. Verify that the scatter of points is approximately elliptical, and the regression line is similar to, but not exactly the same as, the major axis of the ellipse.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here