Tutorials › Statistical Theory I - Probability and Distribution Theory › Common CDF Endpoint Mistakes

Random Variables and Distribution Functions · Tutorial 48 of 994

Common CDF Endpoint Mistakes

Use the CDF and its left limits to calculate event probabilities without losing or adding endpoint masses.

Beginner 10 min read

What You'll Learn

  • Distinguish \(P(X<x)\) from \(P(X\le x)\) using the CDF and its left limit.
  • Match each interval’s endpoint inclusion to the correct CDF difference.
  • Check whether an endpoint contributes a point mass before subtracting.
  • Handle equal interval endpoints separately from the case \(a<b\).
  • Diagnose common errors by identifying the event a mistaken subtraction actually represents.

Why CDF Endpoint Choices Matter

An interval probability depends on more than its numerical endpoints: it also depends on whether each endpoint is included. When a random variable can have positive probability at an endpoint, confusing \(X<x\) with \(X\le x\) changes the answer. A CDF calculation can therefore look plausible while quietly counting an endpoint twice, omitting it, or including the wrong one.

The reliable approach is to translate the event into the exact half-line probabilities it uses, then subtract. This tutorial focuses on that bookkeeping: reading strict and weak thresholds, choosing the correct CDF values for intervals, and treating equality of the two endpoints as a separate case.

Definition: For a real-valued random variable \(X\), its cumulative distribution function is \(F(x)=P(X\le x)\). Its left limit at \(x\) is denoted by \(F(x-)\); it satisfies \(F(x-)=P(X<x)\). In particular, the point probability at \(x\) is \(P(X=x)=F(x)-F(x-)\).

The distinction between \(F(x)\) and \(F(x-)\) matters exactly when there is positive probability at \(x\). If \(P(X=x)=0\), the two values agree. If there is a point mass, \(F(x)\) includes it and \(F(x-)\) does not.

Strict and Weak Thresholds

Before calculating an interval probability, identify which half-line each endpoint describes. The four basic threshold probabilities are:

$$ \begin{aligned} P(X<x)&=F(x-), & P(X\le x)&=F(x),\\ P(X>x)&=1-F(x), & P(X\ge x)&=1-F(x-). \end{aligned} $$

For the upper-tail identities, take complements: the complement of \(\{X>x\}\) is \(\{X\le x\}\), while the complement of \(\{X\ge x\}\) is \(\{X<x\}\). A common endpoint error is to use \(1-F(x)\) for \(P(X\ge x)\); that instead gives \(P(X>x)\), excluding any mass at \(x\).

Worked Example: Strict Versus Weak Thresholds

Suppose \(X\) takes the values \(-1,0,2\) with probabilities \(0.2,0.5,0.3\), respectively. Calculate \(P(X<0)\), \(P(X\le0)\), \(P(X>0)\), and \(P(X\ge0)\).

The probability strictly below zero is the mass at \(-1\): \(P(X<0)=0.2\). The probability at or below zero also includes the mass at zero, so \(P(X\le0)=0.2+0.5=0.7\).

The probability strictly above zero is the mass at \(2\), giving \(P(X>0)=0.3\). At or above zero includes both zero and \(2\), so \(P(X\ge0)=0.5+0.3=0.8\).

Equivalently, \(F(0-)=0.2\) and \(F(0)=0.7\). Thus \(P(X<0)=F(0-)\), \(P(X\le0)=F(0)\), \(P(X>0)=1-F(0)=0.3\), and \(P(X\ge0)=1-F(0-)=0.8\). The difference, \(F(0)-F(0-)=0.5\), is precisely the probability at zero.

Interval Probabilities: Match Both Endpoints

For \(a<b\), each endpoint convention has its own CDF difference. The lower endpoint determines which value is subtracted; the upper endpoint determines which value is used first.

Event, for \(a<b\)Probability
\(a<X\le b\)\(F(b)-F(a)\)
\(a\le X\le b\)\(F(b)-F(a-)\)
\(a<X<b\)\(F(b-)-F(a)\)
\(a\le X<b\)\(F(b-)-F(a-)\)

A useful memory aid is to read the interval from left to right. At the upper endpoint, use \(F(b)\) when \(b\) is included and \(F(b-)\) when it is excluded. At the lower endpoint, subtract \(F(a)\) when \(a\) is excluded and subtract \(F(a-)\) when \(a\) is included. The apparently reversed choice at the lower endpoint is necessary: subtracting \(F(a-)\) retains the mass at \(a\), while subtracting \(F(a)\) removes it.

