Many questions about a random variable ask how much probability lies at or below a threshold, such as at most three errors or a score change of no more than one point. A probability mass function answers each of them only after you add the right masses. The cumulative distribution function does that addition once for every threshold on the real line, and its definition includes the threshold itself. This lesson builds it for discrete random variables, reads the masses back from its jumps, and finds tail and interval probabilities with every endpoint accounted for.
Key terms
Cumulative distribution function
Definition The cumulative distribution function, or CDF, of a random variable is the function defined for every real number by
Every CDF is nondecreasing, is right-continuous, and satisfies as and as . If is discrete with PMF and support , then is the sum of over the support values . The inequality includes equality, so the mass at itself counts.
In plain words The value is all the probability at or below the threshold . The threshold can be any real number, including numbers the random variable never takes. Raising the threshold can only add outcomes, never remove them, which is why cannot decrease.
Example In a constructed model, a score change takes the values , and with probabilities , and . Moving the threshold from left to right and adding each mass as it is reached gives
So even though is not a possible value, and . This reaches and because the support is finite. When the support has no upper bound, at every threshold, and only approaches . For the number of independent fair coin tosses up to and including the first head, the CDF of has at each positive integer , which is less than for every and tends to .
Step function
Definition Let be discrete with finite support . Its CDF is a step function. It equals for , it equals for , and on each interval with it is constant and equal to
the total mass of the first support values. More generally, for any discrete and any , the difference is the total mass of the support values in , so is constant on every interval that contains no support value.
In plain words Between consecutive support values nothing new is added, so the graph stays flat. At each support value it steps up. A flat stretch means that no mass lies between its ends, not that probability is spread evenly along it.
Example For the score change the graph is flat at height from up to just below . That does not mean is spread over the values between and . The values and have probability , and indeed . A careful graph draws filled dots at the attained heights , and , and open dots at the right ends of the lower pieces, at , and .
Jump size
Definition For every real number , the limit of as increases to exists. It is written and equals . The jump of at is
So jumps exactly at the values with positive probability, and the size of the jump is the mass at that value. For a discrete random variable this recovers the whole PMF from the CDF.
In plain words The rise at each step is the probability of that one value. The height of the CDF itself is accumulated probability, which also contains every earlier mass.
Example For the score change, the jump at is , which is . The jump at is , and the jump at is . At there is no jump, since , so . Reading the height as is a common error, because that height also includes the mass at .
Right-continuity
Definition A CDF is right-continuous at every real number ,
As decreases to , the events shrink to , and probability is continuous along a decreasing sequence of events. The limit from the left, , differs from exactly when . So right-continuity allows jumps, and at a jump the CDF takes the upper value.
In plain words At a jump the CDF already includes the mass at that point, because the definition uses less than or equal to. On a graph this is the filled dot at the top of the step.
Example For the score change, for , so the limit from the right at is . From the left, for , so . Setting would leave out , which includes, and the resulting function would not be right-continuous at .
Tail probability
Definition The upper tail probabilities of at a threshold are
Both follow from the complement rule, since is the complement of and is the complement of . The two tails differ by . The lower tails are and .
In plain words Whether the threshold value is included decides whether you subtract the CDF at or the level just below .
Example For the score change, , which matches the table, since is the only value above . Changing one word gives , which is . Using for would remove the mass at as well and give the wrong answer .
Interval probability
Definition For real numbers ,
because the event is the disjoint union of and . The other endpoint choices use limits from the left.
| Event | Probability |
|---|---|
In plain words Take all the probability up to the right end and remove all the probability up to the left end. Whether an endpoint is in or out decides whether to use the CDF at that point or the level just below it.
Example For the score change, . The only support value in is , so the answer checks, and neither endpoint needed to be a possible value. With both endpoints at support values,
which matches from the included values and , with left out. Interval probabilities come from heights of the CDF and their differences, not from areas under its graph.
Check yourself
- A random variable takes the values , and with probabilities , and . Write its CDF for every real , and find and .
Show the answer
Adding the masses as the threshold passes each support value gives
So , since only the support value lies at or below , and , since the support values and lie at or below .
- For the same , use the CDF to find and . Why do the two answers differ by ?
Show the answer
The event includes , so
which matches the masses at and . The event excludes , so , the mass at alone. The first event is the second one together with the value and the values above , and . So the difference is , the jump .
- Consider the function
It is nondecreasing, tends to on the left and reaches on the right. Is it a CDF? If not, change only the endpoint conventions to make it one, and describe the distribution you get.
Show the answer
It is not a CDF, because it is not right-continuous at . The value is , but for every , so the limit from the right at is . A CDF with these values would need while for all , which contradicts the continuity of probability along the shrinking events .
Moving the endpoint so that the middle piece is and the last piece is gives a right-continuous step function. It is the CDF of a random variable that equals or , each with probability , since its jumps at and both have size .