Contrast a probability mass function with a cumulative distribution function and show how each can be derived from the other.
The idea
A discrete random variable is described by its probability mass function, which gives the probability of each exact value and sums to 1 across all values: PMF = p(x) = P(X = x). The cumulative distribution function is the running total of the mass up to and including x: CDF = F(x) = P(X ≤ x). Each is derived from the other. F(x) is the sum of p over all values up to and including x, and p(x) is the size of the jump in F at x, the CDF at x minus the CDF just below it. For a discrete variable F is a non-decreasing step function from 0 to 1, flat between possible values, so for a whole-number variable F(2.5) equals F(2). Interval probabilities use differences, so for P(a < X ≤ b), with a excluded and b included: Interval = F(b) − F(a). The common mistake is a wrong endpoint, because the CDF includes the upper value but not the lower one: starting from F(b) − F(a), P(a ≤ X ≤ b) adds p(a), and P(a ≤ X < b) adds p(a) and subtracts p(b).
Formulas
Interval probability from a CDF
P(a < X ≤ b) = F(b) − F(a)
- F(x)
- the cumulative distribution function, P(X ≤ x)
- a
- the lower end, excluded
- b
- the upper end, included
The CDF includes the upper value and excludes the lower one. For P(a ≤ X ≤ b) on a discrete variable, add back p(a).
A practice question
Which statement correctly contrasts the probability mass function (PMF) and the cumulative distribution function (CDF) of a discrete random variable X?
- The PMF gives P(X = x) at each possible value, while the CDF gives P(X <= x), the running total of the PMF. - correct
- The PMF gives P(X <= x), while the CDF gives P(X = x) at each possible value.Why not: Reverses the two definitions: the PMF is the point probability and the CDF is the cumulative one.
- The PMF can exceed 1 at a point, while the CDF is always a probability between 0 and 1.Why not: Confuses the PMF with a density: a PMF value is a probability and cannot exceed 1.
- The PMF gives P(X >= x), the chance of at least x, while the CDF gives the probability at a single value.Why not: Describes the survival (upper-tail) function instead of the PMF, and misdescribes the CDF.
The PMF p(x) = P(X = x) is the probability of each exact value; the CDF F(x) = P(X <= x) adds up the PMF to x. Each can be recovered from the other by summing or differencing.
A harder one
The CDF of the number of rating downgrades X in a portfolio over a year is F(0) = 0.10, F(1) = 0.35, F(2) = 0.70, F(3) = 0.90 and F(4) = 1.00. What is the probability that exactly two downgrades occur?
- 0.70Why not: Reads F(2) = P(X <= 2) as if it were the probability of exactly 2.
- 0.35 - correct
- 0.60Why not: Uses F(2) - F(0), which spans two values (1 and 2) rather than the single jump at 2.
- 0.30Why not: Uses 1 - F(2) = P(X > 2), the upper tail rather than the jump at 2.
p(2) = F(2) - F(1) = 0.70 - 0.35 = 0.35, the size of the CDF jump at x = 2.
The hardest tier
The CDF of the number of loan defaults X in a small book is F(0) = 0.20, F(1) = 0.50, F(2) = 0.80, F(3) = 0.95 and F(4) = 1.00. What is the expected number of defaults?
- 2.00Why not: Averages the five possible values with equal weights instead of weighting by the PMF.
- 0.75Why not: Builds the PMF with an off-by-one shift, p(k) = F(k+1) - F(k), which misallocates the mass.
- 1.55 - correct
- 1.00Why not: Reports the median (where the CDF first reaches 0.5) instead of the mean.
The PMF is F(x) minus the previous F: 0.20, 0.30, 0.30, 0.15, 0.05. E[X] = 0(0.20) + 1(0.30) + 2(0.30) + 3(0.15) + 4(0.05) = 1.55.
In the app: 6 practice questions on this outcome, spaced review that brings it back before you forget it.
Start free →More in Random Variables
- Define the mathematical expectation of a random variable and use it in calculations.
- Outline the four population moments that are commonly used.
- Explain what separates a probability density function from a probability mass function.
- Outline the quantile function along with estimators that are based on quantiles.
- Show how a linear transformation of a random variable alters its median, interquartile range, mean, standard deviation, variance, skewness and kurtosis.