Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2009/iii/paper-40/3/a/solution

Let be proportional to the target probability density function, with . Define the ratio-of-uniforms method through the region
Draw uniformly with respect to area on and return . To prove its law, change variables from to . The Jacobian determinant is , and the allowed interval for is . Consequently
The joint density of is therefore on that interval. Integrating out gives
For an already normalized density, and the region has area . The name refers to the two coordinates of a uniformly sampled region; drawing two unrelated uniforms on arbitrary intervals and taking their ratio would not give the target law.

New to topics? Read the docs here!