This page is a practice arena . We take the ideas from Cumulative distribution functions and throw every kind of case at them, one worked example per case-type. Nothing here is new theory — but by the end you will have seen every scenario a CDF can throw at you, so nothing on an exam surprises you.
Before we start, one reminder in plain words. The letters we use:
Definition The three characters in every example
X — a random variable : a number that comes out of some random experiment (a die roll, a waiting time). See Random Variables .
F X ( x ) = P ( X ≤ x ) — the CDF : the running total of probability, "how much of all possible outcomes sits at or below the value x ". Always a number between 0 and 1 .
F X − 1 ( p ) — the quantile function , read "which x has fraction p of everything below it?". See Quantile Functions .
Everything below is just those three characters in different costumes.
Every CDF problem falls into one of these case classes . The whole point of this page is that we hit all of them .
Cell
Case class
What makes it tricky
Covered by
A
Discrete, value between jumps
staircase: only landings below the target count
Ex. 1
B
Discrete, exact point mass
P ( X = x ) = F X ( x ) − F X ( x − ) , the jump height
Ex. 2
C
Continuous ramp, interval
subtract two CDF values
Ex. 3
D
Degenerate / boundary inputs
x < support, x > support, x = edge
Ex. 4
E
Continuous, inverting the CDF (quantile)
solve F X ( x ) = p for x
Ex. 5
F
Limiting / tail behaviour
x → ∞ , complement P ( X > x )
Ex. 6
G
Real-world word problem
translate English → CDF
Ex. 7
H
Exam twist: mixed / sign trap
negative "probability" trap, mixed variable
Ex. 8
Read the Forecast line first and guess before revealing each solution — that is where learning actually happens.
Worked example Rolling a fair die, target not a whole number
Let X be a fair six-sided die, so p X ( k ) = 6 1 for k ∈ { 1 , … , 6 } . Find F X ( 4.2 ) .
Forecast: guess a fraction with denominator 6 . Bigger or smaller than 2 1 ?
Step 1 — List which outcomes are ≤ 4.2 .
The die can only land on whole numbers. The ones ≤ 4.2 are 1 , 2 , 3 , 4 .
Why this step? F X ( x ) = P ( X ≤ x ) sums the mass of every outcome at or below x . A die never shows 4.2 , so we round down to the last real landing.
Step 2 — Add their probabilities.
F X ( 4.2 ) = 6 1 + 6 1 + 6 1 + 6 1 = 6 4 = 3 2 ≈ 0.6667
Why this step? Disjoint outcomes' probabilities add.
Verify: 3 2 > 2 1 ✓ (matches forecast — we've passed the midpoint value 3.5 ). The staircase in the figure below sits at height 6 4 across the whole flat run 4 ≤ x < 5 .
Worked example Same die, but asking for a single value's probability
Using the die CDF, find P ( X = 4 ) directly from the CDF.
Forecast: should equal 6 1 . Can we recover it without the PMF?
Step 1 — Write the jump formula.
P ( X = x ) = F X ( x ) − F X ( x − )
where x − means "the value a hair below x ". Why this step? For a staircase CDF, the probability sitting exactly at a value is the height of the vertical jump there — the running total leaps up by exactly that point's mass.
Step 2 — Plug in x = 4 .
F X ( 4 ) = 6 4 , F X ( 4 − ) = 6 3
P ( X = 4 ) = 6 4 − 6 3 = 6 1 ≈ 0.1667
Why this step? Just below 4 (say 3.99 ) only 1 , 2 , 3 qualify, giving 6 3 ; at 4 we add the mass of 4 .
Verify: equals the PMF value 6 1 ✓. Look at figure s01: the red vertical segment at x = 4 has height exactly 6 1 .
Worked example Uniform interval
X ∼ Uniform ( 0 , 1 ) , so F X ( x ) = x on [ 0 , 1 ] . Find P ( 0.3 < X ≤ 0.8 ) .
Forecast: guess before reading. The width of the interval is 0.5 — coincidence?
Step 1 — Use the interval rule.
P ( a < X ≤ b ) = F X ( b ) − F X ( a )
Why this step? Subtracting the running total up to a from the running total up to b leaves exactly the slice in between — no double counting.
Step 2 — Substitute.
P ( 0.3 < X ≤ 0.8 ) = F X ( 0.8 ) − F X ( 0.3 ) = 0.8 − 0.3 = 0.5
Why this step? For a Uniform( 0 , 1 ) , F X ( x ) = x , so the difference is literally the interval length.
Verify: For a uniform, probability = length of sub-interval, and 0.8 − 0.3 = 0.5 ✓. Units: pure probability, dimensionless, in [ 0 , 1 ] ✓.
Worked example Feeding the CDF values outside and on the edge of the support
With the same Uniform( 0 , 1 ) , evaluate F X ( − 2 ) , F X ( 0 ) , F X ( 1 ) , and F X ( 3.5 ) .
Forecast: two of these are 0 -or-edge, two are saturated. Which?
Step 1 — Recall the piecewise CDF.
F X ( x ) = ⎩ ⎨ ⎧ 0 x 1 x < 0 0 ≤ x ≤ 1 x > 1
Why this step? Outside the support no probability has accumulated (left) or all of it has (right). The formula bakes in these limits.
Step 2 — Read each off the right branch.
F X ( − 2 ) = 0 — nothing below the support yet (this is the lim x → − ∞ = 0 rule in action).
F X ( 0 ) = 0 — the very left edge; still nothing accumulated.
F X ( 1 ) = 1 — the right edge; all probability collected.
F X ( 3.5 ) = 1 — past the support; the running total can't exceed 1 (the lim x → ∞ = 1 rule).
Why this step? These four values check the monotone, bounded, limit properties all at once.
Verify: all outputs lie in [ 0 , 1 ] ✓, and they never decrease as x grows: 0 ≤ 0 ≤ 1 ≤ 1 ✓.
Worked example 90th percentile of an exponential
X ∼ Exp ( λ ) with F X ( x ) = 1 − e − λ x for x ≥ 0 , and λ = 2 . Find the value below which 90% of outcomes fall — i.e. F X − 1 ( 0.9 ) .
Forecast: should be a small positive number (rate 2 means events happen fast). Guess whether it's above or below 1 .
Step 1 — Set the CDF equal to the target fraction.
F X ( x ) = 0.9 ⇒ 1 − e − 2 x = 0.9
Why this step? The quantile function answers "which x has fraction p below it?" — that is literally solving F X ( x ) = p . This is the engine behind Inverse Transform Sampling .
Step 2 — Isolate the exponential.
e − 2 x = 0.1
Why this step? We want the unknown out of the exponent; first get e − 2 x alone.
Step 3 — Take the natural log (the tool that undoes e ( ⋅ ) ).
− 2 x = ln ( 0.1 ) ⇒ x = 2 − l n ( 0.1 ) = 2 l n ( 10 ) ≈ 2 2.3026 ≈ 1.1513
Why ln and not another tool? ln is the exact inverse of e x , so it peels the variable out of the exponent in one clean move.
Verify: plug back: 1 − e − 2 ( 1.1513 ) = 1 − e − 2.3026 = 1 − 0.1 = 0.9 ✓. It's just above 1 , matching a "fast" distribution's tail.
Worked example Survival past a threshold
Same X ∼ Exp ( 0.5 ) . Find P ( X > 4 ) , and confirm the tail → 0 as the threshold grows.
Forecast: the complement — should be small. Above or below 0.2 ?
Step 1 — Use the complement rule.
P ( X > x ) = 1 − F X ( x )
Why this step? "Greater than x " is everything not "at or below x ". Total probability is 1 , so subtract. This tail is exactly the survival function of Survival Analysis .
Step 2 — Substitute x = 4 , λ = 0.5 .
P ( X > 4 ) = 1 − ( 1 − e − 0.5 ⋅ 4 ) = e − 2 ≈ 0.1353
Why this step? The 1 's cancel, leaving the clean tail e − λ x .
Step 3 — Check the limit.
lim x → ∞ P ( X > x ) = lim x → ∞ e − 0.5 x = 0
Why this step? As the threshold marches right, eventually no probability remains beyond it — the CDF property lim x → ∞ F X ( x ) = 1 restated for the tail.
Verify: 0.1353 < 0.2 ✓, and e − 0.5 x shrinks monotonically to 0 ✓.
Worked example Bus waiting time
Buses arrive so that your waiting time X (minutes) is Exp ( λ ) with average wait 10 minutes. What fraction of the time do you wait between 5 and 15 minutes?
Forecast: a chunk around the average — guess roughly a third?
Step 1 — Turn "average = 10 " into λ .
For an exponential, the mean is λ 1 (see Expected Value and Variance ). So λ 1 = 10 ⇒ λ = 0.1 .
Why this step? The word "average" pins down the one parameter the exponential has.
Step 2 — Translate the English into a CDF difference.
"Between 5 and 15 minutes" = P ( 5 < X ≤ 15 ) = F X ( 15 ) − F X ( 5 ) .
Why this step? An interval of a continuous variable is always a difference of running totals.
Step 3 — Compute.
F X ( 15 ) − F X ( 5 ) = ( 1 − e − 0.1 ⋅ 15 ) − ( 1 − e − 0.1 ⋅ 5 ) = e − 0.5 − e − 1.5
≈ 0.6065 − 0.2231 = 0.3834
Why this step? Same subtraction machinery, just with real numbers plugged in.
Verify: 0.3834 is about a third ✓ (matches forecast). Units: it's a fraction of time, dimensionless in [ 0 , 1 ] ✓. (Same value the parent note's exponential example got — good consistency check.)
Worked example The negative-"probability" trap, then a mixed piecewise CDF
Part (a): A student computes F X ( 5 ) − F X ( 8 ) = 0.4 − 0.7 = − 0.3 and reports P = − 0.3 . What went wrong, and what's the right answer for the probability of X between 5 and 8 ?
Part (b): A variable has the mixed CDF
F X ( x ) = ⎩ ⎨ ⎧ 0 0.5 x 0.8 1 x < 0 0 ≤ x < 1 1 ≤ x < 2 x ≥ 2
Find P ( X = 1 ) and P ( 0.5 < X ≤ 2 ) .
Forecast: part (a) — spot the flipped subtraction. Part (b) — one flat stretch hides a point mass; where?
Step 1 (a) — Diagnose the sign.
The CDF is non-decreasing , so F X ( 8 ) ≥ F X ( 5 ) . A probability can never be negative. The student subtracted in the wrong order.
Why this step? Monotonicity is a hard rule; a negative result is an instant red flag.
Step 2 (a) — Correct it.
P ( 5 < X ≤ 8 ) = F X ( 8 ) − F X ( 5 ) = 0.7 − 0.4 = 0.3
Why this step? Larger bound minus smaller bound isolates the slice ( 5 , 8 ] .
Step 3 (b) — Point mass at x = 1 = the jump there.
Just below 1 : F X ( 1 − ) = 0.5 ( 1 ) = 0.5 . At 1 : F X ( 1 ) = 0.8 .
P ( X = 1 ) = F X ( 1 ) − F X ( 1 − ) = 0.8 − 0.5 = 0.3
Why this step? A vertical jump in an otherwise-continuous CDF means a lump of probability sits exactly at that point — this is why the variable is "mixed".
Step 4 (b) — Interval across the jump.
P ( 0.5 < X ≤ 2 ) = F X ( 2 ) − F X ( 0.5 ) = 1 − 0.5 ( 0.5 ) = 1 − 0.25 = 0.75
Why this step? The interval rule works for any valid CDF, ramp or staircase or mixed — it automatically includes the 0.3 jump at x = 1 .
Verify: (a) 0.3 ≥ 0 ✓ and equals − ( − 0.3 ) ✓. (b) P ( X = 1 ) = 0.3 lies in [ 0 , 1 ] ✓; 0.75 ≥ P ( X = 1 ) ✓ since the wider interval contains the point mass.
Recall Which example hit which cell?
Discrete between steps ::: Ex. 1 (Cell A)
Discrete exact point / jump height ::: Ex. 2 (Cell B)
Continuous interval on a ramp ::: Ex. 3 (Cell C)
Boundary / outside-support inputs ::: Ex. 4 (Cell D)
Inverting the CDF for a percentile ::: Ex. 5 (Cell E)
Tail / complement / limiting ::: Ex. 6 (Cell F)
Real-world word problem ::: Ex. 7 (Cell G)
Sign trap + mixed variable ::: Ex. 8 (Cell H)
Mnemonic One line to carry away
"To find a slice, subtract two running totals; to find a point, subtract two neighbours of the running total; to find a percentile, run the CDF backwards."
See also: Empirical Distribution (the CDF built from data), Kolmogorov-Smirnov Test (comparing two CDFs), Copulas (stitching CDFs together), Probability Distributions (where these CDFs come from).