A question about importance sample and Metropolis Algorithm

32 Views Asked by At

I am reading this paper by Beichl, I., & Sullivan, F. (2000) on Metropolis algorithm. I understand rejection sample. In the section "The Rejection Sample", I can understand the equation: $$c\frac{\nu(x)}{\mu(x)}\mu(x)=c\nu(x)\quad\quad\text{eq.1}$$ But I cannot understand this equation: $$\frac{1}{M}\sum f(x)c\frac{\nu(x)}{\mu(x)}\quad\quad\text{eq.2}$$ where $M$ is the sample size. Assume that the "weighted mean" mentioned in this section means expectation. Then, if $X\sim\nu(x)$, $E[f(X)]=\sum f(x)\nu(x)=\sum f(x)\frac{\nu(x)}{\mu(x)}\mu(x)$, which seems different from eq.2.

What does eq.2 want to calculate? If $E[f(X)]$, then why is this difference?

Thanks in advance.

1

There are 1 best solutions below

0
On

The idea is to use $1/M$ to approximate $\mu(x)$.

$$E[f(X)]=\sum_x f(x)\frac{\nu(x)}{\mu(x)}\mu(x)=\sum_x f(x)\frac{\nu(x)}{\mu(x)}\sum_{i\mid x^{(i)}=x}c/M=\frac{1}{M}\sum_i f(x^{(i)})c\frac{\nu(x^{(i)})}{\mu(x^{(i)})}$$

This paper explains it well.