Read this lesson as text

Inverse Transform Method

Probability · Axiom Academy

LESSON Inverse Transform Method Generate samples from any distribution using uniform random variables and the inverse CDF If U ~ Uniform(0,1) and F is a CDF with generalized inverse F⁻¹(u) = inf x : F(x) ≥ u , then X = F⁻¹(U) has CDF F. This works because: The probability that X ≤ x equals the probability that U ≤ F(x), which is exactly F(x) by the uniform distribution. To generate a sample from distribution with CDF F: (1) Generate U ~ Uniform(0,1), (2) Compute X = F⁻¹(U). For exponential distribution with rate λ: For continuous distributions with closed-form F⁻¹, this method is exact and efficient. For discrete distributions, F⁻¹ is a step function. 3. Discrete Distributions and Limitations For discrete distributions, the inverse CDF is a step function. Partition [0,1] into intervals [F(x_ k-1 ), F(x_k)) and map each to value x_k: Limitations: (1) Requires computable F⁻¹, (2) Can be slow for complex distributions, (3) Alternative methods (rejection sampling, MCMC) needed when F⁻¹ is intractable.

This is the written version of the interactive lesson above. See the full Probability course.