Probability, Correlation, and Independence
Probability Basics
What is Probability?
Probability is a way to measure uncertainty. It tells us how likely an event is to happen, on a scale from 0 to 1. A probability of 0 means the event is impossible, while a probability of 1 means it's absolutely certain. Most things in life fall somewhere in between.
For example, the probability of a standard coin flip landing on heads is 0.5. It's not impossible, not certain, just one of two equally likely outcomes.
To calculate probability, we first need to understand the sample space. This is just a list of all possible outcomes of an experiment. For a single six-sided die, the sample space is all the numbers that can come up.
An event is a specific outcome or a set of outcomes we're interested in. Let's say we want to know the probability of rolling an even number. Our event, which we can call , is the set of even outcomes.
The probability of event is the number of outcomes in divided by the total number of outcomes in the sample space .
The Rules of the Game
Probability isn't just guesswork; it follows three strict rules, called axioms. These are the foundations upon which everything else is built.
Non-negativity: The probability of any event must be greater than or equal to zero. You can't have a negative chance of something happening.
Normalization: The probability of the entire sample space is 1. This means that one of the possible outcomes must occur.
Additivity: If two events, and , are mutually exclusive (meaning they can't both happen at the same time), the probability of either or occurring is the sum of their individual probabilities.
Think back to our die. The event of rolling a 1 and the event of rolling a 6 are mutually exclusive. You can't do both on a single roll. The probability of rolling a 1 is , and the probability of rolling a 6 is . So, the probability of rolling a 1 or a 6 is:
Adding New Information
Probabilities can change as we learn more. This is the idea behind conditional probability. It asks, what is the probability of an event happening, given that we know another event has already happened? We write this as , which is read as "the probability of A given B."
The formula for conditional probability is:
In this formula, is the probability that both events and happen. Let's use our die example again. What is the probability of rolling an even number, given that we know the roll was greater than 3?
- Event : The roll is even.
- Event : The roll is greater than 3.
First, we need the probability of . There are 3 outcomes in out of 6 total, so .
Next, we need the probability of and happening together. This means the roll is both even and greater than 3. The outcomes that satisfy this are . There are 2 such outcomes, so .
Now we can find the conditional probability.
So, once we know the roll was greater than 3, the probability of it being even increases from to about .
Updating Beliefs with Bayes' Theorem
Conditional probability leads directly to one of the most important ideas in this field: Bayes' Theorem. This theorem gives us a way to formally update our beliefs in light of new evidence. It's the engine behind many machine learning algorithms and scientific studies.
The theorem connects with .
Imagine a medical test for a rare disease. The disease affects 1% of the population. The test is 99% accurate: if you have the disease, it will be positive 99% of the time, and if you don't, it will be negative 99% of the time (meaning a 1% false positive rate).
You take the test and it comes back positive. What's the probability you actually have the disease?
Let's define our events:
- : You have the disease. .
- : You test positive.
We want to find . Using Bayes' Theorem, we need to find the other pieces:
- : The probability of testing positive given you have the disease. This is the test's accuracy. .
- : The overall probability of testing positive. This is where it gets tricky. A person can test positive in two ways: having the disease and testing positive (true positive), or not having it and testing positive (false positive).
This calculation uses the Law of Total Probability. It says we can find the probability of an event by summing the probabilities of its different scenarios.
Now we have everything for Bayes' Theorem.
Surprisingly, even with a positive result from a 99% accurate test, you only have about a 50% chance of actually having the disease. This counterintuitive result happens because the disease is so rare. The small number of false positives from the large healthy population is about equal to the number of true positives from the small sick population.
Now, let's check your understanding of these core concepts.
In probability theory, what does a probability of 1 signify?
If you flip a standard coin twice, what is the sample space of all possible outcomes? (H = Heads, T = Tails)

