Skip to content

Uniforms consumed by the polar Gaussian method

Question

A normal random number generator uses the polar (Marsaglia) rejection method: draw two uniforms on (−1,1)(-1,1), reject unless they fall inside the unit disc, then transform. On average, how many uniform draws are used per Gaussian produced?

Short answer

4/π≈1.274/\pi\approx1.27 if both Gaussians from each accepted pair are used, or 8/π≈2.558/\pi\approx2.55 if one is discarded. Each attempt uses 22 uniforms and is accepted with probability equal to the disc's share of the square, π/4\pi/4, so a pair costs 8/π8/\pi 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 solution

Lessons behind this question

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