Solution

ID: past-exam-of-the-simulation-and-statistical-programming-course-of-the-university-of-oxford/2021/2/a/i/solution

For the exponential distribution with rate , the cumulative distribution function is for , and zero for . Its quantile function is
For inverse transform sampling, draw from the uniform distribution on and return . Equivalently return , since has the same uniform distribution. Indeed, for , .

New to topics? Read the docs here!