The Probability Integral Transform
Why plugging any random variable into its own CDF always produces a plain uniform(0,1) variable — the fact that lets you simulate any distribution from a random number generator and lets you test whether a model's predictions are calibrated.
Prerequisites: Transformations of Random Variables
Suppose you need to simulate ten thousand draws from a complicated, non-standard distribution — realistic return shocks, say — but your computer's random number generator only produces uniform numbers between 0 and 1. There is a strikingly clean fact that solves this: run any random variable through its own cumulative distribution function, and no matter what the original distribution looked like — skewed, fat-tailed, bimodal — the output is always a plain uniform(0,1) variable. That fact, and its reverse, is the probability integral transform.
The analogy: a distribution's CDF as a percentile machine
The cumulative distribution function answers "what fraction of outcomes fall at or below ?" — in other words, is the percentile that sits at. If you take a random draw and ask "what percentile did it land at," the answer, , is itself random — but here's the trick: since was drawn from the true distribution, its percentile is exactly as likely to land at the 10th percentile as the 90th as the 50th, by construction. A random draw's own percentile rank is uniformly distributed on (0,1), for any underlying distribution. That's the whole idea; the rest is notation.
Writing it down
Let be a continuous random variable with CDF . The probability integral transform states
In words: feeding a random variable into its own CDF always yields a uniform(0,1) result, regardless of what looks like. Proof sketch, in plain terms: for any , — the CDF of is literally itself, which is precisely the definition of uniform(0,1).
The reverse direction is what makes simulation possible:
In words: draw an ordinary uniform random number , then look up which -value has that percentile under your target distribution — , the inverse CDF, also called the quantile function — and that has exactly the target distribution. This is the standard "inverse transform sampling" method every random-number library uses under the hood.
Worked example 1: simulating an exponential distribution by hand
The exponential distribution with rate has CDF . Invert it: set , solve for : , so , giving . Draw a uniform number, say (from a random number generator). Plug in: . That single number, 0.602, is a valid draw from the exponential(2) distribution — check it: , matching the you started with, exactly as the transform guarantees.
Worked example 2: testing whether a forecast model is calibrated
A volatility model outputs a predicted CDF for tomorrow's return every day. If the model is correctly calibrated, then each day's realised outcome, run through that day's predicted CDF, , should look like an ordinary uniform(0,1) sample across many days — that's exactly the probability integral transform applied to a good model. Suppose across 100 days the realised values cluster: 40 of them fall between 0.45 and 0.55, far more than the 10 you'd expect from a uniform distribution. That clustering is direct evidence the model's forecasts are systematically too wide (outcomes keep landing near the predicted median more often than the model's own spread implies) — a diagnostic called a "PIT histogram," used constantly to grade probabilistic forecasts.
What this means in practice
Every Monte Carlo simulation that needs draws from a non-uniform distribution — normal, exponential, a fitted empirical distribution — relies on inverse transform sampling, the reverse direction of this theorem. In the forward direction, it is the standard tool for checking whether a risk model's predicted distributions are calibrated against realised outcomes, exactly as in worked example 2.
Running any random variable through its own CDF always produces a uniform(0,1) variable: . Running the reverse — plugging a uniform draw into the inverse CDF, — produces a draw from the target distribution. One fact, used in both directions: simulation forward, calibration testing backward.
The theorem requires to be a genuine, strictly increasing continuous CDF. For discrete distributions (a Poisson count, a credit rating), is not exactly uniform — it clumps at the jump points of , because many different outcomes can map to the same CDF value's "landing zone." Applying inverse transform sampling to a discrete distribution still works for simulation (with a small modification), but naively expecting itself to look uniform for calibration-checking a discrete or count-based model will produce a misleading, lumpy histogram even when the model is correct.
Practice in interviews
Further reading
- Casella & Berger, Statistical Inference (ch. 2.1)
- Rosenblatt, Remarks on a Multivariate Transformation (1952)