Course contentsShow
← Data Science
Lesson 120 of 2,1454. Discrete Probability DistributionsFree lesson

Cumulative Distribution Functions (CDF) for Discrete Variables

Computing the probability that a discrete random variable is less than or equal to a given value.

What You'll Learn

You'll learn how to find the probability that a discrete random variable takes on a value less than or equal to a specific number using the CDF.

Understanding the Cumulative Distribution Function

While a Probability Mass Function (PMF) tells you the probability of a random variable equaling exactly one value, the Cumulative Distribution Function (CDF) tells you the probability of getting that value or anything smaller.

Think of it like climbing stairs: the PMF shows the height of each individual step, but the CDF shows your total height above ground as you reach each step—it accumulates all the steps below.

How to Compute a CDF Value

The CDF at a value x, written as F(x), answers: "What's P(X ≤ x)?"

To calculate it:

  1. Identify all possible outcomes less than or equal to x
  2. Add up their probabilities from the PMF

Example: Suppose you roll a fair six-sided die (X = outcome):

  • PMF: P(X=1) = P(X=2) = ... = P(X=6) = 1/6
  • F(3) = P(X ≤ 3) = P(X=1) + P(X=2) + P(X=3) = 1/6 + 1/6 + 1/6 = 3/6 = 0.5

There's a 50% chance of rolling 3 or lower!

Properties of CDFs

  • Always increases or stays flat (never decreases)
  • Starts at 0 (impossible to get less than the minimum)
  • Ends at 1 (certain to get something in the sample space)
  • Creates a "staircase" pattern for discrete variables, jumping up at each possible value

Key Takeaway: The CDF accumulates probabilities from the PMF, giving you P(X ≤ x) by summing all outcomes up to and including x—essential for finding probabilities over ranges.