Monte Carlo Sampling Crash Course: Rejection Sampling and Change of Coordinates

2025-04-14

This article introduces two crucial sampling techniques in Monte Carlo methods: rejection sampling and change of coordinates. Rejection sampling samples a simpler region and filters samples based on an acceptance probability to achieve sampling of a complex region. The article provides a detailed derivation of the probability density function for rejection sampling and extends it to non-uniform distributions. Change of coordinates utilizes the Jacobian determinant to map samples from a simple region to a complex region, enabling efficient sampling. The article uses the unit disk as an example, demonstrating how to achieve uniform sampling using polar coordinate transformation. Both methods have their advantages and disadvantages; rejection sampling is simple and easy to understand but its efficiency depends on the acceptance probability; change of coordinates is efficient but requires finding suitable coordinate transformations.