← Back to AI Math Mind Map
⚡Flashcard Drill➔
📐 AI MathID: rejection-sampling

Rejection Sampling

拒绝采样
🎯Core Definition
Rejection Sampling generates samples that are exactly distributed as the target p(x)p(x) when direct sampling is hard: pick an easy-to-sample proposal q(x)q(x) and a constant MM with p(x)≤Mq(x)p(x) \le M q(x) for all xx (envelope condition). Loop: draw X∼qX \sim q, then U∼Uniform(0,1)U \sim \text{Uniform}(0, 1); accept XX if U≤p(X)/(Mq(X))U \le p(X)/(M q(X)), otherwise retry. Acceptance probability:
📌Overview
P(accept)=∫q(x)⋅p(x)Mq(x) dx=1M,P(\text{accept}) = \int q(x) \cdot \frac{p(x)}{M q(x)} \, dx = \frac{1}{M},
📌Overview
where q(x)q(x) is the density of XX at xx and the factor in parentheses is the conditional acceptance probability at xx; the expected number of trials is exactly MM — tighter envelopes (MM close to 1) are more efficient, and the result is independent of the normalization constant of pp (any constant factor is absorbed into the envelope).
💡Use Cases
targets known only up to a constant (e.g. Bayesian posteriors ∝\propto prior ×\times likelihood) in low dimension; interviews often ask for the acceptance-rate derivation and "why it fails in high dimensions".
⚡Key Problems Solved
exact samples without inverting a CDF or normalizing the target — the simplest general exact sampler; but the acceptance rate 1/M1/M decays exponentially with dimension dd (M∝cdM \propto c^d) because of volume concentration, so nearly all proposals are rejected and one must switch to MCMC or importance sampling.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Rejection Sampling.
Use Cases
In production engineering, what are the primary use cases for Rejection Sampling and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Derive the acceptance probability P(accept)=1/MP(\text{accept}) = 1/M; why is it independent of the normalization constant of pp?
2
Full algorithm of rejection sampling? How does the expected number of trials relate to MM?
3
Why does rejection sampling fail in high dimensions (volume concentration, exponentially growing envelope)?
4
How to choose a good proposal qq and constant MM? What does a loose envelope cost?
5
Can rejection sampling handle unnormalized pp? How is the constant factor absorbed?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Rejection Sampling"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardInverse Transform SamplingNext Card →Importance Sampling

🔗 More AI Math Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/Math/card/rejection-sampling