# General questions on MCMC

This is a continuation of the following question. The previous link was related to rejection sampling. This is related to MCMC.

General questions on rejection sampling

1a. As far as I understand, the rejection sampling will not overestimate the density as long as $c\cdot q(x) > p(x)$. This is inherent in the acceptance ratio. But as far as I understand, the Metropolis–Hastings algorithm may underestimate or overestimate the density as $q(x|x')$ is not always $> p(x)$. Am I correct? If so how to avoid this?

1b. If $q(x|x')$ is not always $> p(x)$, how exactly does M-H also estimate the target density correctly?

1. How do I choose a good proposal in case of Metropolis–Hastings? I usually use Gaussian with std=1 and mean centered at the previous sample. It works well in most cases. I just play around with the std. Is this a good proposal?

2. Rejection sampling gives exact density where as MH gives approximate density. Am I correct?

3. Is independent Metropolis–Hastings the same as rejection sampling, since the proposal is independent of the previous sample? If so, do we always have to take care to choose proposal > target in case of independent MH?

4. This is a general sampling question. In most of the materials that I have read, I come across the statement that sampling is usually necessary to sample from posterior density? Why do they stress the word posterior. Why not prior or likelihood. Is there a specific reason. Can you give some examples?

• "Metorpolis hastings algorithm may underestimate or overestimate the density ... Am i correct?" -- no. Metropolis-Hastings isn't the same as accept-reject. The differences are important. If you read the convergence proofs, it's clear that its stationary distribution is the required distribution. – Glen_b Nov 24 '14 at 11:27

I recommend you two great books on MCMC by Robert and Casella, one with examples in R and the second, very detailed, handbook. Hope they will make things more clear.

1a. in M-H you use the formula:

$$A(x\rightarrow x') = \min\left(1,\frac{p(x')}{p(x)}\frac{q(x'\rightarrow x)}{q(x\rightarrow x')}\right)$$

so the fact that $q(x|x')$ is not always $> p(x)$ is not a problem.

1b. see the formula above.

1. Check the books I recommended on this. Generally, your proposal should fit the data you want to simulate. If you use Normal distribution with std being too small, or too big the algorithm would not be efficient, however Normal distribution is not the only choice.

2. No. See comment by Glen_b.

3. No, it's not, because in independent M-H your proposal is independent, but your acceptance probability is dependent on previous draw.

4. What you want to use MCMC for is to draw samples from posterior distribution, not "usually" but always in Bayesian framework. In Bayesian framework if want to estimate some unknown parameter $\theta$ you take some data $D$, some prior distribution of your choice for the parameter of interest, and then apply the Bayes theorem:

$$p(\theta|D)=\frac{p(D|\theta)p(\theta)}{p(D)}$$

so you use distribution of your data given your prior $p(D|\theta)$, distribution of your prior $p(\theta)$ and likelihood $p(D)$ and get a posterior $p(\theta|D)$. So "posterior" is your "estimate".