Cumulative Distribution Functions
Suppose you know a light bulb's lifetime is random. You want to answer a single practical question. What is the chance it survives at least 500 hours? To answer this, and infinitely many questions like it, you do not need to reconstruct the entire probabilistic mechanism from scratch each time. You need one function that packages every such answer at once. That function is the cumulative distribution function, or CDF. It is the single most versatile object in the theory of Random Variables. The CDF matters because it is the only description of a random variable's distribution. It works uniformly across discrete, continuous, and every other type of variable. This includes hybrid variables that are neither. Probability mass functions only make sense for variables taking countably many values. Densities (introduced later for Continuous Random Variables) require an integral to even exist. The CDF, by contrast, is defined for every real-valued random variable. There are no exceptions and no side conditions. It converts the abstract measure-theoretic content of a probability space into something concrete. It becomes a monotone real function that can be graphed, differentiated, integrated, and manipulated with ordinary calculus. The big picture is this: a random variable induces a probability measure on the real line. The CDF is a bookkeeping device. It records the mass this measure assigns to every half-line . Remarkably, this one family of numbers — indexed by — determines the entire distribution of . Two random variables with the same CDF are distributed identically. This holds for every practical and theoretical purpose. It holds even if they live on completely different probability spaces. This article gives the precise definition of the CDF. It proves the four properties that characterize CDFs among all functions. This means one can manufacture new distributions by writing down any function with these properties. The article shows exactly how the CDF specializes to the discrete case. There, it becomes a step function built from the PMF. It also foreshadows the continuous case, where it becomes an integral of a density. We close with worked numerical examples. We include a counterexample showing why right-continuity cannot be dropped. Finally, we provide a map of where CDFs resurface throughout probability and statistics.
- The CDF of a random variable is , defined for all , regardless of whether is discrete, continuous, or neither.
- is non-decreasing, right-continuous, with limits at and at — and any function with these four properties is the CDF of some random variable.
- For a discrete variable, is a right-continuous step function that jumps by at each atom ; the PMF is recovered from the jump sizes.
- The CDF determines probabilities of all intervals: , and with care, of open and closed intervals and single points too.
- Two random variables have the same distribution if and only if they have the same CDF — this is the precise sense in which the CDF is a complete description.
- The CDF is the bridge to continuous random variables: when is absolutely continuous, its derivative is the probability density function.
- Key idea: the CDF is a single monotone, right-continuous function that fully encodes a random variable's distribution, discrete or continuous alike.
Where this lives today
The CDF is not a purely theoretical bookkeeping device — it is the working interface between probability theory and nearly every quantitative discipline that touches uncertainty.
Statistics. The empirical CDF, built from a sample by replacing with the sample proportion of observations , is the basic nonparametric estimator of an unknown distribution, and underlies goodness-of-fit tests such as Kolmogorov–Smirnov and Cramér–von Mises. Percentiles, medians, and quantiles used throughout applied statistics are literally defined via the (generalized) inverse of the CDF.
Simulation and computer science. The inverse transform method — generate uniform on and output — is exactly the existence construction used in the converse direction of the characterization theorem above, and it is how most pseudo-random variate generators (for exponential, Weibull, or custom empirical distributions) are implemented in software.
Reliability engineering and survival analysis. The complement , the survival function, describes the probability a component or patient survives past time ; hazard rates and reliability curves are built directly from the CDF's structure.
Finance and risk management. Value-at-risk, a standard regulatory risk metric, is precisely a quantile — an inverse-CDF evaluation — of a portfolio's loss distribution.
Physics and information theory. Cumulative distributions of energy levels, particle counts, or noise amplitudes are used identically to how they are used here; entropy and information-theoretic quantities are often computed by first passing through the CDF or its density.
Ask the tutor: How does the derivative of the CDF give rise to the probability density function for continuous random variables?
Let be a random variable on a probability space , meaning is -measurable. The cumulative distribution function (CDF) of is the function defined by
This is well-defined for every real because by measurability of , so it has a well-defined probability.
Intuition
Think of the CDF as a running total. Imagine sweeping a vertical line from left to right across the real number line, and at each position recording all the probability mass that lies at or to the left of the line. As the line moves rightward, it can only accumulate more mass, never lose any — this is why is non-decreasing. Far to the left, the line has swept up nothing, so ; far to the right, it has swept up everything, so . For a discrete variable, mass sits at isolated points, so the running total is flat between these points and jumps abruptly at each one — a staircase. For a continuous variable, mass is spread out with no isolated atoms, so the running total climbs smoothly with no jumps at all. The CDF framework treats both pictures as instances of the same object.
The four defining properties
Let be a random variable with CDF . Then has the following four properties: 1. (Monotonicity) is non-decreasing: if then . 2. (Limits) and . 3. (Right-continuity) For every , . 4. (Left limits exist) For every , exists, and equals ; moreover
Conversely, if satisfies properties (1), (2), and (3), then there exists a probability space and a random variable on it with .
We prove the forward direction (properties of any CDF) using only the axioms of probability (countable additivity, monotonicity of measures, continuity of measure along monotone sequences of events), and then sketch the converse (existence) via the standard quantile transform construction.
Property 1 (Monotonicity). Let . Then as subsets of : if and , then . By monotonicity of probability measures (if then , which follows from countable additivity applied to , a disjoint union), we get
Property 2 (Limits at infinity). Let for ranging over the integers, or more generally consider any sequence and let with increasing. The events are increasing (), and because every real number is eventually exceeded by as . By continuity of probability measures from below (a consequence of countable additivity: if then ),
Since this holds along every sequence , and is monotone (Property 1), the full limit follows: monotone functions have limits at equal to , and since some sequence achieves this sup, the sup is . The argument for is symmetric: let , so is decreasing with (no real number is every as ). By continuity of measure from above, .
Property 3 (Right-continuity). Fix and let be any sequence of positive reals decreasing to . Let . Since is decreasing, is a decreasing sequence of events, and
because satisfies for all if and only if (taking so ; if for every then , and conversely trivially gives for all ). By continuity of measure from above,
Since this holds for every sequence , we conclude .
Property 4 (Left limits and jumps). Fix and let . Let , an increasing sequence of events with
since satisfies for some iff (if , choose large enough that ; conversely for any ). By continuity of measure from below,
This limit exists (it equals ) and does not depend on the sequence , establishing the first claim. For the jump size,
using finite additivity: is a disjoint union, so .
Converse (existence, quantile transform). Suppose satisfies (1)–(3). Define the generalized inverse (quantile function)
Take , the Borel -algebra on , and = Lebesgue measure (i.e. let be a random variable uniformly distributed on under ). Define . We claim . The key fact is: for all and ,
(): if , then belongs to the set , so by definition of infimum, . (): if , then since is right-continuous and non-decreasing, ; and because is the infimum of the set , and by right-continuity of this infimum is itself attained in the set (a decreasing sequence with gives, by right-continuity, ). Hence . Using this equivalence,
where the last equality uses that is uniform on , so for , and . This proves , completing the converse.
∎For any random variable with CDF and any reals ,
More generally, using Property 4 above,
Write as a disjoint union (every with either has or , exclusively). By finite additivity,
and rearranging gives the first formula. The remaining formulas follow identically from Property 4 of the theorem, using the corresponding decompositions and .
∎Worked examples
Example 1 — a discrete variable with unequal, asymmetric masses. Let be the number of heads-runs-of-length-2-or-more observed in a specific finite experiment, and suppose (from a prior calculation using the PMF of ) that takes values in with
(Check: , so this is a valid PMF.) The CDF is built by accumulating these masses left to right:
Check right-continuity at each atom: at , and — matches, confirming the half-open intervals etc. are correctly placed with the jump landing at the atom. Check the left-limit rule: , so the jump at is , exactly the PMF value, as guaranteed by Property 4. Now use the corollary to compute without re-deriving anything from the PMF directly:
Sanity check against the PMF directly: the values of in are and , with total probability . Matches.
Example 2 — mixed (hybrid) random variable, demonstrating the CDF's universality. Consider a warranty payout (in units of $1000) structured as follows: with probability the claim is denied and exactly; otherwise (probability ), is a continuous amount uniformly distributed on , but this branch's probability is itself scaled by . Formally,
This is neither purely discrete (it has a continuous part on ) nor purely continuous (it has an atom at ) — exactly the kind of object where PMFs and densities alone are inadequate, but the CDF still works without modification. For : . For : (there is no probability of ). For : . For : . Check continuity/limits: ✓, matching the value for , so is continuous at (no atom there). At , , while as — actually let's verify right-continuity precisely: . Right-continuous, as required. But the left limit at is , so there is a jump of size at , correctly recording the atom . Now compute using only the CDF:
Direct check: this event lies entirely in the continuous branch, with length out of range , scaled by : . Wait — these disagree ( vs ); let's recheck the arithmetic. , and , not . Recomputing: is correct as written; the error is in the direct check. Recompute directly: , times gives . But via CDF we got . These still disagree, so recheck : , so , not — the earlier line dropped the . Correcting:
which now matches the direct check of exactly. This illustrates precisely why one always re-verifies CDF arithmetic against the underlying probability structure — a dropped constant is easy to miss, and the corollary formula is only as good as the correctly-evaluated .
Drop Property 3 (right-continuity) from the characterization theorem, keeping monotonicity and the correct limits at , and consider the function
Here is non-decreasing and satisfies , , but at : . So is left-continuous at , not right-continuous — it fails Property 3. Suppose, for contradiction, were the CDF of some random variable , i.e. for all . Then , so almost surely. But also for every , in particular for arbitrarily small , so
Let . The events are decreasing with (no positive real number is every ). By continuity of probability measures from above (a genuine axiom-derived property that any actual probability , viewed as varies, must obey — this is exactly what Property 3 encodes), we would need
but for every , a constant sequence that cannot converge to . This is a contradiction. Hence no random variable can have as its CDF: right-continuity is not a cosmetic convention but a mathematical consequence of the axioms of probability (specifically, continuity of measures along decreasing sequences of events with empty intersection), and dropping it from the hypothesis list breaks the existence half of the characterization theorem. This is exactly why the definition uses a closed half-line rather than an open one — the closed convention is what forces right-continuity to hold automatically.
Scope, edge cases & common traps
| Situation | What to watch for |
|---|---|
| Discrete | is a right-continuous step function; jump at equals ; flat (constant) between atoms. |
| Continuous (foreshadowing) | is continuous everywhere (no jumps, since single points have probability ); if additionally is differentiable, is the density. |
| Mixed/hybrid | has jumps at atoms and smooth increase elsewhere; the CDF handles this with no special casing, unlike PMF/PDF, which cannot describe such alone. |
| Computing from | Must use the left-limit gap, , not just read off , unless is known to be discrete at that point. |
| Open vs. closed interval endpoints | in general; . Confusing these is the single most common computational error. |
| Converse direction | Any function satisfying (1)-(3) is a CDF of some (possibly newly constructed) random variable — a genuine existence theorem, not just a checklist. |
The mathematician behind it
Origins · 1 minAndrey Nikolaevich Kolmogorov and how this was discovered
Kolmogorov gave probability theory its modern axiomatic foundation in his 1933 monograph Grundbegriffe der Wahrscheinlichkeitsrechnung, building probability on measure theory. The cumulative distribution function, though its basic idea traces to earlier work of Chebyshev, Markov, and the theory of distribution of mass, became rigorous and universal only once random variables were defined as measurable functions on a probability space, exactly the framework in which the CDF's four defining properties (monotonicity, limits, right-continuity, controlled jumps) can be proved from axioms rather than merely observed empirically.
Why is the CDF defined with rather than ?
The choice of (a closed half-line ) is what forces right-continuity to hold automatically as a theorem, rather than requiring it as a separate assumption. If one instead defined , the resulting function would be left-continuous, not right-continuous, by the mirror-image argument in the counterexample above. Both conventions carry the same information (since ), but the convention is the universal standard because it makes the characterization theorem's third property a clean consequence of continuity of measure from above, rather than an awkward continuity-from-below argument that behaves differently at atoms.
Does the CDF always determine the PMF or density?
It determines the PMF whenever is discrete: the PMF value at is exactly the jump size , as proved in Property 4. It determines the density only when is absolutely continuous, in which case the density is (almost everywhere) the derivative ; this is developed fully when Continuous Random Variables are introduced. In general (for arbitrary, possibly pathological distributions), the CDF always exists and always determines the distribution, but a PMF or density need not exist — this is precisely why the CDF, not the PMF or density, is the universally applicable object.
If two random variables have the same CDF, are they equal?
Not necessarily as functions on a sample space — they can live on entirely different probability spaces — but they are equal in distribution, meaning for every Borel set . This is because the CDF determines the full induced probability measure on (a standard result from measure theory: two finite measures on that agree on all sets agree on the entire Borel -algebra, since these half-lines generate it and form a -system). So "same CDF" is exactly the mathematical meaning of "same distribution."
How does the CDF relate to the PMF for a discrete random variable?
For discrete with PMF , the CDF is obtained by accumulating mass: , summing over all atoms of that are . This is always a right-continuous step function, constant between consecutive atoms and jumping exactly at each atom by the corresponding PMF value. Conversely, given the CDF of a known-discrete , the PMF is recovered via , the jump-size formula from Property 4 — so the two descriptions carry identical information for discrete variables, but only the CDF generalizes beyond them.
Can a CDF have infinitely many jumps?
Yes. A discrete random variable taking countably infinitely many values (e.g. a Poisson or geometric random variable) has a CDF with a countable infinity of jumps, one at each atom, with jump sizes summing to at most (they sum to exactly if is purely discrete). Monotonicity plus boundedness in forces the set of jump discontinuities of any CDF to be at most countable — this is a general fact about monotone bounded functions, not special to probability, but it explains why a CDF can never have uncountably many atoms of positive probability.
Is every non-decreasing, right-continuous function with limits and automatically a valid CDF?
Yes — this is exactly the converse half of the characterization theorem proved above, using the quantile transform construction with uniform on . This converse is what makes the CDF characterization so powerful in practice: to define a new probability distribution, one only needs to write down a function satisfying properties (1)–(3), with no need to separately verify measurability, countable additivity, or any other axiom — those are automatically inherited from the construction.
Why can't we just always use the PMF or density instead of the CDF?
Because PMFs require countably many atoms (undefined for genuinely continuous variables), and densities require absolute continuity of the distribution (undefined whenever there are atoms, as in the mixed Example 2 above). The CDF has no such restriction: is well-defined for literally every random variable, discrete, continuous, mixed, or pathological (e.g. singular continuous distributions like the Cantor distribution, which have a continuous CDF yet no density). This universality is why the CDF, not the PMF or PDF, is the definition used to state general theorems about "the distribution of ."