Show transcribed image text Â» Problem 4: Let f(x) = e_za_za_z" for r E R, and let Describe in detail a Metropolis-Hastings algorithm for the distribution hav- ing density Kf(x), which uses the proposal distribution N(x, 10), i.e., a normal distribution with mean r and variance 10. That is, vou need to show the following. 1. Write pseudo codes for the algorithm 2. Write R codes to implement the algorithm in (1) 3. Use trace plot to find appropriate burn-in 4. Plot of the stationary distribution. Explain its shape. 5. Compute mean and variance of the sampled distribution

Â» Problem 4: Let f(x) = e_za_za_z" for r E R, and let Describe in detail a Metropolis-Hastings algorithm for the distribution hav- ing density Kf(x), which uses the proposal distribution N(x, 10), i.e., a normal distribution with mean r and variance 10. That is, vou need to show the following. 1. Write pseudo codes for the algorithm 2. Write R codes to implement the algorithm in (1) 3. Use trace plot to find appropriate burn-in 4. Plot of the stationary distribution. Explain its shape. 5. Compute mean and variance of the sampled distribution