Learn

We can use a cumulative distribution function to calculate the probability of a specific range by taking the difference between two values from the cumulative distribution function. For example, to find the probability of observing between 3 and 6 heads, we can take the probability of observing 6 or fewer heads and subtracting the probability of observing 2 or fewer heads. This leaves a remnant of between 3 and 6 heads.

The visual to the right demonstrates how this works. It is important to note that to include the lower bound in the range, the value being subtracted should be one less than the lower bound. In this example, we wanted to know the probability from 3 to 6, which includes 3. Mathematically, this looks like the following equation:

\begin{aligned} P(3<=X<=6) = P(X<=6) - P(X<3)\\ \text{or} \\ P(3<=X<=6) = P(X<=6) - P(X<=2) \end{aligned}