Tutorials › Measure Theory › Cumulative Distribution Functions

Probability Spaces and Random Variables · Tutorial 732 of 798

Cumulative Distribution Functions

Learn how a random variable’s cumulative distribution function encodes its point masses and interval probabilities, and why its defining properties hold.

Intermediate 11 min read

What You'll Learn

  • Define a cumulative distribution function from the law of a real-valued random variable.
  • Prove monotonicity, right-continuity, and the limits at positive and negative infinity.
  • Relate the left limit and jump of the function at a point to probabilities of strict inequalities and point masses.
  • Recover probabilities of intervals while keeping track of open and closed endpoints.
  • Compute and check cumulative distribution functions in finite, uniform, and countable models.

From a Random Variable to a Cumulative Distribution Function

A cumulative distribution function records how much probability lies to the left of each real threshold. Its definition uses a non-strict inequality, so the value at a threshold includes any probability concentrated exactly there. This endpoint convention is essential: it determines the function’s continuity properties and the formulas for interval probabilities.

Throughout, let \((\Omega,\mathcal{F},\mathbb{P})\) be a probability space, so \(\mathbb{P}(\Omega)=1\), and let \(X:\Omega\to\mathbb{R}\) be a real-valued measurable random variable. Its law is the probability measure \(\mu_X\) on \((\mathbb{R},\mathcal{B}_{\mathbb{R}})\) defined by \(\mu_X(B)=\mathbb{P}(X\in B)\) for each Borel set \(B\). In particular, \(\mu_X((-\infty,x])=\mathbb{P}(X\le x)\). All probabilities below refer to \(\mathbb{P}\), and all functions \(F\) take real values.

Definition: The cumulative distribution function (CDF) of \(X\), or equivalently of its law \(\mu_X\), is \(F:\mathbb{R}\to[0,1]\) defined by \(F(x)=\mathbb{P}(X\le x)=\mu_X((-\infty,x])\) for every \(x\in\mathbb{R}\).

We use continuity of probability for event sequences: if \(A_n\) increase to \(A\), then \(\mathbb{P}(A_n)\to\mathbb{P}(A)\); if \(A_n\) decrease to \(A\), then \(\mathbb{P}(A_n)\to\mathbb{P}(A)\), since \(\mathbb{P}(\Omega)<\infty\). These continuity properties hold on the probability space just specified.

Worked Example: A Finite Probability Model

Let \(\Omega=\{a,b,c,d\}\), with every subset measurable and probabilities \(\mathbb{P}(\{a\})=1/8\), \(\mathbb{P}(\{b\})=3/8\), \(\mathbb{P}(\{c\})=1/4\), and \(\mathbb{P}(\{d\})=1/4\). These weights sum to \(1/8+3/8+1/4+1/4=1\). Set \(X(a)=-1\), \(X(b)=X(c)=0\), and \(X(d)=2\).

For \(x<-1\), no outcome has \(X\le x\), so \(F(x)=0\). For \(-1\le x<0\), only \(a\) is counted, giving \(F(x)=1/8\). For \(0\le x<2\), the outcomes \(a,b,c\) are counted, giving \(F(x)=1/8+3/8+1/4=3/4\). For \(x\ge2\), all outcomes are counted and \(F(x)=1\). Thus

$$ F(x)= \begin{cases} 0,&x<-1,\\ \frac18,&-1\le x<0,\\ \frac34,&0\le x<2,\\ 1,&x\ge2. \end{cases} $$

Check: \(F(0)=3/4=\mathbb{P}(X= -1)+\mathbb{P}(X=0)=1/8+3/8+1/4\). Also, \(\mathbb{P}(-1<X\le2)=3/8+1/4+1/4=7/8\); the interval formula proved below gives \(F(2)-F((-1)-)=1-0=1\) only if the lower endpoint is included incorrectly, so we instead use \(F(2)-F(-1)=1-1/8=7/8\), as required.

Basic Properties and Their Proofs

Theorem: For the CDF \(F\) of a real-valued random variable on a probability space, the following hold:
  • Monotonicity: if \(x\le y\), then \(F(x)\le F(y)\).
  • Right-continuity: if \(x_n\downarrow x\), then \(F(x_n)\to F(x)\).
  • Limits at infinity: \(\lim_{x\to-\infty}F(x)=0\) and \(\lim_{x\to+\infty}F(x)=1\).

