Cumulative distribution

By Jude Wallis · Updated

A cumulative distribution gives the probability that a random variable is at most a given value, adding probabilities from the smallest value upward.

A cumulative distribution is the function F(x)=P(Xx)F(x) = P(X \le x), read as the probability that XX is at most xx. For a discrete variable it is a running total, F(x)=xixP(xi)F(x) = \sum_{x_i \le x} P(x_i), built by adding from the smallest value upward. It sits at 0 below the smallest value, never decreases, and finishes at 1.

Let XX be the number of heads in five flips of a fair coin. The individual probabilities for 0 through 5 heads are 0.031250.03125, 0.156250.15625, 0.31250.3125, 0.31250.3125, 0.156250.15625 and 0.031250.03125. Stacking them gives F(0)=0.03125F(0) = 0.03125, F(1)=0.1875F(1) = 0.1875, F(2)=0.5F(2) = 0.5, F(3)=0.8125F(3) = 0.8125, F(4)=0.96875F(4) = 0.96875 and F(5)=1F(5) = 1.

"At least 3 heads, so the answer is 1F(3)1 - F(3)" is the error, and it costs more marks here than any arithmetic mistake. That expression equals 10.8125=0.18751 - 0.8125 = 0.1875, which is the probability of more than 3. At least 3 includes 3 itself, so it is 1F(2)=10.5=0.51 - F(2) = 1 - 0.5 = 0.5, and the two answers are not close. Subtract the cumulative value one step below the lowest count you want to keep.

Run the table backwards and the jump in FF at a value is that value's own probability: P(X=3)=F(3)F(2)=0.81250.5=0.3125P(X = 3) = F(3) - F(2) = 0.8125 - 0.5 = 0.3125. That is why a cdf command answers at most and at least questions on its own while an exactly question needs the pdf command or that subtraction.

A continuous variable has no jumps to subtract. Its FF climbs smoothly, every single value contributes nothing to the climb, and the same subtraction returns 0 wherever you try it, which is the cumulative view of why probability there lives on intervals. Topic 2.8 of Unit 2, Introduction to Random Variables and Probability Distributions, builds the discrete version alongside the ordinary distribution.

For a continuous variable the cumulative function is an accumulation function in the calculus sense, built by integrating the density from the left. Differentiating it returns the density, which is the first Fundamental Theorem of Calculus, and that theorem needs the density to be continuous for exactly the reason the discrete case behaves differently here: accumulating something that jumps gives a corner, not a derivative.

Where this comes up

More random variables and distributions terms, or browse the full statistics glossary.