# How to do integration using MCMC?

I want to evaluate $I = \int_V f(\vec{x}) d\vec{x}$. The classical Monte Carlo method is to sample uniformly from within the integration volume $V$, and then compute $I \approx V \frac{1}{N} \sum_{i=1}^{N} f(\vec{x})$.

What if I sampled the $\vec{x}$'s using a MCMC approach (e.g. Metropolis-Hastings, slice sampling), how do I compute $I$? Specifically, if we use the above formular, what is $V$?

• docs.google.com/… – Steve Huntsman Oct 12 '10 at 5:23
• More generally, a search on mcmc + integration yields plenty of PDFs. – Steve Huntsman Oct 12 '10 at 5:23
• I've searched it before asking and I found the document you sent. According to that doc, I have to factorize $f(x)$ into $h(X)$ and $p(x)$ where $p$ a proper pdf. Am I right? What if I cannot do this factorization? Is the regular Monte Carlo only choice? – eakbas Oct 12 '10 at 17:04
• I knew that sooner or later I'd see pdf used with two different meanings in close proximity. – Gerry Myerson Oct 13 '10 at 5:16
• Am I missing a trivial point here? I still do not know the answer to my question :) The documents I found on the web --as I understand them-- does not answer my question. – eakbas Oct 27 '10 at 2:46