Skip to main content

Sampling MCMC

Squeezed Rejection Sampling

An optimization of rejection sampling that adds a cheap lower bound (squeeze function) to avoid expensive target density evaluations when the sample clearly falls in the accept or reject region.

CoreTier 3StableSupporting~30 min

Prerequisites

Learning position

Place this page in a reading path.

sampling-mcmc | layer 2 | tier 3. This page has 1 direct prerequisite and 2 published dependents.

What next

Adaptive Rejection Sampling

This is the first curated or graph-derived continuation from the current page.

Evidence badge

Claim status

This page has no public Lean mapping yet. Use the evidence page to inspect how claim status labels work.

Show the backing system

Why This Matters

Standard rejection sampling requires evaluating the target density f(x)f(x) for every proposed sample. When ff is expensive to compute (think multivariate posteriors, normalizing constants involving special functions, or densities defined through numerical integration), each evaluation dominates the runtime.

Squeezed rejection sampling reduces the number of expensive evaluations by adding a cheap lower bound. If the proposal clearly falls in the accept region or clearly falls in the reject region, you skip the expensive evaluation entirely.

Mental Model

In standard rejection sampling, you have an envelope Mg(x)≥f(x)Mg(x) \geq f(x) and you accept a proposal xx with probability f(x)/(Mg(x))f(x) / (Mg(x)). You always need to evaluate f(x)f(x).

Now add a squeeze function s(x)s(x) satisfying s(x)≤f(x)s(x) \leq f(x) for all xx. Draw x∼gx \sim g and u∼Uniform(0,Mg(x))u \sim \text{Uniform}(0, Mg(x)). If u≤s(x)u \leq s(x), accept without evaluating ff. If u>Mg(x)u > Mg(x), reject without evaluating ff (this never happens by construction). If s(x)<u≤Mg(x)s(x) < u \leq Mg(x), then and only then evaluate f(x)f(x) and accept if u≤f(x)u \leq f(x).

The squeeze handles the easy cases. You only pay for ff when the sample lands in the uncertain strip between s(x)s(x) and Mg(x)Mg(x).

Formal Setup

Definition

Squeeze Function

Given a target density f(x)f(x) and an envelope Mg(x)≥f(x)Mg(x) \geq f(x), a squeeze function is any function s:X→[0,∞)s: \mathcal{X} \to [0, \infty) such that:

0≤s(x)≤f(x)≤Mg(x)for all x∈X0 \leq s(x) \leq f(x) \leq Mg(x) \quad \text{for all } x \in \mathcal{X}

The squeeze must be cheap to evaluate relative to ff.

Definition

Squeezed Rejection Sampling Algorithm

  1. Draw x∼g(x)x \sim g(x) from the proposal distribution.
  2. Draw u∼Uniform(0,1)u \sim \text{Uniform}(0, 1).
  3. If u≤s(x)/(Mg(x))u \leq s(x) / (Mg(x)), accept xx (no evaluation of ff).
  4. Else if u≤f(x)/(Mg(x))u \leq f(x) / (Mg(x)), accept xx (evaluate ff).
  5. Else reject xx (evaluate ff).
  6. Return to step 1.

Main Theorems

Theorem

Correctness of Squeezed Rejection Sampling

Statement

Squeezed rejection sampling produces independent samples distributed exactly according to the target density proportional to f(x)f(x). The acceptance probability is identical to standard rejection sampling: 1/M1/M.

Intuition

The squeeze only determines when you evaluate ff. It never changes the accept/reject decision. When you do evaluate ff, the decision is identical to standard rejection sampling. So the output distribution is unchanged.

Proof Sketch

Partition the probability space into three events for a proposal (x,u)(x, u) where u∼Uniform(0,Mg(x))u \sim \text{Uniform}(0, Mg(x)):

Event A: u≤s(x)u \leq s(x). Accept. Since s(x)≤f(x)s(x) \leq f(x), we have u≤f(x)u \leq f(x), so standard rejection sampling would also accept.

Event B: s(x)<u≤f(x)s(x) < u \leq f(x). Accept after evaluating ff. Same decision as standard.

Event C: u>f(x)u > f(x). Reject after evaluating ff. Same decision as standard.

In all three events, the accept/reject decision matches standard rejection sampling. The squeeze only changes which event triggers the evaluation.

Why It Matters

The fraction of proposals requiring ff-evaluation is:

P(s(x)<u≤Mg(x))=1−∫s(x) dx∫Mg(x) dxP(s(x) < u \leq Mg(x)) = 1 - \frac{\int s(x) \, dx}{\int Mg(x) \, dx}

A tight squeeze (close to ff) means most proposals are resolved cheaply.

Failure Mode

