Uniforms consumed by the polar Gaussian method
Question
A normal random number generator uses the polar (Marsaglia) rejection method: draw two uniforms on , reject unless they fall inside the unit disc, then transform. On average, how many uniform draws are used per Gaussian produced?
Short answer
if both Gaussians from each accepted pair are used, or if one is discarded. Each attempt uses uniforms and is accepted with probability equal to the disc's share of the square, , so a pair costs uniforms on average and yields two independent normals.
Adapted from Joshi, Denson & Downes, Quant Job Interview Questions and Answers, Q7.24, p.227; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solutionLessons behind this question
- Root-Finding and Numerical Integration
- Expectation, Mean, and Variance
- Conditional Expectation and Variance Revisited
Start with a free lesson: Expectation, Variance and Covariance is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.
Read it free