If U∼Uniform(0,1) and λ>0, show that Y=−ln⁡(U)/λ is exponential with rate λ. How does this give a way to sample, and what is Y for λ=2, U=0.3?

Probability and statistics, Transformations of variables
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

The CDF method for a monotone transformation of a random variable (inverse-transform sampling).

Key idea

For a decreasing map y=g(u), P(Y>y)=P(U<g−1(y)). Here g−1(y)=e−λy.

Steps

  1. Note U∈(0,1) so −ln⁡U>0 and Y>0.
  2. For y>0: P(Y>y)=P(−ln⁡U>λy)=P(U<e−λy), since −ln⁡ is decreasing.
  3. The CDF of a uniform is P(U<u)=u on [0,1], so P(Y>y)=e−λy. This is the exponential survival function.
  4. Differentiate to confirm the density: fY(y)=λe−λy.
  5. Use as a sampler: draw U from a uniform generator and output −ln⁡(U)/λ. (1−U is also uniform, so −ln⁡(1−U)/λ is the usual inverse CDF.)
  6. Example: λ=2, U=0.3 gives Y=−ln⁡(0.3)/2=1.204/2≈0.602.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Probability and statistics: Event counts are Poisson(λ). You use a Gamma prior with shape α=2 and rate β=1, whose density is ∝λα−1e−βλ. You observe counts 3,5,4. What are the posterior, its mean, the MAP estimate and the MLE?
Next in Probability and statistics: (X1,X2) is bivariate Gaussian with means (1,2) and covariance (4223). Why is X1∣X2=x2 Gaussian, and what are its mean and variance at x2=3?