Tutorials › Statistical Theory I - Probability and Distribution Theory › Worked Problems With CDFs and Intervals

Random Variables and Distribution Functions · Tutorial 49 of 994

Worked Problems With CDFs and Intervals

Learn to choose the correct CDF value or left limit for each endpoint, and to recognize when the information given does not determine a requested probability.

Beginner 9 min read

What You'll Learn

  • Translate between CDF values and probabilities at strict or weak thresholds.
  • Use left limits to find probabilities below an endpoint and at a point.
  • Calculate probabilities for intervals with each combination of open and closed endpoints.
  • Track which interval probabilities are determined by incomplete CDF information.
  • Check interval calculations by accounting for endpoint inclusion and exclusion.

From CDF Values to Endpoint Decisions

A CDF calculation is often short once the endpoints are handled correctly. The challenge is to match each endpoint choice to the appropriate quantity: a CDF value, a left limit, or both. In particular, \(F(x)\) includes probability at \(x\), whereas the left limit \(F(x-)\) does not. This distinction determines whether an interval includes an endpoint and whether a point probability can be calculated.

Write \(F(x)=P(X\le x)\). The formulas below make the endpoint choices explicit. They apply to any real-valued random variable, whether or not its distribution has point masses. No density or mass function is needed.

Endpoint formulas: For real numbers \(a<b\), \(P(X<x)=F(x-)\), \(P(X=x)=F(x)-F(x-)\), and $$ \begin{aligned} P(a<X\le b)&=F(b)-F(a),\\ P(a\le X\le b)&=F(b)-F(a-),\\ P(a<X<b)&=F(b-)-F(a),\\ P(a\le X<b)&=F(b-)-F(a-). \end{aligned} $$

The pattern is systematic. At a right endpoint, use \(F(b)\) when the interval includes \(b\), and \(F(b-)\) when it excludes \(b\). At a left endpoint, subtract \(F(a)\) when the interval excludes \(a\), and subtract \(F(a-)\) when it includes \(a\). The subtraction removes all probability strictly below the interval, while the choice of left limit determines whether the endpoint itself is removed.

Why the Left Limit Works

The left limit has a direct probability interpretation. For any real \(x\), let \(x_n=x-1/n\). The events \(\{X\le x_n\}\) increase as \(n\) increases, and their union is \(\{X<x\}\): every value of \(X\) strictly below \(x\) is eventually no greater than \(x-1/n\), while \(X=x\) is never included. By continuity of probability for increasing events,

$$ F(x-)=\lim_{n\to\infty}F(x-1/n) =\lim_{n\to\infty}P(X\le x-1/n) =P(X<x). $$

Subtracting \(P(X<x)\) from \(P(X\le x)\) gives the point probability. The interval identities follow by subtracting the probability below the interval from the probability up to its right endpoint. The set differences make the endpoint choices transparent.

Derivation: The event \(\{a<X\le b\}\) is \(\{X\le b\}\setminus\{X\le a\}\), so its probability is \(F(b)-F(a)\). Replacing the removed event by \(\{X<a\}\) gives \(\{a\le X\le b\}\) and probability \(F(b)-F(a-)\). For an open right endpoint, replace \(\{X\le b\}\) by \(\{X<b\}\), whose probability is \(F(b-)\). These two choices give \(P(a<X<b)=F(b-)-F(a)\) and \(P(a\le X<b)=F(b-)-F(a-)\). Finally, \(\{X=x\}=\{X\le x\}\setminus\{X<x\}\), so \(P(X=x)=F(x)-F(x-)\). \(\square\)

These formulas are not assumptions about a particular type of distribution. A CDF can jump at an endpoint, remain flat over an interval, or change continuously there. The formulas work in all these cases; what changes is the numerical relationship between \(F(x)\) and \(F(x-)\).

Worked Problems With Complete and Incomplete Information

Worked Example: Find What the Given Values Determine

Suppose \(F(-1-)=0.10\), \(F(-1)=0.25\), and \(F(2)=0.70\). No value for \(F(2-)\) is supplied. Determine which of the following probabilities can be calculated: \(P(-1\le X\le2)\), \(P(-1<X\le2)\), \(P(-1<X<2)\), and \(P(-1\le X<2)\).

For the closed interval, the left endpoint is included and the right endpoint is included. Therefore,

$$ P(-1\le X\le2)=F(2)-F(-1-)=0.70-0.10=0.60. $$

This probability is determined even though \(F(2-)\) is unknown. For an open left endpoint and a closed right endpoint,

$$ P(-1<X\le2)=F(2)-F(-1)=0.70-0.25=0.45. $$

This probability is also determined. In contrast, both intervals with an open right endpoint require the left limit at 2:

$$ \begin{aligned} P(-1<X<2)&=F(2-)-F(-1)=F(2-)-0.25,\\ P(-1\le X<2)&=F(2-)-F(-1-)=F(2-)-0.10. \end{aligned} $$

Neither value can be evaluated numerically from the supplied information. The value \(F(2)=0.70\) does not tell us \(F(2-)\) unless the jump at 2 is also known. Thus the first two requested probabilities are determined, while the latter two are not. In particular, missing endpoint information does not make every interval probability involving that endpoint unknowable.

Worked Example: Calculate All Endpoint Versions From Left Limits

Suppose the CDF information at two points is \(F(-1-)=0.10\), \(F(-1)=0.25\), \(F(2-)=0.60\), and \(F(2)=0.70\). Calculate the probability of each of the four intervals with endpoints \(-1\) and \(2\), and find the point probability at 2.

For the open-left, closed-right interval, use \(F(2)-F(-1)\):

$$ P(-1<X\le2)=0.70-0.25=0.45. $$

