1
$\begingroup$

Problem. Given \begin{equation} f(x) = \frac{f_1(x) - \epsilon f_2(x)}{1 - \epsilon} \end{equation} where $\epsilon \in (0, 1)$ and $f_1, f_2$ are two pdfs such that $f_1(x) \geq \epsilon f_2(x)$, prove that the following algorithm generates random variables $X \sim f$:

  1. Generate $Y \sim f_1$ and $U \sim Uniform[0, 1]$
  2. If $U \geq \epsilon f_2(Y) / f_1(Y)$ accept $X := Y$; otherwise go to 1.

Proof.

$P(X \leq x) = P(Y \leq x \,|\, U \geq \epsilon f_2(Y) / f_1(Y)) = \frac{P(Y \leq x,\, U \geq \epsilon f_2(Y) / f_1(Y))}{P(U \geq \epsilon f_2(Y) / f_1(Y))}$.

For the denominator, I get (the integrals go from $-\infty$ to $\infty$)

\begin{align} P(U \geq \epsilon f_2(Y) / f_1(Y)) &= \int f_1(y) P(U \geq \epsilon f_2(Y) / f_1(Y) \,|\, Y = y)dy \\ &= \int f_1(y) P(U \geq \epsilon f_2(y) / f_1(y))dy \\ &= \int f_1(y) (1 - \epsilon f_2(y) / f_1(y))dy \\ &= \int (f_1(y) - \epsilon f_2(y))dy \\ &= (1- \epsilon)\int f(y)dy \\ &= (1- \epsilon). \end{align}

Similarly, for the enumerator:

\begin{align} P(Y \leq x,\, U \geq \epsilon f_2(Y) / f_1(Y)) &= \int_{-\infty}^x f_1(y) P(Y \leq x, \, U \geq \epsilon f_2(Y) / f_1(Y) \,|\, Y = y)dy \\ &= \int_{-\infty}^x f_1(y) P(U \geq \epsilon f_2(y) / f_1(y))dy \\ &= (1-\epsilon)\int_{-\infty}^x f(y)dy. \end{align}

Combining both, we get

\begin{align} P(X \leq x) = \int_{-\infty}^x f(y)dy. \end{align}

Trouble.

However, according to an exercise in a textbook about Monte Carlo, the solution should be \begin{equation} P(X \leq x) = \int_{-\infty}^x f(y)dy \sum_{i=0}^\infty \epsilon^i. \end{equation} Where is the mistake in my solution? Thank you.

EDIT

Actually, $\sum_{i=0}^\infty \epsilon^i > 1$, so the textbook's answer must be wrong. But maybe I am missing something?

  • 1
    Your computation is correct, of course: you simulate $f$, as expected. I have no idea what does the textbook mean.2017-02-23

0 Answers 0