Introduction to Bayes’ Theorem

Welcome to one of the most powerful tools in statistics! Bayes’ Theorem might sound intimidating, but it is actually a very logical way of "updating" what we know when we get new information. In the Pearson Edexcel 9ST0 course, this appears in Paper 1 and is all about working with conditional probability in a clever way.

Think of it like being a detective. You have a general idea of who might have committed a crime (the prior probability), then you find a new piece of evidence, and you use that evidence to change your mind about who the most likely suspect is (the posterior probability). In this chapter, we will learn how to turn those logical guesses into precise calculations.

Quick Review: Before we dive in, remember that conditional probability is written as \(P(A|B)\), which means "the probability of event A happening, given that event B has already happened."

1. The Law of Total Probability

Before we can use Bayes’ Theorem, we need to understand the "bottom half" of the formula. This is called the Law of Total Probability.
Don’t worry if the name sounds fancy—it just means finding the total chance of an event happening by looking at all the different ways it could happen.

Imagine you are trying to find the probability that a student passes an exam (\(P(Pass)\)). There are two types of students: those who studied (\(S\)) and those who didn't (\(S'\)).
To find the total probability of passing, you add up:
1. The chance of studying AND passing: \(P(S \cap Pass)\)
2. The chance of not studying AND passing: \(P(S' \cap Pass)\)

In math terms, if you have three events \(A_1, A_2, A_3\) that cover all possibilities, the total probability of an event \(B\) is:
\(P(B) = P(B|A_1)P(A_1) + P(B|A_2)P(A_2) + P(B|A_3)P(A_3)\)

Key Takeaway: To find the total probability of an outcome, sum up the probabilities of every possible path that leads to that outcome.

2. Understanding Bayes’ Theorem

Bayes’ Theorem is essentially a fraction. It asks: "Given that outcome B happened, what is the chance it was caused by event A?"

The formula for Bayes’ Theorem is:
\(P(A|B) = \frac{P(B|A)P(A)}{P(B)}\)

Let's break down these pieces:
\(P(A|B)\): The Posterior. What we want to find out now that we have new evidence.
\(P(A)\): The Prior. What we knew before the new evidence.
\(P(B|A)\): The Likelihood. If A is true, how likely is evidence B?
\(P(B)\): The Total Probability. The total chance of the evidence happening at all (the sum of all paths).

A Simple Analogy:
Imagine you hear a "Meow" (\(B\)). You want to know the probability it came from a Cat (\(A\)).
The "Meow" is your evidence. The top of the fraction is the chance that a Cat exists and makes that sound. The bottom of the fraction is the total chance of hearing a "Meow" from anything (maybe your friend is playing a prank!).

3. Using Tree Diagrams (The Secret Weapon)

The syllabus specifically mentions using tree diagrams for up to three events. This is the most reliable way to solve Bayes' Theorem questions without getting lost in the formula.

Step-by-Step Process:
1. Draw the tree: Start with the "causes" or "prior" events (e.g., Factory A, Factory B, Factory C).
2. Add the second branches: These are the "outcomes" (e.g., Defective or Not Defective).
3. Multiply across: Multiply the probabilities along each branch to find the probability of that specific path.
4. Find the Total: Add the results of all paths that lead to the outcome you are interested in (this is your denominator).
5. Apply Bayes: Take the probability of the one specific path you are asked about and divide it by the Total you just calculated.

Memory Aid: Bayes’ Theorem is just: (The path I want) ÷ (All possible paths).

4. Real-World Example: Medical Testing

This is a classic exam-style question. Suppose a disease affects 1% of the population (\(P(D) = 0.01\)). A test for the disease is 99% accurate for people who have it (\(P(Positive|D) = 0.99\)), but it has a 2% false-positive rate for healthy people (\(P(Positive|Healthy) = 0.02\)). If you test positive, what is the chance you actually have the disease?

Step 1: The "Top" (The path where you have the disease and test positive):
\(P(D \cap Positive) = 0.01 \times 0.99 = 0.0099\)

Step 2: The "Bottom" (Total chance of testing positive):
Path 1 (Sick and Positive): \(0.01 \times 0.99 = 0.0099\)
Path 2 (Healthy and Positive): \(0.99 \times 0.02 = 0.0198\)
Total \(P(Positive) = 0.0099 + 0.0198 = 0.0297\)

Step 3: The Calculation:
\(P(D|Positive) = \frac{0.0099}{0.0297} \approx 0.333\) or 33.3%

Wait! Did you see that? Even with a "99% accurate" test, if you test positive, there is only a 33% chance you are actually sick! This is why Bayes' Theorem is so important—it accounts for the fact that the disease is very rare in the first place.

5. Common Mistakes to Avoid

1. Mixing up \(P(A|B)\) and \(P(B|A)\):
Always read carefully. \(P(Defective|Machine A)\) is the chance Machine A makes a mistake. \(P(Machine A|Defective)\) is the chance that, given a broken item, it was made by Machine A. Bayes’ Theorem is the bridge between these two.

2. Forgetting the denominator:
Many students just calculate the "top" part of the fraction. Remember, you must divide by the total probability of the evidence occurring.

3. Not checking if probabilities sum to 1:
The first set of branches on your tree diagram (the priors) must always add up to 1. If you have three factories, their production percentages must total 100%.

Quick Review Box:
Prior: Probabilities before we have evidence.
Conditional: The "if" part (e.g., if it came from Factory A, it's 5% likely to be broken).
Posterior: The "updated" probability after the evidence is known.
Tree Diagrams: Your best friend for organizing the data.

Summary Takeaway

Bayes’ Theorem is simply a way to reverse conditional probability. We use a Tree Diagram to find all the ways an event could happen (Total Probability), and then we create a fraction to find the probability that a specific "cause" was responsible for the "result" we observed. Keep your branches clear, multiply along the paths, and divide the "target path" by the "total paths"!