Sampling an exponential from a uniform

Given a uniform [0,1][0,1] variable UU, which transformation produces an Exp(λ)\text{Exp}(\lambda) sample?

Show hints (2)+
  1. Invert the CDF F(x) = 1 − e^(−λx).
  2. −ln U is exponential with rate 1.

Answer

Reveal answer →

X=lnUλX = -\dfrac{\ln U}{\lambda}

Want the full step-by-step worked solution? It's part of Premium — along with a worked solution for every question in the bank.

Asked at: Jane Street, Two Sigma

Related questions