Probability is the mathematical framework for quantifying uncertainty. Whether you're a data scientist predicting user churn, a gambler calculating pot odds, or a physicist studying quantum states, you're using the same fundamental rules established centuries ago.
At its heart, probability is about counting: how many ways can something happen versus how many ways it could have happened?
Before we can calculate the odds of anything, we need to rigorously define the "universe" of all possible outcomes. This universe is called the Sample Space.
The Sample Space, denoted by (the Greek letter Omega), is the set of all possible outcomes of an experiment. An Event is any subset of the sample space ().
Understanding is critical. If you define your sample space incorrectly, every calculation that follows will be wrong.
- Tossing a Coin: (where = Heads, = Tails).
- Rolling a Six-Sided Die: .
- Weather Tomorrow: .
- Stock Price: . Because a stock price can be any decimal value (like $150.23), we use an interval rather than a list.
Set Operations: The Building Blocks
Since events are just sets of outcomes, we use set theory to combine them:
- Union (): Either happens, happens, or both happen. Think of it as the logical "OR".
- Intersection (): Both and must happen at the same time. Think of it as the logical "AND".
- Complement ( or ): The event that does not happen.
In 1933, Andrey Kolmogorov established three rules that all probability measures must follow. If these aren't met, the system isn't "probability."
- Non-negativity: for any event . You can't have a -10% chance of rain.
- Normalization: . The probability that something in the universe happens is 100%.
- Countable Additivity: If events are mutually exclusive (meaning they can't happen at the same time, so ), then the probability of any of them happening is the sum of their individual probabilities:
How many ways can you arrange a 10-song Spotify playlist? What are the odds of cracking a 4-digit PIN? When the sample space is too large to list manually, we use Combinatorics.
The Fundamental Counting Principle
If there are ways to do one thing and ways to do another, there are ways to do both. This "multiplication of choices" is the engine behind all counting formulas.
| Method | Formula | Order Matters? | Replacement? | Intuition |
|---|---|---|---|---|
| Permutations | Yes | Yes | Digital PIN Codes or Passwords | |
| Permutations (Strict) | Yes | No | Race Finishers (1st, 2nd, 3rd) | |
| Combinations | No | No | Lottery Numbers / Poker Hands | |
| Stars & Bars | No | Yes | Distributing identical items (e.g. cookies) to distinct buckets (e.g. kids) |
In a room of just 23 people, there is a 50.7% chance that at least two people share a birthday. This is counter-intuitive because our brains think about the chance of someone sharing our birthday (which is low), rather than any two people sharing any birthday. There are possible pairs of people in that room, giving many opportunities for a match!
The Password Problem
A hacker knows your 4-digit PIN uses only distinct digits (no repeats) and definitely starts with a '7'. How many possible PINs must they test?