No history yet

Probability Theory

The Language of Chance

Probability is a way to measure how likely something is to happen. It's a number between 0 and 1, where 0 means an event is impossible, and 1 means it's certain. Think of it as a formal language for talking about uncertainty.

To speak this language, we need a few key terms. An experiment is any process with an uncertain result, like flipping a coin. Each possible result is an outcome. The set of all possible outcomes is called the sample space. For a coin flip, the sample space is {Heads, Tails}.

An event is any specific outcome or group of outcomes we care about, like the coin landing on Heads.

Probability

noun

A numerical measure of the likelihood that an event will occur, expressed as a number between 0 and 1.

The basic way to calculate the probability of an event is to count the number of ways it can happen and divide by the total number of possible outcomes.

P(E)=Number of ways event E can occurTotal number of possible outcomesP(E) = \frac{\text{Number of ways event E can occur}}{\text{Total number of possible outcomes}}

For a fair six-sided die, the probability of rolling a 4 is $1/6$. There's one favorable outcome (rolling a 4) and six total possible outcomes (1, 2, 3, 4, 5, 6).

Mapping the Possibilities

A probability distribution is a complete map of an experiment's possibilities. It lists all possible outcomes and gives the probability for each one. For the die roll, the distribution is straightforward since each outcome is equally likely.

OutcomeProbability
11/6
21/6
31/6
41/6
51/6
61/6

Notice that if you add up all the probabilities in a distribution, the total is always 1. This makes sense, because one of the possible outcomes must happen.

Distributions come in two main flavors. Discrete distributions, like the die roll, have a finite number of distinct outcomes. Continuous distributions cover outcomes over a range, like a person's exact height or the temperature tomorrow. They are often visualized as smooth curves.

Lesson image

Probabilities That Change

Sometimes, knowing one thing happened changes the probability of something else. This is called conditional probability. It asks, "What is the probability of event A, given that event B has already occurred?"

Let's use an example with a deck of 52 playing cards. The probability of drawing a King is $4/52$, or $1/13$. But what if we know the card drawn is a face card (Jack, Queen, or King)? There are 12 face cards in a deck.

The formula for conditional probability is written as P(AB)P(A|B), which you read as "the probability of A given B."

P(AB)=P(AB)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}

In our card example, event A is "drawing a King" and event B is "drawing a face card." Since all Kings are face cards, the event "King and face card" is just "King."

  • P(King and Face Card)=P(King)=4/52P(\text{King and Face Card}) = P(\text{King}) = 4/52
  • P(Face Card)=12/52P(\text{Face Card}) = 12/52

So, P(KingFace Card)=4/5212/52=412=13P(\text{King} | \text{Face Card}) = \frac{4/52}{12/52} = \frac{4}{12} = \frac{1}{3}. Knowing the card is a face card increases the probability of it being a King from 1/131/13 to 1/31/3.

Learning from Evidence

Bayes' theorem is one of the most important ideas in probability. It's a mathematical rule that tells us how to update our beliefs in light of new evidence. It connects a conditional probability with its inverse. For example, it relates the probability of having a symptom given a disease to the probability of having a disease given a symptom.

Lesson image

Here is the theorem in its classic form:

P(AB)=P(BA)P(A)P(B)P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}

Imagine a rare disease that 1% of the population has. There's a test for it that is 99% accurate. This means it correctly identifies 99% of people who have the disease, and correctly clears 99% of people who don't.

What's the probability you actually have the disease if you test positive?

  • P(Disease)P(\text{Disease}) = 0.01
  • P(PositiveDisease)P(\text{Positive} | \text{Disease}) = 0.99

Using Bayes' theorem, we can calculate P(DiseasePositive)P(\text{Disease} | \text{Positive}). The answer is surprisingly low, around 50%. This is because so many healthy people are tested that the small number of false positives they generate ends up being about as large as the number of true positives from the sick population.

Bayes' theorem is a formal way to reason about the world, adjusting our certainty as we gather more data. It's a powerful tool for thinking through complex problems.

Ready to check your understanding of these core concepts?

Quiz Questions 1/6

In probability theory, what is the set of all possible outcomes of an experiment called?

Quiz Questions 2/6

If you roll a standard six-sided die, what is the probability of rolling an even number?

These building blocks—probability, distributions, conditional probability, and Bayes' theorem—form the foundation for understanding and modeling uncertainty in countless fields.