Cumulative Distribution Functions: Explained with Examples
The cumulative distribution function (CDF) of a random variable X is defined as F(x) = P(X ≤ x), the probability that X takes a value less than or equal to x. While the PMF or PDF tells you the probability at each point or the density near it, the CDF accumulates everything up to x into one number. Ask at most how many calls arrive in an hour, and the CDF answers directly; ask for an interval, and the CDF answers by subtraction.
The CDF matters because it is the one function that works identically for discrete and continuous variables, making it the universal description of a distribution. Interval probabilities become simple differences, quantiles like the median are read off by inverting F, and comparing two distributions reduces to comparing their CDF curves. Statistical software and probability tables are built on CDFs: p-values and normal-distribution percentiles are all CDF values.
Key Concepts
- Definition: F(x) = P(X ≤ x) for every real x, from −∞ to +∞.
- Bounds: 0 ≤ F(x) ≤ 1 for all x; F is non-decreasing, never going down as x increases.
- Limits: F(x) → 0 as x → −∞ and F(x) → 1 as x → +∞, because eventually nothing or everything is included.
- Right continuity: F is always right-continuous; for discrete variables it is a step function jumping by p(x) at each value.
- Interval probability: P(a < X ≤ b) = F(b) − F(a), the workhorse formula for ranges.
- Quantiles: the median is the x with F(x) = 0.5; percentiles and quartiles are defined the same way.
Formulas
Definition: F(x) = P(X ≤ x). Interval rule: P(a < X ≤ b) = F(b) − F(a). From PMF: F(x) = Σ p(t) over all t ≤ x. From PDF: F(x) = ∫ (−∞ to x) f(t) dt. Differentiation reverses it: f(x) = F′(x) where F is differentiable. These hold for every random variable without exception.
Worked Example
Roll one fair die, X = the number shown, with p(k) = 1/6 for k = 1 … 6. Build the CDF: F(1) = 1/6, F(2) = 2/6 = 1/3, F(3) = 3/6 = 1/2, F(4) = 4/6 = 2/3, F(5) = 5/6, F(6) = 1. Between integers it stays flat, so F(3.5) = F(3) = 1/2: the probability of rolling at most 3.5 is the probability of 1, 2 or 3. Now P(2 < X ≤ 5) = F(5) − F(2) = 5/6 − 2/6 = 3/6 = 1/2. Direct counting agrees: outcomes 3, 4, 5 are 3 of 6.
Common Misconceptions
- F(x) is the probability that X equals x: No, that is the PMF. F accumulates everything up to and including x, so F(3) = P(X ≤ 3).
- The interval formula needs ≤ on both ends: For continuous variables the endpoint type never matters since single points have probability 0; for discrete variables match the inequality to the problem carefully.
- A CDF can decrease: Impossible. As x grows, the set {X ≤ x} only gains outcomes, so F is non-decreasing.
Real-World Applications
CDFs are everywhere data is summarised: income distributions are compared via CDF curves, and the statement 90% of households earn below some amount is a CDF value. Engineers read failure-time CDFs to set warranty periods covering 95% of products. In finance, value-at-risk is a quantile of the loss CDF. Hypothesis testing, confidence intervals and every normal table are CDF lookups.
The CDF F(x) = P(X ≤ x) accumulates all probability up to x, is non-decreasing with limits 0 and 1, and turns interval questions into the subtraction F(b) − F(a). It is a step function for discrete variables and a smooth integral of the PDF for continuous ones. As the universal descriptor of distributions, it underlies quantiles, p-values, tables and simulation alike.
Related blogs
- Random Experiments & Sample Space: Probability Start
- Types of Events in Probability: Simple, Compound & More
- Classical Definition of Probability: Explained with Examples
- Axiomatic Approach to Probability: Explained with Examples
- Addition Theorem of Probability: Explained with Examples
- Multiplication Theorem of Probability Explained Simply