Why CDF Differences Give Interval Probabilities
A cumulative distribution function records the probability that a random variable is at or below a specified value. Comparing its values at two points therefore gives a way to find the probability that the variable falls between them. This calculation is useful even when a distribution has no density or when its probabilities are not described by a simple formula.
The subtraction has a precise event interpretation: the outcomes counted by the CDF at the lower bound are removed from those counted at the upper bound. The remaining outcomes are exactly those in the bounded interval.
The CDF-Difference Formula
Suppose \(a\le b\). Every outcome for which \(X\le a\) also satisfies \(X\le b\), so the event \(\{X\le a\}\) is contained in \(\{X\le b\}\). The outcomes counted by the second event but not the first are precisely those for which \(a<X\le b\).
Here the identity follows from probability additivity; it does not require \(X\) to have a density, and it does not require the CDF to be continuous at either bound.
\(\{X\le b\}\) has probability \(F(b)\).
\(\{X\le a\}\) is contained in \(\{X\le b\}\) and has probability \(F(a)\).
The set difference is \(\{X\le b\}\setminus\{X\le a\}=\{a<X\le b\}\).
This decomposition also explains the roles of the two CDF values. \(F(b)\) counts outcomes at or below \(b\). Subtracting \(F(a)\) removes outcomes at or below \(a\), leaving those strictly above \(a\) and at or below \(b\). The formula works for a distribution with point masses as well as for a continuous distribution.
Worked Applications
To calculate an interval probability, identify the two bounds, evaluate the CDF at each bound, and subtract the lower-bound value from the upper-bound value. When possible, check the result against the outcomes or model that define the distribution.
Worked Example: A Discrete Distribution
Suppose \(X\) takes the values \(-2,1,3,5\) with probabilities \(0.10,0.25,0.40,0.25\), respectively. Find \(P(0<X\le3)\).
The event \(\{X\le 3\}\) includes the values \(-2,1,3\), so
The event \(\{X\le0\}\) includes only the value \(-2\), so \(F(0)=0.10\). Therefore,
Check directly: the values of \(X\) satisfying \(0<X\le3\) are 1 and 3. Their probabilities add to \(0.25+0.40=0.65\), as required.
Worked Example: A Uniform Distribution
Let \(X\) have a uniform distribution on the interval from 0 to 8. Its CDF is \(F(x)=0\) for \(x<0\), \(F(x)=x/8\) for \(0\le x\le8\), and \(F(x)=1\) for \(x>8\). Find \(P(2<X\le6)\).
Both bounds lie between 0 and 8, so the middle expression for the CDF applies:
Subtracting gives
As a check, the interval has length \(6-2=4\) out of the full range length \(8\), and \(4/8=0.50\). The CDF calculation gives the same answer.
Worked Example: A Distribution With Both an Atom and a Continuous Component
Suppose a random variable has probability \(0.20\) at 0 and, with probability \(0.80\), follows a uniform distribution on \([0,4]\). Its CDF is
Find \(P(1<X\le3)\). Both bounds are in the middle range of the CDF, so
and
Thus
The same result follows from the mixture description: the atom at 0 is outside the interval, while the uniform component contributes \(0.80\) times the fraction \((3-1)/4=1/2\). This is \(0.80(1/2)=0.40\). The agreement illustrates that CDF subtraction applies without separating a distribution into types.
Adjacent Intervals and a Check on Calculations
The formula also ensures that probabilities across adjacent pieces combine correctly. If an interval is split at an intermediate point \(c\), where \(a<c<b\), then the two pieces \(\{a<X\le c\}\) and \(\{c<X\le b\}\) are disjoint and together make up \(\{a<X\le b\}\).
Indeed, applying the CDF-difference formula to each piece gives
The middle CDF value cancels. More generally, for any finite partition \(a=t_0<t_1<\cdots<t_k=b\), the probabilities of the adjacent pieces add to the probability of the whole interval:
The cancellation in this sum is called telescoping: every intermediate term \(F(t_i)\) appears once with a plus sign and once with a minus sign. This provides a useful check when an interval probability is calculated in pieces.
Common Mistake and Practical Checks
A common error is to subtract in the wrong order, writing \(F(a)-F(b)\). Since a CDF is nondecreasing and \(a\le b\), \(F(a)\le F(b)\). The reversed subtraction is therefore nonpositive, which cannot be the probability of an event unless the difference happens to be zero. Use upper-bound CDF value minus lower-bound CDF value.
Another mistake is to treat a CDF value as if it were the probability of the interval ending at that point. By definition, \(F(b)\) includes all outcomes at or below \(b\), not just outcomes in the interval of interest. The lower-bound term is needed to remove the outcomes that are too small.
Before accepting a result, check that \(F(b)\) and \(F(a)\) were evaluated from the appropriate parts of the CDF, that the subtraction is in the correct order, and that the answer is between 0 and 1. Monotonicity gives \(F(b)-F(a)\ge0\), and the fact that this difference is a probability gives \(F(b)-F(a)\le1\). If the interval is divided into pieces, their probabilities should sum to the same total.
Check Your Understanding
Use the CDF-difference formula and the event interpretation to answer these questions.
- If \(F(5)=0.82\) and \(F(2)=0.37\), what is \(P(2<X\le5)\)?
- A random variable takes values 0, 2, and 6 with probabilities 0.20, 0.50, and 0.30. Calculate \(P(1<X\le6)\) using CDF values, then check by identifying the possible values in the event.
- Why is \(F(b)-F(a)\), rather than \(F(a)-F(b)\), the appropriate subtraction when \(a<b\)?
- If \(a<c<b\), explain why the probabilities of \(\{a<X\le c\}\) and \(\{c<X\le b\}\) add to \(P(a<X\le b)\).
- What basic probability check can you apply to a computed value of \(F(b)-F(a)\), and which property of a CDF supports it?