If the squeeze is loose (s(x)≈0s(x) \approx 0), nearly every proposal falls in the uncertain strip and you evaluate ff anyway. The overhead of computing s(x)s(x) then makes squeezed rejection sampling slower than standard rejection sampling. The squeeze must be both cheap and tight.

Canonical Examples

Example

Squeeze for the normal distribution

Suppose f(x)∝e−x2/2f(x) \propto e^{-x^2/2} and the proposal is a double exponential (Laplace) distribution. A common squeeze for the standard normal is the piecewise linear function that interpolates ff at a grid of points, staying below ff everywhere. For example, between grid points xix_i and xi+1x_{i+1}, the squeeze is the linear function connecting (xi,f(xi))(x_i, f(x_i)) and (xi+1,f(xi+1))(x_{i+1}, f(x_{i+1})). Since ff is log-concave, the linear interpolant stays below ff. With 10-20 grid points, this squeeze resolves over 95% of proposals without evaluating exp⁡(−x2/2)\exp(-x^2/2).

Common Confusions

Watch Out

The squeeze does not change the acceptance rate

Adding a squeeze does not accept more proposals. The overall acceptance probability remains 1/M1/M. The squeeze only reduces the number of proposals that require evaluating ff. It trades ff-evaluations for cheaper ss-evaluations.

Watch Out

The squeeze need not be a density

The squeeze s(x)s(x) is not required to integrate to 1 or even to be a proper density. It is just a lower bound on f(x)f(x). Any non-negative function that stays below ff works.

Summary

  • Add a cheap lower bound s(x)≤f(x)s(x) \leq f(x) to skip expensive evaluations
  • Correctness is immediate: the squeeze never changes the accept/reject decision, only when ff is evaluated
  • Savings depend on the tightness of the squeeze: ∫s(x) dx/∫Mg(x) dx\int s(x) \, dx / \int Mg(x) \, dx
  • If ff is cheap to evaluate, the overhead of computing ss is not worth it
  • Log-concave densities admit natural piecewise linear squeezes

Exercises

ExerciseCore

Problem

Suppose the squeeze resolves 90% of proposals without evaluating ff, and evaluating ff takes 100 times longer than evaluating ss. What is the approximate speedup of squeezed rejection sampling over standard rejection sampling?

ExerciseAdvanced

Problem

For a log-concave density ff, explain why a piecewise linear interpolant through points (xi,f(xi))(x_i, f(x_i)) lies below ff between grid points. State the precise condition on ff that makes this work.

References

Canonical:

  • Devroye, Non-Uniform Random Variate Generation (1986), Chapter 7
  • von Neumann, "Various Techniques Used in Connection with Random Digits" (1951), original rejection sampling paper

Current:

  • Robert & Casella, Monte Carlo Statistical Methods (2004), Chapter 2.3

  • Gelman et al., Bayesian Data Analysis (2013), Chapters 10-12

  • Brooks et al., Handbook of MCMC (2011), Chapters 1-5

Next Topics

Last reviewed: April 14, 2026

Cite this page

Sneiderman, Robby. "Squeezed Rejection Sampling." TheoremPath, reviewed 2026-04-14. https://theorempath.com/topics/squeezed-rejection-sampling

Canonical URL
https://theorempath.com/topics/squeezed-rejection-sampling
Author
Robby Sneiderman, TheoremPath
Last reviewed
2026-04-14
What this is
A reference page on TheoremPath. Written and maintained by the named author. Not peer reviewed and not refereed by any venue. Each claim below carries its own verification status.
Terms
All rights reserved. Non-commercial quotation with attribution permitted.

Citing one claim

One statement on this page is separately addressable. Each carries an identifier of the form claim:<topic>::<statement> printed beside it, and resolves to that identifier's anchor on this URL. Quote the statement, its assumptions, and its failure modes together.

Recorded verification on this page: 1 informal_only.

  • This page is a secondary source. Where a claim cites literature, the result is due to that source and not to this site.
  • 1 of 1 claims on this page name no source. Their attribution to the literature is not recorded here, whatever their verification status says.
  • 1 of 1 carry neither a source nor a proof check. Their provenance is the author's reading of the literature; check them against a primary source before relying on them.
  • Statements are given in LaTeX exactly as authored. The rendered page passes the same LaTeX through KaTeX, so text scraped from the HTML repeats expressions and drops radicals; quote from statementTex.

/claims.json lists 1,178 of the 1,231 statements this site records, with the anchor and the recorded verification of each. What earns a place in it: a theorem, lemma, corollary, or proposition block on a published topic page. Definitions are not listed, and neither are the 27 statements on comparison pages. A missing entry means the rule above did not select the statement, not that this site is silent on the result.

Canonical graph

Required before and derived from this topic

These links come from prerequisite edges in the curriculum graph. Editorial suggestions are shown here only when the target page also cites this page as a prerequisite.

Required prerequisites

1

Derived topics

2