1. Acceptance/rejection methods. 1.a. Give an algorithm to generate a normal random deviate using the acceptance/rejection method with the double exponential density as the majorizing density. After you have obtained the acceptance/rejection test, try to simplify it. 1.b. Write a program to generate bivariate normal deviates with mean $(0,0)$, variance $(1,1)$, and correlation $\rho$. Use a bivariate product double exponential density as the majoring density. Now set $\rho=0.5$ and generate a sample of 1,000 bivariate normals. Compare the sample statistics with the parameters of the simulated distribution. 1.c What would be the problem with using a normal density to make a majorizing function for the double exponential distribution (or using a half-normal for an exponential)? 1.d. Let $T$ be the number of passes through the three steps until the desired variate is delivered. Determine the mean and variance of $T$ (in terms of $p_X$ and $g_Y$). 1.e. Now consider a modification of the rejection method in which steps 1 and 2 are reversed, and the branch in step 3 is back to the new step 2, that is: (1) Generate $u$ from a uniform (0,1) distribution. (2) Generate $y$ from the distribution with density function $g_Y$. (3) If $u \leq p_X(y)/cg_Y(y)$, then take $y$ as the desired realization; otherwise return to step (2). Is this a better method? Let $Q$ be the number of passes through these three steps until the desired variate is delivered. Determine the mean and variance of $Q$. 2. Use the Metropolis-Hastings algorithm to generate a sample of standard normal random variables. Use as the candidate generating density, $g(x|y)$, a normal density in $x$ with mean $y$. Experiment with different burn-in periods and different starting values. Plot the sequences generated. 3. Consider the trivariate normal distribution used as the example in class. 3.a. Use the Gibbs method to generate and plot 1,000 realizations of $X_1$ (including any burn-in). Explain any choices you make in how to proceed with the method. 3.b. Use the hit-and-run method to generate and plot 1,000 realizations of $X_1$ (including any burn-in). Explain any choices you make in how to proceed with the method.