Probability Mass Functions
What you'll learn: How to use Probability Mass Functions (PMFs) to describe the complete probability distribution of a discrete random variable.
What Is a PMF?
A Probability Mass Function assigns a probability to each possible value that a discrete random variable can take. Think of it as a lookup table: for each outcome, the PMF tells you exactly how likely it is to occur.
Remember from the previous lesson that discrete random variables take on specific, countable values (like rolling a die: 1, 2, 3, 4, 5, or 6). The PMF, usually written as P(X = x) or simply p(x), maps each value to its probability.
Key Properties
A valid PMF must satisfy two rules:
- Non-negativity: All probabilities are between 0 and 1: 0 ≤ p(x) ≤ 1
- Normalization: The sum of all probabilities equals 1: Σ p(x) = 1
Example: Coin Flips
Let's say X represents the number of heads in two coin flips. Possible values are {0, 1, 2}.
- P(X = 0) = 1/4 (both tails)
- P(X = 1) = 2/4 (one head, one tail)
- P(X = 2) = 1/4 (both heads)
Notice: 1/4 + 2/4 + 1/4 = 1 ✓
Why PMFs Matter in ML
PMFs are foundational for:
- Classification problems: Each class has a probability
- Understanding data distributions: Knowing how frequent each value is
- Building models: Many algorithms assume or learn probability distributions
The PMF gives you the complete picture of a discrete random variable's behavior—every possible outcome and its likelihood.
Key Takeaway: A Probability Mass Function specifies the exact probability for each value a discrete random variable can take, and all these probabilities must sum to 1.