Recommended resources
The freely available resources this lesson will direct you to.
Hello! Welcome back to our study of probability theory.
In the last lesson, we defined the Probability Density Function (PDF) for continuous random variables. We established that the PDF, , is the derivative of another function, the Cumulative Distribution Function (CDF), . This was a crucial step, but we left the CDF itself largely unexplored.
Today, we will put the CDF in the spotlight. This lesson fully addresses the learning outcome: Define and compute cumulative distribution functions (CDFs) for both discrete and continuous random variables. We will see that the CDF is a more fundamental and universal tool than either the PMF or the PDF, as it provides a unified way to describe the distribution of any type of random variable.
1. The Universal Definition of a CDF
While PMFs are for discrete variables and PDFs are for continuous ones, the CDF works for everything. This is because it is defined directly in terms of probability, a concept that applies to all random variables.
Definition: The Cumulative Distribution Function (CDF) of a random variable , denoted , is defined as the probability that will take a value less than or equal to .
This function "accumulates" probability as increases from to . The following video introduces this idea and highlights the universal nature of the CDF.
L08.7 Cumulative Distribution Functions
This video from MIT OpenCourseWare introduces the formal definition of the CDF and explains why it's a useful, general-purpose tool for describing probability distributions.
Watch the first 1 minute and 18 seconds to understand the definition of the CDF and its general applicability.
2. Fundamental Properties of a CDF
Because every CDF is defined in terms of a probability measure, all CDFs, regardless of the underlying random variable, share a set of fundamental properties. Your preference for mathematical rigor will be satisfied here, as these properties are essential for formal proofs in probability and statistics.
Any function that is a CDF must satisfy:
-
Limits at Infinity: The CDF must start at 0 and end at 1.
This makes intuitive sense: the probability of being less than or equal to an infinitely small number is 0, and the probability of it being less than or equal to an infinitely large number is 1. -
Non-decreasing: As increases, the CDF can only increase or stay the same. It can never decrease.
If , then . -
Right-continuous: The function is continuous from the right. At any point , the limit from the right must equal the function's value at that point.
This property handles the "jumps" we see in discrete CDFs. The value at the jump point is the upper value.
The next video provides a clear explanation of these three characteristic properties.
Probability Theory 12 | Cumulative Distribution Function
This video from 'The Bright Side of Mathematics' rigorously details the core properties of any CDF, grounding them in the axioms of probability.
Watch from 03:51 to 06:38. Pay close attention to the explanation for each of the three properties, especially the concept of right-continuity.
3. CDFs for Continuous Random Variables
As we saw in the previous lesson, the PDF and CDF are intimately linked through calculus. For a continuous random variable with PDF , the CDF is found by integration.
This means the value of the CDF at a point is precisely the area under the PDF curve to the left of .

Let's see how to construct a CDF from a PDF with a concrete example.
L08.7 Cumulative Distribution Functions
This segment from the MIT OCW video walks through the derivation of the CDF for a continuous uniform random variable by integrating its constant PDF.
Watch from 01:18 to 03:38. Follow the step-by-step construction of the CDF for the uniform distribution by considering the different ranges of x.
To deepen your understanding, the following document provides worked examples for several important continuous distributions. Your background in calculus will make the integration straightforward.
Lecture 3: Cumulative distribution functions
The following lecture notes from the University of Texas at Austin provide detailed derivations of CDFs for common continuous distributions.
Read the examples for the Uniform, Normal, and Exponential distributions. You can find these under 'Example 3.1.2', parts 3, 4, and 5. Notice how integration is used to derive the functional form of each CDF.
4. CDFs for Discrete Random Variables
For a discrete random variable, we don't integrate a PDF. Instead, we sum the probabilities from the PMF, , for all possible outcomes less than or equal to .
This results in a step function (or staircase function). The function is constant between points of probability mass and "jumps" up at each point where there is a non-zero probability. The height of each jump is equal to the probability mass at that point. This is a direct consequence of the right-continuity property we discussed.

The following video provides an excellent visual walkthrough of constructing a discrete CDF from a given PMF.
L08.7 Cumulative Distribution Functions
This video segment demonstrates how to calculate and graph the CDF for a discrete random variable, illustrating the characteristic staircase shape.
Watch from 07:14 to 10:55. Observe how the CDF is built by summing the PMF values and how this creates a step function.
You can see the formal mathematical expression for a discrete CDF in the "Lecture 3: Cumulative distribution functions" notes, specifically in the examples for the Bernoulli distribution and a general discrete distribution with finite support (parts 1 and 2 of Example 3.1.2).
Test your understanding!
Let's formalize a simple scenario. Two fair coins are tossed. Let the random variable be the total number of heads.
- What is the sample space for the outcomes of the coin tosses?
- What are the possible values for the random variable ?
- Determine the Probability Mass Function (PMF) of , .
- Using the PMF, derive the expression for the CDF of , , and sketch its graph.
Show answer
-
Sample Space:
-
Possible Values of Y: can take values .
-
PMF of Y:
The sum is , as required.
-
CDF of Y: We construct the CDF by accumulating probability.
- For , no outcomes have occurred, so .
- For , the only outcome included is . So, .
- For , the outcomes and are included. So, .
- For , all outcomes are included. So, .
In piecewise form, the CDF is:
The graph is a step function, starting at 0, jumping to 1/4 at y=0, then to 3/4 at y=1, and finally to 1 at y=2.
Conclusion
In this lesson, we formally defined the Cumulative Distribution Function and established it as a cornerstone of probability theory. It provides a single, unified framework for describing the distribution of any random variable.
Key Takeaways:
- The CDF is universally defined as .
- All CDFs are non-decreasing, right-continuous, and have limits of 0 at and 1 at .
- For continuous variables, the CDF is the integral of the PDF, , resulting in a smooth, continuous function.
- For discrete variables, the CDF is the sum of PMF values, , resulting in a step function.
Preview of the Next Lesson:
Now that we have a complete set of tools to describe a probability distribution (PMF, PDF, CDF), we can move on to summarizing its key features. In the next lesson, we will explore two of the most important summary statistics: the expected value (a measure of central tendency) and the variance (a measure of spread). We will derive these quantities directly from their definitions using the PMF and PDF.