Understanding the Cumulative Distribution Function (CDF)
The Cumulative Distribution Function (CDF) describes the probability that a random variable
takes on a value less than or equal to a specific value.
Definition: F(x) = P(X ≤ x)
CDF for Discrete Random Variables
For a discrete variable, the CDF is a step function that sums the PMF up to x:
F(x) = Σ P(X = xi) for all xi ≤ x
Example: Tossing a fair die:
F(3) = P(1) + P(2) + P(3) = 1/6 + 1/6 + 1/6 = 0.5
CDF for Continuous Random Variables
For a continuous variable, the CDF is the integral of the PDF:
F(x) = ∫−∞x f(t) dt
Example: If X ~ Uniform(0, 1), then F(x) = x for 0 ≤ x ≤ 1
Properties of the CDF
- F(x) is non-decreasing: as x increases, so does F(x)
- lim x→−∞ F(x) = 0, and lim x→∞ F(x) = 1
- For continuous variables, F(x) is continuous
- P(a < X ≤ b) = F(b) − F(a)
Using the CDF to Calculate Probabilities
Once the CDF is known, probabilities can be easily computed:
P(X ≤ x) = F(x)
P(X > x) = 1 - F(x)
P(a < X ≤ b) = F(b) - F(a)