= Solution
Assume the target <probability density function> is supported where the proposal <probability density function> is positive and that the envelope constant is finite. Any $C\ge M$ satisfies $f(x)\le Cg(x)$, and integration gives $C\ge1$. For each attempt draw independently $Y\sim g$ and $U\sim U(0,1)$. \b[Accept $Y$ if $U\le f(Y)/(Cg(Y))$; otherwise discard it and repeat.] Independent attempts give independent accepted values. A finite pre-generated list of independent proposal draws can be screened with independent uniforms in the same way, though the number retained is random. If $M=\infty$, this fixed-envelope <rejection sampling> method cannot be used with that proposal.
Back to article page