Course contentsShow
← Mathematics
Lesson 2845 of 3,12156. Probability — Random VariablesFree lesson

CDF for Discrete Random Variables

Construct CDFs from probability mass functions using step functions and jump discontinuities.

CDF for Discrete Random Variables

You'll learn how to construct cumulative distribution functions for discrete random variables using step functions with jumps at each possible value.

The Core Idea

For a discrete random variable, the cumulative distribution function (CDF) is built from its probability mass function (PMF). Since a discrete random variable only takes on specific, separated values, its CDF is a step function that jumps at each possible value of the random variable.

At each value xix_i in the range, the CDF jumps upward by exactly P(X=xi)P(X = x_i)—the probability mass at that point. Between these values, the CDF remains constant (flat), creating a "staircase" pattern.

Constructing the CDF from a PMF

Given a discrete random variable XX with PMF p(x)p(x), the CDF is:

F(x)=P(X≤x)=∑xi≤xp(xi)F(x) = P(X \leq x) = \sum_{x_i \leq x} p(x_i)

The process:

  1. List all possible values x1<x2<x3<…x_1 < x_2 < x_3 < \ldots in ascending order
  2. For x<x1x < x_1: F(x)=0F(x) = 0 (no probability accumulated yet)
  3. At each xix_i: the function jumps up by p(xi)p(x_i)
  4. Between jumps: F(x)F(x) remains constant
  5. Eventually: F(x)→1F(x) \to 1 as xx exceeds all possible values

Example Pattern

If XX can be 1, 2, or 4 with P(X=1)=0.2P(X=1)=0.2, P(X=2)=0.5P(X=2)=0.5, P(X=4)=0.3P(X=4)=0.3:

  • For x<1x < 1: F(x)=0F(x) = 0
  • For 1≤x<21 \leq x < 2: F(x)=0.2F(x) = 0.2 (jump at 1)
  • For 2≤x<42 \leq x < 4: F(x)=0.7F(x) = 0.7 (jump at 2)
  • For x≥4x \geq 4: F(x)=1.0F(x) = 1.0 (jump at 4)

The jumps are discontinuities—the function value literally leaps upward at each point in the range.

Key Takeaway: The CDF of a discrete random variable is a right-continuous step function that jumps by the PMF value at each possible outcome, creating a staircase that rises from 0 to 1.