Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/ii/paper-4/28k/a/solution

Generate and set
For ,
which is the distribution function of an exponential distribution with rate one. This is inverse transform sampling.

New to topics? Read the docs here!