The cumulative distribution function
In the last lesson, we learned that the PMF gives , the probability of exactly . But sometimes we want to know: "What's the probability of getting at most ?"
Defining the CDF
The CDF of a random variable is:
It accumulates probability from left to right.
Step through each value to see how the CDF accumulates probability from left to right.
Press Next to add the first probability bar.
The CDF tells you: "What fraction of outcomes are at or below this value?"
Properties of the CDF
The CDF always:
- Starts at 0: No probability to the left of the smallest value
- Ends at 1: All probability is accounted for as
- Never decreases: Probability only accumulates
For discrete variables, the CDF looks like a staircase, jumping up at each possible value.
The skyscraper plot
The PMF bars stack up to form the CDF staircase.
Each step in the CDF equals the height of the corresponding PMF bar.
Draw any PMF (the bars), and the CDF (the staircase) automatically follows. The height of each step equals the probability mass at that point.
Converting between PMF and CDF
You can go either direction:
From PMF to CDF: Sum up the probabilities
From CDF to PMF: Take the difference
Probability of an interval
The CDF makes interval calculations easy:
The median and quantiles
The CDF helps us find important summary statistics.
The median is the smallest value such that . Half the probability is at or below the median.
More generally, the -th quantile (or percentile) is the smallest where .
Summary
| Concept | Symbol | What it tells you |
|---|---|---|
| PMF | Probability of exactly | |
| CDF | Probability of at most | |
| Median | 50th percentile |
When you see a probability question, ask: "Do I need an exact value (use PMF) or a cumulative probability (use CDF)?" This guides your approach.
What's next
Now that we can describe random variables with PMFs and CDFs, let's meet some famous distributions. Next up: the Bernoulli and Binomial distributions.