Simulate two Normally distributed random variables X1 and X2 with correlation 0.8, both should have a mean value of 70 and a standard deviation of 8. equation 5.3.2 for formulas that will help you see how to do the simulation. There are other ways to do this as well. Think of X2 as a score on the second test in a class, and X1 as the score on the first exam. a. Analytically find the expected value and variance of `Change = X2 - X1`. b. Use a simulation with n=1000 to find the mean and variance of `Change` using simulation. c. Plot your simulated data on a scatterplot. d. Also plot X1 vs. Change. e. How might regression to the mean cause issues in assessing whether or not a student improved or did worse on the second test compared to the first?
Simulate two Normally distributed random variables X1 and X2 with correlation 0.8, both should have a mean value of 70 and a standard deviation of 8. equation 5.3.2 for formulas that will help you see how to do the simulation. There are other ways to do this as well. Think of X2 as a score on the second test in a class, and X1 as the score on the first exam.
a. Analytically find the expected value and variance of `Change = X2 - X1`.
b. Use a simulation with n=1000 to find the mean and variance of `Change` using simulation.
c. Plot your simulated data on a scatterplot.
d. Also plot X1 vs. Change.
e. How might regression to the mean cause issues in assessing whether or not a student improved or did worse on the second test compared to the first?
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images