Tutorials › Statistical Theory I - Probability and Distribution Theory › Defining the Cumulative Distribution Function

Random Variables and Distribution Functions · Tutorial 27 of 994

Defining the Cumulative Distribution Function

Learn to read a CDF as a threshold-probability function and connect it to the probability law of its random variable.

Beginner 9 min read

What You'll Learn

  • Define the CDF for a real-valued random variable at every real threshold
  • Interpret the threshold as an input and the CDF value as a probability
  • Express the CDF using the distribution induced by the random variable
  • Compute CDF values for uniform, exponential, and Poisson models
  • Distinguish a CDF value from a density value and from a single point probability

From a Random Variable to a Threshold Probability

A random variable assigns a real number to each outcome of a random experiment. Once the variable \(X\) is specified, a natural question is: what is the probability that its value is at most a chosen threshold? The cumulative distribution function answers this question for every real threshold, using one function to summarize probabilities across the entire range of \(X\).

The word “cumulative” signals that the event gathers all values up to and including the threshold. The input \(x\) is a real number being compared with \(X\); the output is the probability of the resulting event. It is not a probability assigned to the number \(x\) itself.

Definition: Let \(X\) be a real-valued random variable on a probability space with probability measure \(P\). Its cumulative distribution function, or CDF, is the function \(F_X:\mathbb R\to[0,1]\) defined by
$$ F_X(x)=P(X\le x),\qquad x\in\mathbb R. $$
Here \(X\le x\) is shorthand for the event \(\{\omega:X(\omega)\le x\}\). When the random variable is clear from context, write \(F(x)\) in place of \(F_X(x)\).

There are three distinct objects in this definition. First, \(X\) is the random variable. Second, \(x\) is a fixed real threshold supplied as the argument of the function. Third, \(F_X(x)\) is a number between zero and one: the probability that the realized value of \(X\) is no greater than that threshold. As \(x\) varies, these probabilities form the whole CDF.

The CDF and the Distribution of \(X\)

The distribution, or probability law, of \(X\) records probabilities for sets of real values. Write \(\mu_X\) for this distribution: for a Borel set \(B\subseteq\mathbb R\), \(\mu_X(B)=P(X\in B)\). The CDF is the distribution evaluated on a particular kind of set, the half-line consisting of all real numbers no greater than \(x\).

Proposition: For every real \(x\),
$$ F_X(x)=\mu_X((-\infty,x]). $$
Thus the CDF records the distribution’s probability on each threshold half-line.

Proof. By definition of the induced distribution, \(\mu_X(B)=P(X\in B)\) for each Borel set \(B\). Take \(B=(-\infty,x]\). The event \(X\in(-\infty,x]\) is exactly the event \(X\le x\). Therefore

$$ \mu_X((-\infty,x])=P(X\in(-\infty,x])=P(X\le x)=F_X(x). $$

\(\square\)

This identity explains why the CDF is a representation of the distribution, not a separate random quantity. It also clarifies what information a CDF value contains: it gives the probability of one specified set of values, namely the values at or below the input. The CDF’s argument is not an outcome \(\omega\), and the value \(F_X(x)\) is not the realized value \(X(\omega)\).

Using a Density to Evaluate a CDF

For a continuous model specified by a density \(f\), the probability of a set is obtained by integrating the density over that set. Consequently, the CDF at \(x\) is the integral over all values up to \(x\). This is a way to calculate the definition when a density is available; the definition itself does not require a density.

Derivation: If \(X\) has density \(f\) with respect to length on \(\mathbb R\), then
$$ F_X(x)=\int_{-\infty}^{x} f(t)\,dt. $$

To verify this formula, the density assumption means that for every Borel set \(B\), \(P(X\in B)=\int_B f(t)\,dt\). Apply that statement to \(B=(-\infty,x]\), and use the CDF definition:

$$ F_X(x)=P(X\le x) =P(X\in(-\infty,x]) =\int_{(-\infty,x]}f(t)\,dt =\int_{-\infty}^{x}f(t)\,dt. $$

The last expression is an improper integral when the lower endpoint is \(-\infty\), understood as the limit of integrals over finite intervals. Its existence follows from the density’s nonnegativity and total integral one. The formula applies under the stated density assumption; a random variable need not have a density in order to have a CDF.

Worked Example: A Uniform Threshold Probability

Suppose \(X\sim\operatorname{Uniform}(2,8)\), with density \(f(t)=1/6\) for \(2\le t\le 8\) and zero elsewhere. Find \(F_X(5)\) and interpret it.

By definition, \(F_X(5)=P(X\le5)\). Using the density formula, only the part of the uniform density between 2 and 5 contributes:

$$ F_X(5)=\int_{-\infty}^{5}f(t)\,dt =\int_{2}^{5}\frac{1}{6}\,dt =\frac{5-2}{6} =\frac{1}{2}. $$

Thus the probability that \(X\) is at most 5 is \(1/2\). The input 5 is the threshold; the output \(1/2\) is the probability of being at or below it. In particular, the output is not a value of \(X\).

Worked Example: An Exponential Threshold Probability