Closing the left endpoint changes the subtracted quantity from \(F(-1)\) to \(F(-1-)\):

$$ P(-1\le X\le2)=0.70-0.10=0.60. $$

Opening the right endpoint changes the first quantity from \(F(2)\) to \(F(2-)\). Thus,

$$ \begin{aligned} P(-1<X<2)&=0.60-0.25=0.35,\\ P(-1\le X<2)&=0.60-0.10=0.50. \end{aligned} $$

The point probability at 2 is the jump there:

$$ P(X=2)=F(2)-F(2-)=0.70-0.60=0.10. $$

As a check, adding \(P(X=2)=0.10\) to \(P(-1<X<2)=0.35\) gives \(P(-1<X\le2)=0.45\). Adding the probability at \(-1\), \(F(-1)-F(-1-)=0.25-0.10=0.15\), to \(P(-1<X<2)=0.35\), and then adding the point probability at 2, gives \(0.15+0.35+0.10=0.60\), the probability of the closed interval.

Worked Example: Read Intervals From a Piecewise CDF

Consider the following CDF, supplied as a function:

$$ F(x)= \begin{cases} 0, & x<0,\\ \frac{1}{5}+\frac{x}{5}, & 0\le x<2,\\ \frac{4}{5}, & 2\le x<4,\\ 1, & x\ge4. \end{cases} $$

First record the endpoint values and left limits needed for the questions. At 0, \(F(0-)=0\) and \(F(0)=1/5\). At 1, \(F(1)=1/5+1/5=2/5\). At 2, the left limit is \(F(2-)=1/5+2/5=3/5\), while \(F(2)=4/5\). At 4, \(F(4-)=4/5\) and \(F(4)=1\).

For an interval open at 0 and open at 2, use the left limit at 2 and the CDF value at 0:

$$ P(0<X<2)=F(2-)-F(0)=\frac{3}{5}-\frac{1}{5}=\frac{2}{5}. $$

For the closed interval from 0 to 2, the left endpoint is included, so subtract \(F(0-)\); the right endpoint is included, so use \(F(2)\):

$$ P(0\le X\le2)=F(2)-F(0-)=\frac{4}{5}-0=\frac{4}{5}. $$

The interval \([2,4)\) includes 2 and excludes 4, giving

$$ P(2\le X<4)=F(4-)-F(2-)=\frac{4}{5}-\frac{3}{5}=\frac{1}{5}. $$

Finally, the probability at 4 is the jump there:

$$ P(X=4)=F(4)-F(4-)=1-\frac{4}{5}=\frac{1}{5}. $$

The arithmetic is consistent with the interval calculations: \(P(2\le X\le4)=F(4)-F(2-)=1-3/5=2/5\), which equals \(P(2\le X<4)+P(X=4)=1/5+1/5\). Checking how an interval changes when an endpoint is added is a useful way to catch a mistaken limit.

A Reliable Calculation Routine

Before substituting numbers, rewrite the probability event and mark each endpoint as open or closed. Then choose \(F\) or \(F(\cdot-)\) separately at each endpoint. This avoids a frequent error: treating an interval's two endpoints symmetrically, even though one is added through a CDF term and the other is subtracted.

1
Write the event precisely.
For example, distinguish \(a<X\le b\) from \(a\le X<b\) before using any values.
2
Choose the right-end quantity.
Use \(F(b)\) if \(b\) is included and \(F(b-)\) if \(b\) is excluded.
3
Choose the left-end quantity to subtract.
Subtract \(F(a)\) if \(a\) is excluded and \(F(a-)\) if \(a\) is included.
4
Check sufficiency and consistency.
Confirm that the needed values or left limits were actually provided, then check that the probability is between 0 and 1 and that adding or removing endpoint probabilities gives the expected change.

Common Mistakes and Why They Fail

  • Using \(F(x)\) for a strict threshold. Since \(F(x)=P(X\le x)\), it includes \(X=x\). For \(P(X<x)\), use \(F(x-)\).
  • Assuming \(F(x-)=F(x)\) without justification. They are equal when there is no point probability at \(x\), but a CDF can jump. If the jump is not known, an open-endpoint probability may remain undetermined.
  • Declaring every probability involving an endpoint unknown when a left limit is missing. Some expressions require \(F(x-)\), but others require only \(F(x)\) and a left limit at the other endpoint. Check the formula for the particular interval before concluding information is insufficient.
  • Subtracting the wrong quantity at the left endpoint. An included left endpoint requires subtracting the probability strictly below it, \(F(a-)\), not \(F(a)\).
  • Assuming an open endpoint has probability zero. An open endpoint excludes any probability at that point; it does not establish that such probability is zero.
Key takeaway: For an interval probability, the right endpoint determines whether the first term is \(F(b)\) or \(F(b-)\), and the left endpoint determines whether the subtracted term is \(F(a)\) or \(F(a-)\). If a required value is missing, report exactly which probabilities remain undetermined rather than discarding information that does determine others.

Check Your Understanding

For each question, identify the CDF value or left limit required before calculating.

  1. Express \(P(X\le c)\) and \(P(X<c)\) in terms of \(F\).
  2. If \(F(3-)=0.40\) and \(F(3)=0.55\), find \(P(X=3)\).
  3. Write a formula for \(P(a\le X<b)\), where \(a<b\).
  4. Suppose \(F(a-)=0.12\), \(F(a)=0.20\), and \(F(b)=0.68\), but \(F(b-)\) is not given. Which of \(P(a\le X\le b)\) and \(P(a\le X<b)\) can be calculated?
  5. Explain why knowing \(F(b)\) alone does not generally determine \(P(a<X<b)\).