Solution
ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2005/iii/paper-47/3/b/i/solution
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 47 3 b i Solution by
Codex 0 Created 2026-10-03 Updated 2026-10-14
Use the ratio-of-uniforms method onWriting gives and . Consequentlybecause the derivative vanishes at . Thus the normal ratio-of-uniforms envelope is the rectangle , .
Generate independent with uniform distribution on , set and , and accept precisely whenReject and repeat otherwise. On acceptance return . One can compare logarithms instead of exponentials to avoid underflow.
For a proof, the change of variables has Jacobian determinant . A uniform point in therefore gives an -density proportional toNormalizing yields the required normal distribution with mean zero and variance . The region area is ; dividing it by the rectangle area gives acceptance probability .
New to topics? Read the docs here!