Theorem: For any real-valued random variable \(X\) and finite \(a<b\), the four interval identities in the table hold. When \(a=b\), handle the events separately: \(P(a<X<a)=0\), \(P(a<X\le a)=0\), \(P(a\le X<a)=0\), and \(P(a\le X\le a)=P(X=a)=F(a)-F(a-)\).

The restriction \(a<b\) in the table is essential. When \(a=b\), some of the open or half-open intervals are empty, and a difference intended for a nonempty interval need not give zero. In particular, do not apply \(F(b-)-F(a)\) to \(a<X<b\) with \(a=b\): it would equal \(F(a-)-F(a)=-P(X=a)\), which is negative if there is an atom at \(a\).

Why the Interval Identities Hold

For \(a<b\), the interval formulas follow by subtracting nested half-lines. For example, \(\{X\le b\}\) consists of \(\{X\le a\}\) together with the disjoint event \(\{a<X\le b\}\). Therefore \(P(X\le b)=P(X\le a)+P(a<X\le b)\), which gives the first identity.

The same argument works with strict thresholds. The event \(\{X<b\}\) is the disjoint union of \(\{X<a\}\) and \(\{a\le X<b\}\). And \(\{X<b\}\) is also the disjoint union of \(\{X\le a\}\) and \(\{a<X<b\}\). These decompositions explain why changing whether an endpoint is included changes which CDF value appears.

Proof: Since \(a<b\), the following are disjoint decompositions: $$ \begin{aligned} \{X\le b\}&=\{X\le a\}\,\dot\cup\,\{a<X\le b\},\\ \{X\le b\}&=\{X<a\}\,\dot\cup\,\{a\le X\le b\},\\ \{X<b\}&=\{X\le a\}\,\dot\cup\,\{a<X<b\},\\ \{X<b\}&=\{X<a\}\,\dot\cup\,\{a\le X<b\}. \end{aligned} $$ Taking probabilities and using \(P(X\le x)=F(x)\) and \(P(X<x)=F(x-)\) yields, respectively, $$ \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} $$ If \(a=b\), then \(a<X<a\), \(a<X\le a\), and \(a\le X<a\) are empty events, while \(\{a\le X\le a\}=\{X=a\}\). The stated equal-endpoint probabilities follow, and \(P(X=a)=F(a)-F(a-)\). \(\square\)

Worked Interval Calculations

Worked Example: Keeping an Atom at the Lower Endpoint

Let \(X\) take the values \(0,1,2,4\) with probabilities \(0.1,0.25,0.4,0.25\). Find each of the four probabilities for the endpoints \(a=1\) and \(b=2\).

The relevant CDF values are \(F(1-)=0.1\), \(F(1)=0.1+0.25=0.35\), \(F(2-)=0.35\), and \(F(2)=0.35+0.4=0.75\). Since \(1<2\), the four interval formulas apply.

For \(1<X\le2\), only the outcome \(2\) qualifies. The formula confirms this: \(F(2)-F(1)=0.75-0.35=0.40\).

For \(1\le X\le2\), both \(1\) and \(2\) qualify: \(F(2)-F(1-)=0.75-0.1=0.65\).

For \(1<X<2\), neither endpoint is included, and there is no possible value strictly between them: \(F(2-)-F(1)=0.35-0.35=0\).

For \(1\le X<2\), only the outcome \(1\) qualifies: \(F(2-)-F(1-)=0.35-0.1=0.25\). Each result agrees with the outcomes in the event, so the endpoint choices and arithmetic are consistent.

Worked Example: Equal Endpoints Are a Separate Case

Use the same distribution, but set \(a=b=1\). Find the probabilities for all four endpoint conventions.

The events \(1<X\le1\), \(1\le X<1\), and \(1<X<1\) are empty, so each has probability \(0\). The event \(1\le X\le1\) is exactly \(\{X=1\}\), whose probability is \(0.25\).

The point-mass identity gives the same answer: \(F(1)-F(1-)=0.35-0.1=0.25\). Using the open-interval formula from the \(a<b\) table here would instead give \(F(1-)-F(1)=0.1-0.35=-0.25\). That negative value is a warning that the formula is being used outside its stated condition, not a probability.

Diagnosing a Wrong Subtraction

