Cumulative Distribution Function (CDF)
When analyzing data, we often need to know the probability that a random variable falls within a certain range, or below a specific value. While Probability Density Functions (PDFs) and Probability Mass Functions (PMFs) tell us the likelihood at a single point or interval, they don't directly give us cumulative information. This is where the Cumulative Distribution Function (CDF) becomes indispensable, providing a complete picture of the probability distribution up to any given point.
What is the Cumulative Distribution Function (CDF)?
The CDF, denoted as , quantifies the probability that a random variable will take a value less than or equal to a specific value . It essentially accumulates the probabilities from the lowest possible value up to . This function provides a comprehensive view of the distribution's shape, showing how probabilities accumulate across the variable's range.
For any random variable , the Cumulative Distribution Function (CDF) is defined as:
where is the probability that takes a value less than or equal to .
CDF for Continuous Random Variables
For a continuous random variable , the CDF is derived by integrating its Probability Density Function (PDF), , from negative infinity up to the point . This integral represents the area under the PDF curve, which is the accumulated probability. The CDF for continuous variables is always a continuous function itself.
If is a continuous random variable with PDF , its CDF is:
For example, for a Uniform distribution , the PDF is for , and 0 otherwise.
CDF for Discrete Random Variables
For a discrete random variable , the CDF is calculated by summing its Probability Mass Function (PMF), , for all values less than or equal to . This summation accumulates the probabilities of individual outcomes. The CDF for discrete variables is a step function, meaning it increases in discrete jumps at each possible value of .
If is a discrete random variable with PMF , its CDF is:
For example, for a fair six-sided die, the PMF is for .
Key Properties of CDFs
CDFs possess several fundamental properties that make them predictable and useful. First, they are monotonically non-decreasing, meaning if . This makes sense, as accumulating more probability can only increase or keep the cumulative sum the same. Second, the CDF always starts at 0 and ends at 1, reflecting that the probability of a variable being less than negative infinity is 0, and less than positive infinity is 1.
Every valid CDF must satisfy these conditions:
- for all .
- .
- .
- is non-decreasing: if , then .
Using CDF to Calculate Probabilities
The primary utility of the CDF is to easily calculate probabilities for various ranges. To find the probability that is less than or equal to a value , we directly use . If we need the probability that is greater than , we use the complement rule: . For a range , we subtract the CDF values: . This makes CDFs incredibly versatile for practical probability calculations.
Using the CDF, we can calculate various probabilities:
- For continuous variables, and .
- For discrete variables, (where is the largest value less than ) and .
Visualizing the CDF
A CDF plot typically forms an S-shaped curve for continuous distributions, or a series of steps for discrete ones. The curve starts at 0 on the left (negative infinity) and smoothly rises to 1 on the right (positive infinity). The steepness of the curve indicates regions where the probability accumulates rapidly, corresponding to higher probability densities (or masses). A flatter section means less probability is accumulating in that range.
Relationship with PDF/PMF
The CDF, PDF, and PMF are intrinsically linked. For continuous variables, the PDF is the derivative of the CDF, meaning . Conversely, the CDF is the integral of the PDF. For discrete variables, the PMF at a point can be found by taking the difference between the CDF at and the CDF just before (i.e., ). Understanding these relationships allows us to move between different representations of a probability distribution.
| Feature | Cumulative Distribution Function (CDF) | Probability Density/Mass Function (PDF/PMF) |
|---|---|---|
| What it measures | Cumulative probability | Probability at a point (discrete) or density at a point (continuous) |
| Range of values | [0, 1] | Non-negative (can be > 1 for PDF, but integral is 1) |
| Function type (continuous) | Continuous, non-decreasing | Continuous, non-negative |
| Function type (discrete) | Step function, non-decreasing | Discrete values at specific points |
| Derivation from other | Integral of PDF; sum of PMF | Derivative of CDF (continuous); difference of CDF (discrete) |
| Use case | Calculating , , | Understanding likelihood at specific points/intervals, shape of distribution |
The Cumulative Distribution Function (CDF), , gives the probability that a random variable takes a value less than or equal to .
For continuous variables, the CDF is the integral of the PDF: .
For discrete variables, the CDF is the sum of the PMF: .
CDFs are always non-decreasing and range from 0 to 1, with and .
Use CDFs to calculate probabilities for ranges: and .
The visual representation of a continuous CDF is typically an S-shaped curve, while a discrete CDF is a step function.