# Inverse Transform Sampling
Inverse transform sampling to generate random samples from a distribution given its cumulative distribution function (CDF).
> The core idea is to leverage the uniform distribution, which is simple to sample from, to generate samples from more complex distributions.
### How does it work?
1. **Uniform Distribution as a Starting Point**
Begin with samples from a uniform distribution over the interval $[0,1]$. These can be easily generated using standard random number generators.
1. **Cumulative Distribution Function (CDF)**
Identify the CDF of the target distribution from which you want to sample. The CDF, $F(x)$, is a function that maps a value $x$ to the probability that a random variable drawn from the distribution is less than or equal to $x$.
1. **Inverse Transformation**
Apply the inverse of the CDF, $F^{-1}(u)$, to each uniform random sample $u$. The function $F^{-1}$ is known as the quantile function.
1. **Sampling from Desired Distribution**
The result of this transformation, $F^{-1}(u)$, gives a sample that follows the desired distribution.
---
Date: 20231206
Links to:
Tags:
References:
* []()