If a proposed CDF difference seems wrong, do not just swap terms until the result looks plausible. First identify the event represented by the expression. For example, \(F(b)-F(a)\) always represents \(P(a<X\le b)\). It does not represent \(P(a\le X<b)\), which uses \(F(b-)-F(a-)\). Describing the mistaken expression’s actual event often reveals exactly which endpoint was lost or added.

Worked Example: Finding the Event Behind a Mistake

Suppose \(X\) takes values \(-2,0,3,5\) with probabilities \(0.15,0.35,0.2,0.3\). A calculation claims that \(P(0\le X<5)=F(5)-F(0)\). Find the correct probability and explain what the proposed difference calculates.

The event \(0\le X<5\) contains outcomes \(0\) and \(3\), so its probability is \(0.35+0.2=0.55\). The correct formula is \(F(5-)-F(0-)\). Here \(F(5-)=0.15+0.35+0.2=0.7\) and \(F(0-)=0.15\), giving \(0.7-0.15=0.55\).

The proposed difference uses \(F(5)=1\) and \(F(0)=0.15+0.35=0.5\), so it equals \(1-0.5=0.5\). But \(F(5)-F(0)\) calculates \(P(0<X\le5)\), which includes \(3\) and \(5\) and excludes \(0\). Its value is \(0.2+0.3=0.5\). The error has both removed the mass at the lower endpoint and included the mass at the upper endpoint.

A Reliable Endpoint Check

A quick check is to compare the CDF expression with the endpoint masses. Including a lower endpoint should retain its point mass; excluding it should remove that mass. Including an upper endpoint should retain its point mass; excluding it should remove that mass. When an endpoint has probability zero, these checks may not change the numerical answer, but the event and the formula still need to match.

1
Write the event precisely.
Mark each endpoint as included or excluded before selecting any CDF values.
2
Translate the upper endpoint.
Use \(F(b)\) for \(X\le b\) and \(F(b-)\) for \(X<b\).
3
Translate the lower endpoint.
Subtract \(F(a)\) when \(X>a\), and subtract \(F(a-)\) when \(X\ge a\).
4
Check the endpoint case.
If \(a=b\), identify whether the event is empty or the singleton \(\{X=a\}\); do not apply an interval formula stated only for \(a<b\).

The main practical lesson is that CDF subtraction is event subtraction. The expression is only correct when the half-lines being subtracted leave exactly the desired event. Explicitly checking the event prevents a common mistake: memorizing a difference without remembering which endpoints it includes.

Common Mistakes

  • Using \(F(x)\) for a strict threshold. \(F(x)=P(X\le x)\), so \(P(X<x)=F(x-)\). The difference matters if \(P(X=x)>0\).
  • Subtracting the wrong lower-end value. Subtracting \(F(a)\) removes the mass at \(a\); subtracting \(F(a-)\) does not. Match that choice to whether the lower endpoint is excluded or included.
  • Using the upper-end CDF value when the upper endpoint is excluded. \(F(b)\) includes the mass at \(b\); use \(F(b-)\) when the event requires \(X<b\).
  • Applying a formula for \(a<b\) when \(a=b\). Check the event directly. Three endpoint conventions give an empty event, and the fully closed interval gives the point probability.
  • Accepting a negative result as a probability. Probabilities cannot be negative. Recheck both the endpoint convention and the condition under which the formula applies.
Key takeaway: \(F(x)\) includes the mass at \(x\), while \(F(x-)\) excludes it. For interval calculations, choose each CDF value from the event’s endpoint convention, and handle \(a=b\) separately from \(a<b\).

Check Your Understanding

For each question, pay attention to whether an endpoint is included.

  1. In terms of \(F\) and \(F(x-)\), write \(P(X\ge x)\). Which point mass would be omitted if you used \(1-F(x)\) instead?
  2. For \(a<b\), write the CDF difference for \(P(a\le X<b)\). Explain why its lower-end term is a left limit.
  3. If \(a=b\), what are \(P(a<X<a)\) and \(P(a\le X\le a)\)?
  4. A proposed calculation for \(P(a<X\le b)\) is \(F(b-)-F(a)\), with \(a<b\). Identify the event that this expression actually represents.
  5. Suppose \(F(c)=0.6\) and \(F(c-)=0.4\). Find \(P(X=c)\), \(P(X\le c)\), and \(P(X<c)\).