**Due:** At the start of class on Thursday, March 24. Please turn in a hard copy.

**Textbook Questions** 7.7, 7.17, 7.28 (only parts a and e)

**Extra Question** For this question, we will conduct more Monte Carlo simulations, building on the question from the previous homework. This time we will use Monte Carlo simulations to assess how well our asymptotic inference arguments work.

As in the previous homework, for a particular simulation, do the following for \(i=1,...,n\) (for now, set \(n=100\), but we will try different values of \(n\) later)

- draw \(X\) from an exponential distribution with rate parameter equal 1 (you can use
`rexp`

function for this) - draw \(e\) from a mixture of two normals, with mixture probabilities both equal to 1/2, means equal to -2 and 2, and standard deviations both equal to 1 (you can use
`mixtools::rnormmix`

for this) - Set \(Y=\beta_0 + \beta_1 X + e\) where \(\beta_0=0\) and \(\beta_1=1\) and \(X\) and \(e\) are the draws from the first two steps.

The above steps give you a data set with observations of \(Y\) and \(X\). Construct a t-statistic for \(\mathbb{H}_0 : \beta_1 = 1\). For each Monte Carlo simulation, determine whether or not you reject \(\mathbb{H}_0\) at a 5% significance level.

Given our theoretical results from class, can you tell what fraction of the time should you reject \(\mathbb{H}_0\) in this setup?

Do the above steps 1000 times and calculate the fraction of times that you reject \(\mathbb{H}_0\). Are the results in line with the theory from class? Explain.

Try the same calculations with \(n=10\), \(n=50\), \(n=500\), and \(n=1000\). What do you notice?

Redo parts (a)-(c), but for \(\mathbb{H}_0 : \beta_1=0\).