Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find the CDF from a PMF

The cumulative distribution function F(x)=P(X≤x)F(x) = P(X \leq x) of a discrete variable is a running total of its pmf. It climbs in steps at each possible value and stays flat in between.

Recognize the task

You have a pmf (a table or a formula p(k)p(k)) and need P(X≤x)P(X \leq x), a "at most" or "no more than" probability, an interval probability, or the graph of FF. Typical forms: a table of values and probabilities, p(k)=16p(k) = \frac{1}{6} for a die, p(k)=(1−p)k−1pp(k) = (1 - p)^{k-1}p. Test: is the variable discrete, with probabilities on separate points? Then the CDF is a cumulative sum.
The discrete CDF is defined in the lesson section Discrete Random Variables.

Steps

StepOn X∈{0,1,2,3}X \in \{0, 1, 2, 3\} with probabilities 0.1, 0.3, 0.4, 0.20.1,\ 0.3,\ 0.4,\ 0.2
1Sort the possible values from smallest to largest. The CDF accumulates from the left, so order matters.0<1<2<30 < 1 < 2 < 3
2Add the probabilities cumulatively. At each value, F(x)F(x) is the sum of pp at that value and every value below it (CDF from PMF).F(0)=0.1, F(1)=0.4, F(2)=0.8, F(3)=1F(0) = 0.1,\ F(1) = 0.4,\ F(2) = 0.8,\ F(3) = 1
3Write the step function, including the outer pieces. F(x)=0F(x) = 0 to the left of the smallest value and F(x)=1F(x) = 1 from the largest value on. Between two values FF stays constant.F(x)=0, 0.1, 0.4, 0.8, 1F(x) = 0,\ 0.1,\ 0.4,\ 0.8,\ 1 on x<0x < 0, [0,1)[0,1), [1,2)[1,2), [2,3)[2,3), x≥3x \geq 3
4Read the probabilities you need. Use P(a<X≤b)=F(b)−F(a)P(a < X \leq b) = F(b) - F(a) (interval via the CDF). For a strict inequality, step back one value.P(1<X≤3)=1−0.4=0.6P(1 < X \leq 3) = 1 - 0.4 = 0.6

Worked examples

Example 1 · a fair die

equal steps
p(k)=16p(k) = \frac{1}{6}, k=1,…,6k = 1, \dots, 6
F(4)=16+16+16+16F(4) = \frac{1}{6} + \frac{1}{6} + \frac{1}{6} + \frac{1}{6}
add up to and including 4
P(X≤4)=46=23P(X \leq 4) = \frac{4}{6} = \frac{2}{3}
simplify

Example 2 · an interval with a strict end

table
F(0)=0.1, F(1)=0.4, F(2)=0.8, F(3)=1F(0) = 0.1,\ F(1) = 0.4,\ F(2) = 0.8,\ F(3) = 1
running totals
P(X<3)=P(X≤2)=F(2)P(X < 3) = P(X \leq 2) = F(2)
strict: step back one value
P(X<3)=0.8P(X < 3) = 0.8
read the table

Example 3 · rolls until the first six

closed form
p(k)=(56)k−116p(k) = \left(\frac{5}{6}\right)^{k-1} \frac{1}{6}, k=1,2,…k = 1, 2, \dots
geometric pmf
F(3)=16+536+25216=91216F(3) = \frac{1}{6} + \frac{5}{36} + \frac{25}{216} = \frac{91}{216}
add the first three terms
F(3)=1−(56)3=91216≈0.4213F(3) = 1 - \left(\frac{5}{6}\right)^3 = \frac{91}{216} \approx 0.4213
same as no six in three rolls
More on this distribution in geometric probability.

See it happen

Picture the pmf as bars on a number line. Walk from left to right and keep a running total: each time you pass a bar, the total jumps by its height, and between bars it does not move. That running total is the CDF, a staircase from 00 to 11 whose step heights are the pmf values. Watch the staircase form in the discrete CDF visualizer.

Common mistakes

Treating the CDF as the probability of one value

✗ P(X=2)=F(2)=0.8P(X = 2) = F(2) = 0.8
✓ P(X=2)=F(2)−F(1)=0.8−0.4=0.4P(X = 2) = F(2) - F(1) = 0.8 - 0.4 = 0.4

Ignoring a strict inequality

✗ P(X<3)=F(3)=1P(X < 3) = F(3) = 1
✓ P(X<3)=F(2)=0.8P(X < 3) = F(2) = 0.8: for a discrete variable << and ≤\leq differ

Leaving out the outer pieces

✗ F(x)F(x) given only at x=0,1,2,3x = 0, 1, 2, 3
✓ FF is defined for every real xx: 00 for x<0x < 0, constant between values, 11 for x≥3x \geq 3
A CDF never decreases and ends at 11 (monotonicity).