9E1. Which of the following is a requirement of the simple Metropolis algorithm?

  1. The proposal distribution must be symmetric.

9E2. Gibbs sampling is more efficient than the Metropolis algorithm. How does it achieve this extra efficiency? Are there any limitations to the Gibbs sampling strategy?

It is more efficient because you can get a good estimate of the posterior with fewer samples compared to the Metropolis approach. There are several limitations. You do not want to use conjugate priors because these are pathological in shape in multilevel models. When you have more complex models and a large number of parameters, it becomes inefficient because they tend to get stuck in small regions of the posterior for a long time. You get highly correlated parameters, which can lead to a narrow ridge of high probability combinations.

9E4. Explain the difference between the effective number of samples, n_eff as calculated by Stan, and the actual number of samples.

n_eff find the number of ideal or uncorrelated samples. n_eff find the number of samples used for estimating the posterior distribution but the actual number of samples is the actual number of data points available. Thus, n_eff is usally smaller than the actual number of samples.

9E5. Which value should Rhat approach, when a chain is sampling the posterior distribution correctly?

9E6. Sketch a good trace plot for a Markov chain, one that is effectively sampling from the posterior distribution. What is good about its shape? Then sketch a trace plot for a malfunctioning Markov chain. What about its shape indicates malfunction?

9E7. Repeat the problem above, but now for a trace rank plot.