Fix a proposal with , and abbreviate , and . The envelope says . Assuming fresh independent uniform distribution draws at both stages, the law of total probability givesThe second term includes both reaching the residual test and passing it. If , the envelope forces and the first test accepts with probability one; the second-stage ratio is never evaluated. This is squeeze rejection sampling.
The proposal's normalization of a probability distribution isThis is the Laplace distribution with location zero and scale one. For example, generate its magnitude from the exponential distribution with rate one and give it an independent fair sign. The target is the standard normal distribution, with .
To obtain the tight envelope, let . By completing the square,Equality occurs at , so is the smallest valid envelope constant. It maximizes the acceptance probability for this fixed proposal. The supplied lower bound must be clipped at zero to satisfy the algorithm's nonnegativity requirement:This is valid because for , while is everywhere positive. Its support is .
Here is the fully specified squeeze rejection sampling procedure. Draw with probability density function , independently draw , and compute and . If , return immediately. Otherwise evaluate , independently draw , and return if . On rejection restart with fresh draws. In this example everywhere, so the residual denominator is positive.
Avoiding a target evaluation means accepting at the first test. Its unconditional probability for one proposal isFor comparison, the overall acceptance probability is . The first-stage saving is the fraction of proposals requiring no target evaluation, including both eventual accepted and rejected proposals in the denominator; it is not conditional on acceptance.