Jaaaack
Jaaaack
25.02.2020 • 
Mathematics

This problem is for you to see what two-dimensional plots of data will look like when the data are sampled from a variety of distributions. For this problem you will need a computer program that allows you to generate random numbers from given distributions. In each of the cases below, set the number of observations n = 300, and draw the indicated graphs. Few programs have easy-to-use functions to generate bivariate random numbers, so in this problem you will generate first the predictor X. then the response Y given X.

Generate X and e to be independent standard normal random vectors of length n. Compute Y = 2 + 3X + sigma e, where in this problem we take sigma = 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.

Solved
Show answers

Ask an AI advisor a question