2
$\begingroup$

I have a really basic question. But I am a little bit confused about that. How do I calculate the acceptance ratio within a Metropolis-Hasting step?

I have something like $min\left\{1,\frac{p(new)}{p(old)}\times \frac{h(old)}{h(new)}\right\}$.

Is $p(x)$ the DENSITY at point $x$ and $h(x)$ the PROBABILITY at point $x$? Or is it true that $h(x)$ is also the DENSITY at point $x$? That means I have to calculate the DENSITIES only and never the PROBABILITIES?

Sorry for this basic question, but some people/books mesh up this terms and no I'm really confused.

$\endgroup$
1
  • 1
    $\begingroup$ I actually disagree that the content of this question is a duplicate, although the title makes it appear as such. Perhaps this post should have a title that more closely reflects its content. $\endgroup$
    – Silverfish
    Oct 13, 2015 at 17:56

1 Answer 1

1
$\begingroup$

Both $p(\cdot)$ and $h(\cdot)$ are probability densities: $p(\cdot)$ stands for the distribution you want to simulate from (target) but cannot, while $h(\cdot)$ stands for the distribution you can simulate from (proposal) and thus did simulate $new$ from.

In the special case where the distributions are on a finite or countably infinite set, $\mathcal{X}$, both $p(\cdot)$ and $h(\cdot)$ are probability mass functions (which are densities against the counting measure), that is, $p(new)$ is the probability to generate $new$ for the target distribution and $h(new)$ is the probability to generate $new$ for the proposal distribution that is used in the first step of the Metropolis-Hastings algorithm.

$\endgroup$
2
  • 1
    $\begingroup$ Thank you for your quick reply. But I have an additional question. Let's assume that $new\sim N(\mu,\sigma)$ and probability density $p(\cdot)$ is something like $\hat{p}(\cdot)\times N(\mu,\sigma)$. In this special case the distribution I draw from is a part of my target distribution. And $N(\mu,\sigma)$ does not depend on previous samples. Does that mean that for calculation only $min\{1,\frac{\hat{p}(new)}{\hat{p}(old)}\}$ is left? $\endgroup$
    – JohnScott
    Oct 13, 2015 at 20:49
  • 1
    $\begingroup$ Yes, indeed, there is a simplification in that case because the proposal is a component of the target. An example is when the prior is used as proposal. In that case, the Metropolis-Hastings ratio is the likelihood ratio. $\endgroup$
    – Xi'an
    Oct 13, 2015 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.