Let \(X\sim\operatorname{Exponential}(\lambda)\) with rate \(\lambda=0.5\), so its density is \(f(t)=0.5e^{-0.5t}\) for \(t\ge0\) and zero otherwise. Find the probability that \(X\le3\).

The CDF definition gives \(P(X\le3)=F_X(3)\). Integrating the density over the values up to 3 gives

$$ F_X(3)=\int_0^3 0.5e^{-0.5t}\,dt =\left[-e^{-0.5t}\right]_0^3 =1-e^{-1.5} \approx 0.7769. $$

Therefore, under this model, the probability that \(X\) is no greater than 3 is approximately \(0.7769\). The calculation uses the density to evaluate the CDF; it does not change the meaning of the CDF as a probability.

A CDF Does Not Require a Density

A CDF exists for any real-valued random variable, including discrete variables and variables whose distributions have both discrete and continuous parts. When \(X\) takes countably many possible values \(a_k\), with probabilities \(p_k=P(X=a_k)\), countable additivity gives the useful evaluation

$$ F_X(x)=\sum_{k:\,a_k\le x}p_k. $$

The sum includes exactly the possible values of \(X\) that meet the threshold. It is the same event \(X\le x\) from the definition, expressed as a union of disjoint point events. The sum is valid even when there are infinitely many such values, by countable additivity.

Worked Example: A Poisson Threshold Probability

Suppose \(X\sim\operatorname{Poisson}(2)\), so \(P(X=k)=e^{-2}2^k/k!\) for integers \(k\ge0\). Find \(F_X(2)\).

The event \(X\le2\) includes the integer values 0, 1, and 2. Sum their probabilities:

$$ \begin{aligned} F_X(2) &=P(X=0)+P(X=1)+P(X=2)\\ &=e^{-2}\frac{2^0}{0!} +e^{-2}\frac{2^1}{1!} +e^{-2}\frac{2^2}{2!}\\ &=e^{-2}(1+2+2) =5e^{-2} \approx 0.6767. \end{aligned} $$

So \(F_X(2)\) is approximately \(0.6767\): the model assigns that probability to outcomes where the count is at most 2. This calculation sums point probabilities because the model is discrete; no density or integral is needed.

What the CDF Tells You—and What It Does Not

A single CDF value answers one threshold question. To describe the distribution through its CDF, one considers the function over all real \(x\), not just one input. Different inputs ask different questions: for instance, \(F_X(3)\) concerns values at most 3, while \(F_X(5)\) concerns values at most 5. Each is a probability calculated under the same distribution.

The CDF is not the same thing as a density or a mass function. A density is used through integration to obtain probabilities for sets; a mass function gives probabilities at individual support points. The CDF, by contrast, directly gives the probability of the entire threshold event \(X\le x\). A density value \(f(x)\) is not generally a probability, and a point probability \(P(X=x)\) is not, by definition, the CDF value \(F_X(x)\).

Proposition: If two real-valued random variables \(X\) and \(Y\) have the same distribution, then their CDFs agree at every real input.

Proof. Having the same distribution means that their induced probability laws are equal: \(\mu_X(B)=\mu_Y(B)\) for every Borel set \(B\). In particular, this equality holds for \(B=(-\infty,x]\) for each real \(x\). By the relationship between a CDF and its law,

$$ F_X(x)=\mu_X((-\infty,x]) =\mu_Y((-\infty,x]) =F_Y(x) $$

for every \(x\in\mathbb R\). This establishes that the CDF depends on the distribution of the random variable, not on the particular probability-space representation used to define it. \(\square\)

Common Mistakes

  • Treating \(x\) as random. In \(F_X(x)\), the argument \(x\) is a fixed real threshold. The random quantity is \(X\), whose value is compared with that threshold.
  • Reading the output as a possible value of \(X\). The number \(F_X(x)\) is a probability, not a realization of the random variable.
  • Dropping the cumulative event. \(F_X(x)\) concerns all values no greater than \(x\), not just the event \(X=x\).
  • Assuming every CDF comes from a density. The event-probability definition applies whether the distribution is discrete, continuous, or neither. The density integral is available only when the density assumption holds.
  • Forgetting that the input is a real threshold. The definition is \(F_X(x)=P(X\le x)\) for each real \(x\), even if the variable itself takes values only in a restricted set.
Key takeaway: The CDF \(F_X(x)\) is the probability that the random variable \(X\) falls at or below the real threshold \(x\). It represents the distribution by reporting its probability on every threshold half-line.

Check Your Understanding

Use the definition \(F_X(x)=P(X\le x)\) to answer each question.

  1. In \(F_X(4)\), identify the random variable, the input threshold, and the probability represented by the output.
  2. If \(X\) has density \(f\), explain why its CDF at \(x\) is an integral over values no greater than \(x\).
  3. For a count-valued random variable with point probabilities \(p_k\), which values contribute to \(F_X(3)\)?
  4. Explain why a density value \(f(x)\) and a CDF value \(F_X(x)\) are different kinds of quantities.
  5. If \(X\) and \(Y\) have the same distribution, why must \(F_X(2)=F_Y(2)\)?