The Mathematical Descriptions
To work with probability distributions, statisticians have developed three core mathematical functions. Depending on whether your random variable is discrete (counting) or continuous (measuring), you will use different functions.
1. Probability Mass Function (PMF)
Used for: Discrete Random Variables.
The PMF tells you the exact probability that a discrete random variable is exactly equal to some value. Because the variable is discrete, you can think of the PMF as assigning a "mass" of probability to specific, isolated points.
Notation:
Rules:
- Every individual probability must be between 0 and 1:
- The sum of all probabilities across all possible outcomes must equal exactly 1:
Example: The PMF of rolling a fair 6-sided die is for .
2. Probability Density Function (PDF)
Used for: Continuous Random Variables. Warning: The PDF does not output a direct probability!
The PDF is the continuous equivalent of the PMF, but it requires a paradigm shift. For a continuous variable (like exact human height), the probability of someone being exactly 180.00000000... cm tall is technically zero!
Instead of looking at exact points, the PDF describes the probability density. To find an actual probability, you must calculate the area under the curve over a specific range using calculus (integration).
Notation:
To find the probability of falling between and :
Rules:
- Density can never be negative:
- The total area under the entire curve must equal exactly 1:
3. Cumulative Distribution Function (CDF)
Used for: Both Discrete and Continuous Random Variables.
The CDF is arguably the most practical function. It answers the question: "What is the probability that my variable will be less than or equal to a specific value ?"
It is the running total (cumulative sum or integral) of the probabilities up to that point.
Notation:
Rules:
- It always starts at 0:
- It always ends at 1:
- It is monotonically non-decreasing (it never goes down, it only goes up or stays flat).
Interactive Visualization: PDF vs CDF
Switch between the PDF and CDF views below. Notice how the Area under the curve in the PDF view perfectly matches the exact Y-axis height in the CDF view!
Normal distribution: PDF vs CDF
PDF: probability is area under the curve.
Test Your Knowledge
Example: PDF vs CDF
Let the continuous random variable have a probability density function (PDF) for . Find the cumulative distribution function (CDF) and calculate .
View Step-by-Step Solution
The CDF is the integral of the PDF from the lower bound to :
To find the probability , we just plug into the CDF:
There is a 25% probability that is less than or equal to 0.5.