Tutorials › Statistical Theory I - Probability and Distribution Theory › Endpoint Probabilities in Discrete and Continuous Laws

Discrete, Continuous, and Mixed Laws · Tutorial 58 of 994

Endpoint Probabilities in Discrete and Continuous Laws

Use CDF values and left limits to calculate interval probabilities correctly, with special care at points that carry probability mass.

Beginner 9 min read

What You'll Learn

  • Express probabilities for all four interval endpoint conventions using the CDF and its left limits.
  • Derive the probability of a point from the jump of a CDF.
  • Explain why changing an endpoint can change probability when it contains an atom.
  • Determine when endpoint choices do not affect an interval probability.
  • Work interval calculations for discrete and continuous distributions.

Why Interval Endpoints Matter

An interval probability asks whether a random variable falls between two specified values. The choice of whether to include either boundary can matter: if \(X\) has positive probability of equaling a boundary, including or excluding that point changes the event's probability. The distinction is invisible for laws that assign probability zero to every individual point, but it is essential for discrete laws.

The cumulative distribution function records probabilities up to and including a threshold. To recover probabilities for intervals with different endpoint conventions, we also need its left limit, which records the probability strictly below a threshold. Together, these quantities give a uniform way to handle closed, open, and half-open intervals.

CDF Values, Left Limits, and Point Probabilities

Definition: The cumulative distribution function (CDF) of a random variable \(X\) is \(F(x)=P(X\leq x)\). Its left limit at \(x\) is \(F(x-)=\lim_{t\uparrow x}F(t)\). In fact, \(F(x-)=P(X<x)\). The probability at the point \(x\), also called the atom at \(x\), is $$ P(X=x)=F(x)-F(x-). $$

The CDF includes the endpoint \(x\), whereas its left limit does not. The difference between them is therefore exactly the probability assigned to \(x\). When \(P(X=x)>0\), the CDF has a jump at \(x\); when \(P(X=x)=0\), its value at \(x\) agrees with its left limit.

Here is why the left-limit identity holds. If \(t_n\) increases to \(x\), the events \(\{X\leq t_n\}\) increase to \(\{X<x\}\). By continuity from below of probability, the probabilities of those events converge to \(P(X<x)\). Since \(F\) is nondecreasing, this limit is its left limit at \(x\).

The Four Interval Formulas

Let \(a<b\) be finite real numbers. The difference between two cumulative probabilities gives the probability between their thresholds, with endpoint inclusion determined by whether each boundary is represented by a CDF value or a left limit.

Theorem: For a random variable with CDF \(F\), and finite \(a<b\), $$ \begin{aligned} P(a<X\leq b)&=F(b)-F(a),\\ P(a\leq X\leq b)&=F(b)-F(a-),\\ P(a<X<b)&=F(b-)-F(a),\\ P(a\leq X<b)&=F(b-)-F(a-). \end{aligned} $$

For example, \(\{a<X\leq b\}\) is the portion of \(\{X\leq b\}\) left after removing \(\{X\leq a\}\). If the lower endpoint is included instead, remove only \(\{X<a\}\), whose probability is \(F(a-)\). If the upper endpoint is excluded, use \(\{X<b\}\), whose probability is \(F(b-)\). These event subtractions prove all four formulas; the derivation is written out below.

1
Start with the upper boundary.
The events \(\{X\leq b\}\) and \(\{X<b\}\) have probabilities \(F(b)\) and \(F(b-)\), respectively.
2
Remove values below the interval.
To retain \(X>a\), remove \(\{X\leq a\}\), of probability \(F(a)\). To retain \(X\geq a\), remove \(\{X<a\}\), of probability \(F(a-)\).
3
Subtract nested events.
In each case the removed event is contained in the upper-bound event, so the probability of the difference is the difference of their probabilities. This gives the four formulas.

The point-mass formula follows by another event subtraction: \(\{X\leq x\}\) is the disjoint union of \(\{X<x\}\) and \(\{X=x\}\). Thus \(F(x)=F(x-)+P(X=x)\). In particular, the amount contributed by a boundary is not determined by whether it is written with a bracket alone; it depends on the law of \(X\) at that point.

Worked Examples

Worked Example: A Discrete Law With Endpoint Atoms

Suppose \(X\) takes the values \(0,1,2\) with probabilities \(0.2,0.5,0.3\), respectively. Find the probabilities of \((0,2]\), \([0,2]\), \((0,2)\), and \([0,2)\).

The CDF has \(F(0)=0.2\), \(F(1)=0.7\), and \(F(2)=1\). The left limits are \(F(0-)=0\) and \(F(2-)=0.7\). Applying the formulas gives $$ \begin{aligned} P(0<X\leq 2)&=F(2)-F(0)=1-0.2=0.8,\\ P(0\leq X\leq 2)&=F(2)-F(0-)=1-0=1,\\ P(0<X<2)&=F(2-)-F(0)=0.7-0.2=0.5,\\ P(0\leq X<2)&=F(2-)-F(0-)=0.7-0=0.7. \end{aligned} $$ The checks from the possible values agree: \((0,2]\) contains 1 and 2, \([0,2]\) contains all three values, \((0,2)\) contains only 1, and \([0,2)\) contains 0 and 1. Including 0 adds \(0.2\), while including 2 adds \(0.3\).

Worked Example: A Half-Open Interval Under a Poisson Law

