[Math] How to do integration using MCMC

integrationmarkov chains

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$?

Best Answer

There are no significant changes when you switch from MC to MCMC. The major concept remains the same. You draw your samples according to some probability distribution (which ideally has a form of your integrand, or as close as possible to it). Then instead of drawing i.i.d. samples, you just put a Metropolis move on top of your existing MC integration routine.

The only conceptual difference is that you have a Markov chain. That means that you have the current sample (state) and each time you generate a new sample from the current one. You should compute the acceptance probability carefully though.

Related Question