CDFs, PDF-CDF Relationship, and Properties
Difficulty: Intermediate | Prerequisites: Part 1 of these notes (continuous random variables, PDFs), basic calculus (differentiation and integration).
The cumulative distribution function (CDF) is the universal language for describing any random variable, whether discrete, continuous, or mixed. While the PDF tells you where probability is concentrated (the shape of the density curve), the CDF tells you the total probability accumulated up to any given point. Every distribution has a CDF; not every distribution has a PDF. This makes the CDF the more general tool, and understanding its properties is essential for the rest of the course, from hypothesis testing to deriving new distributions.
The CDF F_X(x) = P(X <= x) accumulates probability from negative infinity up to x. It works for discrete, continuous, and mixed distributions alike. For a continuous random variable, the CDF is the integral of the PDF, and differentiating the CDF gives back the PDF.
Cumulative distribution function (CDF)
For a random variable X, the CDF is defined as F_X(x) = P(X <= x) for each real number x. This definition is the same whether X is discrete, continuous, or mixed.
Think of it as a running total of probability. At any point x, it answers: "What is the chance that X lands at or below this value?"
Right-continuous function
A function f is right-continuous at a point x if the limit of f as you approach x from the right equals f(x). Every CDF is right-continuous, meaning F(x) = F(x+). In plain terms, at a jump (discontinuity), the CDF takes the value at the top of the jump, not the bottom.
Left limit of the CDF
F(x-) is the limit of F(x - h) as h approaches 0 from above. At a point of continuity, F(x-) = F(x). At a jump, the jump size F(x+) - F(x-) equals P(X = x).
In simple terms, this is the CDF value just before the jump happens.
Mixed distribution
A distribution that is partly continuous and partly discrete, exhibiting both smooth density regions and point masses (specific values with non-zero probability). Many real-world datasets have this structure.
Think of it as a blend: some outcomes spread smoothly across an interval, while a few specific values carry their own lumps of probability.
Tent function (for random number generation)
The function h(x) = 1 - 2|x - 0.5| defined on [0, 1], used as a non-linear map to generate pseudo-random sequences. Starting from a seed X_0 in (0, 1), each subsequent value is X_i = h(X_{i-1}).
In simple terms, this is one example of how a deterministic formula can produce numbers that behave as if they were random.
The CDF is defined as F_X(x) = P(X <= x) for every real number x
This single definition works for discrete, continuous, and mixed random variables
The CDF does not have to be continuous (discrete distributions produce step functions)
Values between 0 and 1: 0 <= F_X(x) <= 1 for all x
Non-decreasing: if x_1 < x_2, then F_X(x_1) <= F_X(x_2)
Boundary limits: as x approaches negative infinity, F(x) approaches 0; as x approaches positive infinity, F(x) approaches 1
Right-continuous: F(x) = F(x+) at every point. At a jump, the function value equals the upper value
P(X > x) = 1 - F_X(x)
P(x_1 < X <= x_2) = F_X(x_2) - F_X(x_1)
P(X < x) = F(x-), the left limit of F at x
P(X = x) = F(x+) - F(x-). For a continuous distribution, this is always 0
For a fair die roll, the CDF is a step function:
F_X(x) = 0 for x < 1
F_X(x) = 1/6 for 1 <= x < 2
F_X(x) = 2/6 for 2 <= x < 3
(continuing in steps of 1/6)
F_X(x) = 1 for x >= 6
Each jump has size 1/6, corresponding to the probability of that outcome
If X has a continuous distribution with PDF f(x) and CDF F(x), then:
F(x) = integral from negative infinity to x of f(t) dt (the CDF is the integral of the PDF)
F'(x) = f(x) (the PDF is the derivative of the CDF)
This is the fundamental link: integration goes from PDF to CDF, differentiation goes from CDF to PDF
Given F(x) = 0 for x < 0, and F(x) = x/(1+x) for x >= 0
Find the PDF: f(x) = F'(x) = 1/(1+x)^2 for x >= 0, and 0 for x < 0
Verify it is a valid PDF: f(x) >= 0 everywhere; integral from 0 to infinity of 1/(1+x)^2 dx = [-1/(1+x)] from 0 to infinity = 0 - (-1) = 1
Verify F is a valid CDF: lim as x approaches negative infinity of F(x) = 0; lim as x approaches positive infinity of F(x) = 1; F is non-decreasing
If X ~ U[0, 1], then its CDF is:
F_X(x) = 0 for x < 0
F_X(x) = x for 0 <= x < 1
F_X(x) = 1 for x >= 1
The CDF is a straight line from (0, 0) to (1, 1), which makes sense: probability accumulates linearly when density is constant
Pseudo-random number generators aim to produce sequences that behave like draws from U[0, 1]
One approach uses a non-linear map h: [0, 1] to [0, 1], such as the tent function h(x) = 1 - 2|x - 0.5|
The procedure is recursive: choose a seed X_0 in (0, 1), then generate X_i = h(X_{i-1}) at each step
The resulting sequence is entirely deterministic but has statistical properties resembling true randomness
The integral of the PDF gives the CDF
The PDF is a proper probability mass function if X is discrete, or a density function if X is continuous
The CDF gives the probability that the random variable takes a value less than or equal to x
Both concepts apply to discrete, continuous, and mixed distributions
CDF definition
F_X(x) = P(X <= x)
Probability computations from the CDF
P(X > x) = 1 - F_X(x)
P(x_1 < X <= x_2) = F_X(x_2) - F_X(x_1)
P(X < x) = F(x-)
P(X = x) = F(x+) - F(x-)
CDF from PDF (continuous case)
F(x) = integral from negative infinity to x of f(t) dt
PDF from CDF (continuous case)
f(x) = F'(x) = dF/dx
Uniform CDF for X ~ U[a, b]
F_X(x) = 0 for x < a; F_X(x) = (x - a)/(b - a) for a <= x < b; F_X(x) = 1 for x >= b
Tent function (random number generation)
h(x) = 1 - 2|x - 0.5|, defined on [0, 1]
The CDF is the workhorse behind reliability engineering. When an engineer asks "what is the probability that this component lasts at least 5,000 hours?", they are computing 1 - F(5000), the survival function. Every warranty calculation, maintenance schedule, and failure-mode analysis rests on this.
In finance, the CDF of returns tells you the probability that a portfolio loses more than a given amount (Value at Risk). Risk managers read CDFs daily, even if they call them by different names.
Students often confuse the CDF with the PDF. The CDF is a non-decreasing function that goes from 0 to 1. The PDF is a density that can have any non-negative shape. Differentiating the CDF gives the PDF; integrating the PDF gives the CDF
Students sometimes think the CDF must be continuous. It does not have to be. For discrete distributions, the CDF is a step function with jumps at each possible value. For mixed distributions, it has both smooth sections and jumps
A common error is computing P(x_1 < X < x_2) as F(x_2) - F(x_1) without checking whether X is continuous. The formula F(x_2) - F(x_1) actually gives P(x_1 < X <= x_2). For continuous X, strict and non-strict inequalities do not matter. For discrete X, they do
Students sometimes forget that right-continuity means the CDF includes the jump at its value. At a discontinuity, F(x) equals the value after the jump, not before it
⚠️ Deriving the CDF from a given PDF (by integration) and recovering the PDF from a given CDF (by differentiation) are high-frequency exam questions. Practise both directions
⚠️ Computing probabilities using CDF properties (P(X > x) = 1 - F(x), P(a < X <= b) = F(b) - F(a)) is tested regularly
⚠️ Verifying whether a given function is a valid CDF (check: goes from 0 to 1, non-decreasing, right-continuous) appears as a proof or short-answer question
⚠️ Know the four general CDF properties by heart. They are tested both as direct recall and as tools within larger problems
⚠️ The distinction between P(X < x) = F(x-) and P(X <= x) = F(x) matters for discrete distributions and is a common exam trap
True or false: The CDF of any random variable must be a continuous function. (False. Discrete and mixed distributions have CDFs with jumps.)
Fill in the blank: P(X > 5) = 1 - ___. (F_X(5))
True or false: If F_X(3) = 0.7 and F_X(1) = 0.2, then P(1 < X <= 3) = 0.5. (True. P(1 < X <= 3) = F(3) - F(1) = 0.5.)
Fill in the blank: The PDF of a continuous random variable is obtained by ___ the CDF. (Differentiating)
True or false: At a jump in the CDF, the function takes the value at the bottom of the jump. (False. CDFs are right-continuous, so they take the value at the top of the jump.)
Q: Given F(x) = 0 for x < 0 and F(x) = 1 - e^(-2x) for x >= 0, find the PDF.
A: f(x) = F'(x) = 2e^(-2x) for x >= 0, and 0 for x < 0. This is an exponential distribution with rate parameter 2.
Q: Using the CDF above, compute P(1 < X <= 3).
A: P(1 < X <= 3) = F(3) - F(1) = (1 - e^(-6)) - (1 - e^(-2)) = e^(-2) - e^(-6).
Q: A discrete random variable takes values 1, 2, 3 with probabilities 0.2, 0.5, 0.3. Write the CDF.
A: F(x) = 0 for x < 1; F(x) = 0.2 for 1 <= x < 2; F(x) = 0.7 for 2 <= x < 3; F(x) = 1 for x >= 3.
Q: For the CDF F(x) = x^2 on [0, 1] (with F(x) = 0 for x < 0 and F(x) = 1 for x > 1), find the PDF and verify it integrates to 1.
A: f(x) = F'(x) = 2x for 0 <= x <= 1, and 0 otherwise. Integral from 0 to 1 of 2x dx = [x^2] from 0 to 1 = 1.
Q: Explain the relationship between the size of a jump in the CDF and the probability of that specific value.
A: The size of a jump at point x in the CDF equals P(X = x) = F(x+) - F(x-). For continuous distributions there are no jumps, consistent with P(X = x) = 0. For discrete distributions, every possible value produces a jump whose height is the probability of that value.
The CDF is the starting point for quantile functions and percentiles, which you will use heavily in hypothesis testing and confidence intervals later in the course.
The PDF-CDF relationship (integration one way, differentiation the other) is a special case of the Fundamental Theorem of Calculus, so this material reinforces your calculus skills while teaching new probability concepts.
Mixed distributions, where the CDF has both smooth sections and jumps, come up when you study real-world data that has both continuous measurements and point masses (e.g., insurance claims where many values are zero and the rest are spread continuously).
cumulative distribution function, CDF, F(x), P(X <= x), right-continuous, left limit, step function, non-decreasing, survival function, complementary CDF, PDF-CDF relationship, derivative of CDF, integral of PDF, mixed distribution, point mass, discrete CDF, uniform CDF, tent function, pseudo-random number generator, seed value, exponential CDF, quantile, percentile, analytical statistics, NYU statistics