Proof. Suppose \(x\le y\). Then \(\{X\le x\}\subseteq\{X\le y\}\), so monotonicity of probability gives \(F(x)\le F(y)\). For right-continuity, let \(x_n\downarrow x\). The events \(\{X\le x_n\}\) decrease, and their intersection is \(\{X\le x\}\): an outcome with \(X\le x\) belongs to every event, while if \(X>x\), then \(x_n<X\) for some sufficiently large \(n\). Continuity of probability from above therefore gives \(F(x_n)\to F(x)\).

For the limit at positive infinity, the events \(\{X\le n\}\), for positive integers \(n\), increase to \(\Omega\), because \(X\) is real-valued. Continuity from below gives \(F(n)\to\mathbb{P}(\Omega)=1\). Monotonicity then implies \(\lim_{x\to+\infty}F(x)=1\): for any \(\varepsilon>0\), choose \(n\) with \(F(n)>1-\varepsilon\); whenever \(x\ge n\), \(1\ge F(x)\ge F(n)>1-\varepsilon\).

For the limit at negative infinity, \(\{X\le -n\}\) decrease to the empty set, since no real number is at most \(-n\) for every positive integer \(n\). Continuity from above gives \(F(-n)\to0\). For any \(\varepsilon>0\), choose \(n\) with \(F(-n)<\varepsilon\). If \(x\le-n\), then \(0\le F(x)\le F(-n)<\varepsilon\), proving the other limit. \(\square\)

The theorem’s hypotheses matter. The limits use that \(X\) is real-valued: if extended-real-valued random variables were allowed, an outcome with value \(+\infty\) would not belong to any \(\{X\le n\}\), and the limit at positive infinity could be less than \(1\). The use of continuity from above is valid because this is a probability measure, hence finite.

Worked Example: The Uniform Law on an Interval

Let \(\Omega=[0,1]\), let \(\mathcal{F}\) be its Borel sigma-algebra, and let \(\mathbb{P}\) be Lebesgue measure restricted to \([0,1]\), which has total mass \(1\). Define \(X(\omega)=\omega\). For \(x<0\), the event \(\{X\le x\}\) is empty. For \(0\le x\le1\), it is \([0,x]\), whose measure is \(x\). For \(x>1\), it is all of \([0,1]\). Therefore

$$ F(x)= \begin{cases} 0,&x<0,\\ x,&0\le x\le1,\\ 1,&x>1. \end{cases} $$

At \(x=0\), \(F(0)=0\), and at \(x=1\), \(F(1)=1\); these values agree with the displayed middle branch. To check an interval with closed endpoints, take \(a=1/4\) and \(b=3/4\). The event \(\{1/4\le X\le3/4\}\) is an interval of Lebesgue measure \(3/4-1/4=1/2\). The left-limit formula below gives \(F(3/4)-F((1/4)-)=3/4-1/4=1/2\). There is no endpoint mass: for example, \(F(0)-\lim_{y\uparrow0}F(y)=0-0=0=\mathbb{P}(X=0)\), consistent with the singleton having Lebesgue measure zero.

Left Limits, Jumps, and Interval Probabilities

Although a CDF is right-continuous, it need not be continuous from the left. Define its left limit at \(x\) by \(F(x-)=\lim_{y\uparrow x}F(y)\). This limit exists because \(F\) is nondecreasing and bounded. More precisely, it equals \(\mathbb{P}(X<x)\), as the next result shows.

Proposition: For every \(x\in\mathbb{R}\), \(F(x-)=\mathbb{P}(X<x)\), and hence \(F(x)-F(x-)=\mathbb{P}(X=x)\). For \(a<b\), interval probabilities are $$ \begin{aligned} \mathbb{P}(a<X\le b)&=F(b)-F(a),\\ \mathbb{P}(a\le X\le b)&=F(b)-F(a-),\\ \mathbb{P}(a<X<b)&=F(b-)-F(a),\\ \mathbb{P}(a\le X<b)&=F(b-)-F(a-). \end{aligned} $$

Proof. Fix \(x\), and consider the increasing events \(A_n=\{X\le x-1/n\}\). Their union is \(\{X<x\}\): every outcome with \(X<x\) satisfies \(X\le x-1/n\) for some sufficiently large \(n\), and each \(A_n\) is contained in \(\{X<x\}\). Continuity from below gives \(F(x-1/n)\to\mathbb{P}(X<x)\). Since \(F\) is nondecreasing, this limit is the left limit \(F(x-)\). The events \(\{X<x\}\) and \(\{X=x\}\) are disjoint and have union \(\{X\le x\}\), so \(F(x)=\mathbb{P}(X<x)+\mathbb{P}(X=x)\). Subtracting \(F(x-)=\mathbb{P}(X<x)\) proves the jump formula.

