Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a quick question regarding implementation of Metropolis-Hastings for a particular problem I'm dealing with.

Suppose that I have a probability density function $P(X)$ for a continuous random variable $X$. In Metropolis-Hastings, I am required to compute acceptance probability $\frac{ Pr(x') Q(x_{t}|x') } {Pr(x_{t} Q(x' | x)}$. However, the probability of any single event in a continuous space is zero. Do I just replace $Pr$ with $P$ and go on my merry way?

My primary concern is that the $P(x)$ is not necessarily less than or equal to 1.

share|cite|improve this question
up vote 2 down vote accepted

This is usually the way to convert from discrete probabilities to continuous probabilities. You can think of this as promoting $x$ to an $\epsilon$-neighborhood of itself, whose probability is roughly $\epsilon P(x)$.

share|cite|improve this answer
Can you provide a reference for this equivalence? – duckworthd May 17 '11 at 5:04
You can try looking in Machine Learning books. – Yuval Filmus May 17 '11 at 14:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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