1

I am watching the video https://www.youtube.com/live/N5nKGtugxYY?si=ejLqW8Pk0jD9lVMn&t=2098
Or particularly this slide: enter image description here

May I ask why does the reject sampling output by $f(x)/g(x)*M$ probability? Why not just $f(x)/g(x)$?
Or, in other words, why that $Pr[x]=f(x)/M$ is desired? Why not just $Pr[x]=f(x)$? TIA

Mahesh S R
  • 1,786
  • 1
  • 5
  • 22
js wang
  • 381
  • 1
  • 10

1 Answers1

3

The reason for using $\frac{f(x)}{Mg(x)}$ rather than $\frac{f(x)}{g(x)}$ is to make the probability less than equal to 1. Observe that it is possible that $f(x) > g(x)$, in which case, it does not make sense to say "Output it with probability $f(x)/g(x)$". In order to avoid this, we need to divide by the largest such fraction, i.e., $\underset{x \in Domain(g)}{max} \frac{f(x)}{g(x)}$.

Now, as a consequence of this, in each try, $x$ will be returned with probability $g(x) \cdot \frac{f(x)}{Mg(x)} = \frac{f(x)}{M}$ which is a scaled version of $f$.

Mahesh S R
  • 1,786
  • 1
  • 5
  • 22