For the interval identities, use nested events and subtract their probabilities. The event \(\{X\le a\}\) is contained in \(\{X\le b\}\), and their difference is \(\{a<X\le b\}\), giving \(F(b)-F(a)\). The event \(\{X<a\}\) is contained in \(\{X\le b\}\), and their difference is \(\{a\le X\le b\}\), giving \(F(b)-F(a-)\). Likewise, \(\{X\le a\}\subseteq\{X<b\}\), with difference \(\{a<X<b\}\), so its probability is \(F(b-)-F(a)\). Finally, \(\{X<a\}\subseteq\{X<b\}\), with difference \(\{a\le X<b\}\), giving \(F(b-)-F(a-)\). All subtractions are valid because the smaller event is contained in the larger one, whose probability is finite. \(\square\)

Worked Example: A Countable Probability Model

Let \(\Omega=\mathbb{N}=\{1,2,\ldots\}\), with all subsets measurable and \(\mathbb{P}(\{k\})=\frac13(\frac23)^{k-1}\). These probabilities sum to \(1\), by the geometric series. Let \(X(k)=k\). For \(x<1\), \(F(x)=0\). For \(x\ge1\), let \(n=\lfloor x\rfloor\), the greatest integer no larger than \(x\). Since the inequality defining the CDF is non-strict, \(X\le x\) means \(X\in\{1,\ldots,n\}\), so

$$ F(x)=\sum_{k=1}^{n}\frac13\left(\frac23\right)^{k-1} =1-\left(\frac23\right)^n,\qquad x\ge1. $$

For instance, \(F(2)=1-(2/3)^2=1-4/9=5/9\), while \(F(2-)=F(x)=1/3\) for \(1\le x<2\). Thus \(F(2)-F(2-)=5/9-1/3=2/9\), which agrees with \(\mathbb{P}(X=2)=\frac13(2/3)=2/9\). For \(a=2,b=4\), the probability of the strict-lower, closed-upper interval is \(F(4)-F(2)=[1-(2/3)^4]-[1-(2/3)^2]=65/81-45/81=20/81\). Directly, the only included values are \(3\) and \(4\), with probabilities \(4/27=12/81\) and \(8/81\), totaling \(20/81\). This independent sum checks the interval calculation.

A Common Endpoint Mistake

A common error is to use \(F(x)=\mathbb{P}(X<x)\). The definition instead uses \(X\le x\); the strict version is \(F(x-)\). In the finite model above, \(F(0)=3/4\), because the outcomes with values \(-1\) and \(0\) are included, whereas \(F(0-)=1/8\). Confusing these values loses the mass \(5/8\) at zero.

The same mistake changes interval formulas. In that model, \(\mathbb{P}(-1<X\le2)=7/8\), not \(F(2)-F((-1)-)=1-0=1\): the correct lower endpoint for a strict inequality is \(F(-1)\), so the probability is \(F(2)-F(-1)=1-1/8=7/8\). The general formula \(\mathbb{P}(a<X\le b)=F(b)-F(a)\) follows by removing \(\{X\le a\}\), not \(\{X<a\}\). Keeping strict and non-strict inequalities attached to the correct CDF value prevents this off-by-an-atom error.

The defining properties provide useful consistency checks: a CDF cannot decrease, must be right-continuous, and must approach \(0\) and \(1\) at the two ends of the real line. Its jump at \(x\) is exactly the probability of the event \(X=x\). Its values and left limits then recover probabilities of intervals, with the endpoint conventions determining whether \(F\) or \(F(\,\cdot\,-)\) appears.

Check Your Understanding

For each question, track whether the endpoint inequality is strict or non-strict.

  1. Show that if \(x\le y\), then \(\{X\le x\}\subseteq\{X\le y\}\), and deduce the corresponding inequality for \(F\).
  2. For a real-valued random variable, explain why \(\{X\le n\}\) increases to \(\Omega\) as the positive integer \(n\) tends to infinity.
  3. Express \(\mathbb{P}(a<X<b)\) using \(F\) and left limits, for \(a<b\).
  4. If \(F(x)=0.62\) and \(F(x-)=0.47\), what is \(\mathbb{P}(X=x)\)?
  5. In the countable model above, compute \(\mathbb{P}(1<X\le3)\) using both the CDF and the point probabilities.