methodology

Rejection Sampling

Rejection sampling is a Monte Carlo method used in statistics and machine learning to generate random samples from a target probability distribution when direct sampling is difficult. It works by proposing samples from a simpler distribution and accepting or rejecting them based on a comparison with the target distribution. This technique is particularly useful for sampling from complex, high-dimensional, or unnormalized distributions.

Also known as: Accept-Reject Sampling, Acceptance-Rejection Method, Rejection Method, Rejection Algorithm, AR Sampling
🧊Why learn Rejection Sampling?

Developers should learn rejection sampling when they need to simulate data from distributions that lack closed-form inverse cumulative distribution functions, such as in Bayesian inference, probabilistic programming, or generative modeling. It's essential for tasks like Markov Chain Monte Carlo (MCMC) initialization, rare event simulation, and when working with non-standard distributions in fields like finance or physics. However, it can be inefficient for high-dimensional spaces or when the proposal distribution poorly matches the target.

Compare Rejection Sampling

Learning Resources

Related Tools

Alternatives to Rejection Sampling