Draws from an exponential law
Explain how to generate a draw from the exponential distribution with rate 10, starting from a uniform draw on [0,1].
Worked answer (click to show)
Draw U\sim\operatorname{U}[0,1] and return X=-\log(U)/10. This is the inverse-transform method: the distribution function 1-e^{-10x} inverts to -\log(1-u)/10, and 1-U has the same distribution as U.