Math 2.0

Numerical analysis Monte Carlo and quasi-Monte Carlo methods Theorem

Inverse transform sampling

Builds on Cumulative distribution functionQuantile functionContinuous uniform distributionRandom variableExponential distribution

Statement

Let F ⁣:ℝ→[0,1]F \colon \R \to [0, 1] be a cumulative distribution function, that is, non-decreasing, right-continuous, with limits 00 at −∞-\infty and 11 at +∞+\infty. Let F−1 ⁣:(0,1)→ℝF^{-1} \colon (0, 1) \to \R be its generalized inverse, the quantile function F−1(u)=inf⁡{x∈ℝ:F(x)≥u}.F^{-1}(u) = \inf \set{x \in \R : F(x) \ge u}. Let UU be a random variable with the uniform distribution on (0,1)(0, 1). Then the random variable X=F−1(U)X = F^{-1}(U) has cumulative distribution function FF.

Remarks

The key fact is that for u∈(0,1)u \in (0, 1) and x∈ℝx \in \R, F−1(u)≤xF^{-1}(u) \le x if and only if u≤F(x)u \le F(x); this uses right-continuity of FF, which makes the infimum attained. Hence P(X≤x)=P(U≤F(x))=F(x)P(X \le x) = P(U \le F(x)) = F(x). Example: the exponential distribution with rate λ>0\lambda > 0 has F(x)=1−e−λxF(x) = 1 - e^{-\lambda x} for x≥0x \ge 0, so F−1(u)=−ln⁡(1−u)/λF^{-1}(u) = -\ln(1 - u)/\lambda; since 1−U1 - U is also uniform, −ln⁡(U)/λ-\ln(U)/\lambda is exponential too. Example: for a discrete distribution with values x1<x2<⋯x_1 < x_2 < \cdots and probabilities p1,p2,…p_1, p_2, \ldots, the method returns xkx_k when p1+⋯+pk−1<U≤p1+⋯+pkp_1 + \cdots + p_{k-1} < U \le p_1 + \cdots + p_k. The generalized inverse is needed: when FF has jumps or flat parts, the ordinary inverse does not exist. A converse holds when FF is continuous: then F(X)F(X) is uniform on (0,1)(0, 1), the probability integral transform.

Going deeper

For a student

The method is exact and uses one uniform number per sample, so it is the first choice whenever F−1F^{-1} has a closed form or a fast accurate approximation. For the normal distribution there is no closed form, and one uses numerical approximations of F−1F^{-1} or other methods such as the Box–Muller transform or the ziggurat algorithm. Being monotone in UU, it preserves the order of the uniform inputs, which is useful for antithetic variates, for quasi-Monte Carlo and for coupling arguments. It also explains copulas: any multivariate distribution is obtained from its copula by applying the marginal quantile functions coordinatewise.

Reading path

To understand this page from the ground up, read these 6 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Continuous uniform distribution concept
  2. Cumulative distribution function concept
  3. Exponential distribution concept
  4. Quantile function concept
  5. Random variable concept
  6. Inverse transform sampling statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Inverse_transform_sampling
About this page
Tag2KX7W1TG7T
URIm2://2KX7W1TG7T
Kindstatement, theorem
WritingW0 stub
MSC65C10, 60E05
StatusThis copy of the site has no build data. Run m2 status 2KX7W1TG7T.
AboutQuantile function
UsesCumulative distribution function, Quantile function, Continuous uniform distribution, Random variable, Exponential distribution
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.