Let \(X\sim\operatorname{Poisson}(2)\), so \(P(X=k)=e^{-2}2^k/k!\) for nonnegative integers \(k\). Find \(P(1\leq X<4)\).

The allowed values are \(1,2,3\), so direct summation gives $$ \begin{aligned} P(1\leq X<4) &=P(X=1)+P(X=2)+P(X=3)\\ &=e^{-2}\left(2+\frac{4}{2!}+\frac{8}{3!}\right)\\ &=e^{-2}\left(2+2+\frac{4}{3}\right) =\frac{16}{3}e^{-2}\approx 0.7218. \end{aligned} $$ Equivalently, \(F(4-)=P(X\leq 3)\) and \(F(1-)=P(X\leq 0)=e^{-2}\). Therefore \(P(1\leq X<4)=F(4-)-F(1-)\), which gives the same result. The left limit at 4 is needed because the upper endpoint is excluded; the left limit at 1 is needed because the lower endpoint is included.

Worked Example: Endpoint Choices Under a Continuous Law

Let \(X\) have the uniform distribution on \([0,1]\), with density \(f(x)=1\) for \(0\leq x\leq 1\) and \(f(x)=0\) otherwise. Find the probabilities of \((0.2,0.7]\) and \([0.2,0.7)\), and compare them.

For \(0\leq x\leq 1\), \(F(x)=x\), so \(F(0.2)=F(0.2-)=0.2\) and \(F(0.7)=F(0.7-)=0.7\). Thus $$ \begin{aligned} P(0.2<X\leq 0.7)&=F(0.7)-F(0.2)=0.7-0.2=0.5,\\ P(0.2\leq X<0.7)&=F(0.7-)-F(0.2-)=0.7-0.2=0.5. \end{aligned} $$ The two probabilities agree because neither endpoint has positive point probability. The density also gives the same answer by integration over the interval: \(\int_{0.2}^{0.7}1\,dx=0.5\). Whether either endpoint is included does not change that integral.

Worked Example: An Interval With a Zero-Probability Boundary

Let \(X\) have the exponential distribution with rate 2, with CDF \(F(x)=1-e^{-2x}\) for \(x\geq 0\). Find \(P(1<X\leq 2)\), and explain what happens if 1 or 2 is included or excluded.

The CDF is continuous at 1 and 2, so \(F(1-)=F(1)\) and \(F(2-)=F(2)\). Therefore $$ P(1<X\leq 2)=F(2)-F(1) =(1-e^{-4})-(1-e^{-2}) =e^{-2}-e^{-4}\approx 0.1170. $$ The same probability results for \([1,2]\), \((1,2)\), and \([1,2)\), since both endpoints have probability zero. This differs from the discrete example, where adding or removing a boundary value changed the event probability.

When Endpoint Choices Do Not Matter

Theorem: If \(P(X=x)=0\) for every real \(x\), then changing either endpoint of any finite interval from open to closed does not change its probability. In particular, this holds for a random variable with a density.

To verify the theorem, changing whether the lower endpoint \(a\) is included changes the event only by the singleton event \(\{X=a\}\). Changing whether the upper endpoint \(b\) is included changes it only by \(\{X=b\}\). By assumption, each singleton has probability zero. The symmetric difference between any two versions of the interval is contained in \(\{X=a\}\cup\{X=b\}\), which has probability at most \(P(X=a)+P(X=b)=0\). Therefore the interval probabilities agree.

If \(X\) has a density \(f\), then probabilities are obtained by integrating that density. A singleton has probability \(\int_x^x f(t)\,dt=0\), so the theorem applies. More generally, the theorem's condition is absence of point masses; the conclusion does not require that a density exist.

Common Mistake: Using the Same Endpoint Convention Everywhere

A frequent error is to subtract CDF values without checking which endpoints the event includes. For instance, \(F(b)-F(a)\) is \(P(a<X\leq b)\), not \(P(a\leq X\leq b)\). If \(X\) has an atom at \(a\), this calculation omits exactly \(P(X=a)\). Conversely, using \(F(b)-F(a-)\) for an interval that excludes \(a\) incorrectly adds that atom.

A reliable correction is to translate the written interval into event language first: “upper included” means \(X\leq b\), “upper excluded” means \(X<b\); “lower excluded” removes \(X\leq a\), and “lower included” removes only \(X<a\). Then choose \(F\) or \(F(\cdot-)\) accordingly. As a final check, verify that the answer lies between 0 and 1 and, when possible, compare it with a direct sum or integral.

Key takeaway: Use \(F(x)\) for probability up to and including \(x\), and \(F(x-)\) for probability strictly below \(x\). Their difference is the mass at \(x\). Endpoint conventions can be ignored only when the relevant endpoints have zero point probability.

Check Your Understanding

Use CDF values, left limits, or direct event reasoning to answer the following.

  1. Write \(P(a<X<b)\) in terms of \(F\) and left limits.
  2. A random variable has \(F(3)=0.8\) and \(F(3-)=0.6\). What is \(P(X=3)\)?
  3. For a discrete random variable, why might \(P(a\leq X\leq b)\) differ from \(P(a<X\leq b)\)?
  4. If \(X\) has a density, explain why \(P(a<X<b)=P(a\leq X\leq b)\).
  5. Suppose \(F(5)=0.9\) and \(F(2-)=0.1\). Find \(P(2\leq X\leq 5)\).