Welcome to Bayes’ Theorem: The Art of Updating Your Knowledge!

In this chapter of FS1: Statistics, we are going to learn one of the most powerful tools in probability. Bayes’ Theorem is essentially a way to change your mind when you get new information. Don't worry if it seems a bit abstract at first—by the end of these notes, you'll be using it to solve complex problems with ease!

Did you know? Bayes' Theorem is used today by email providers to filter out spam, by doctors to interpret medical tests, and even by self-driving cars to understand their surroundings!


1. The Starting Point: Tree Diagrams

Before we jump into the formula, we need to master the Tree Diagram. This is your best friend for visualizing what is happening in a probability problem.

Building the Tree

A tree diagram helps you see all possible outcomes. For the Oxford AQA syllabus, you’ll usually deal with two or three events (like three different machines in a factory or three different paths a student can take).

Rules for Tree Diagrams:
- 1. The branches coming from a single point must always add up to 1.
- 2. To find the probability of a specific path (e.g., Machine A AND a Defective item), you multiply along the branches.
- 3. To find the total probability of an outcome (e.g., the total chance of getting a defective item regardless of the machine), you add the results of the different paths.

Quick Review Box:
- Multiply across the branches (the "AND" rule).
- Add the final results of the paths (the "OR" rule).

Key Takeaway: Tree diagrams are the "map" of your problem. If you draw the tree correctly, the rest of the math becomes much easier!


2. Understanding Conditional Probability

Bayes’ Theorem is all about conditional probability. This is the probability that something happens, given that something else has already happened.

We write this as \( P(A|B) \). This is read as: "The probability of A, given B."

An Everyday Analogy:
Imagine you are looking at the sky. The probability that it will rain is \( P(Rain) \). However, if you see huge dark clouds, the probability of rain changes. That is \( P(Rain | Clouds) \). The clouds are your "new evidence."

Common Mistake to Avoid:
\( P(A|B) \) is not the same as \( P(B|A) \). For example, the probability that a person is an athlete given they are a fast runner is very high. But the probability that someone is a fast runner given they are an athlete is not necessarily as high (they might be a weightlifter!).


3. The Law of Total Probability

To use Bayes' Theorem, you often need the "Total Probability" of an event occurring. This is usually the denominator (bottom part) of our formula.

If an event (let’s call it D for Defective) can happen via three different routes (Machine A, B, or C), the total probability of D is:
\( P(D) = P(A \cap D) + P(B \cap D) + P(C \cap D) \)
Or, using conditional probabilities:
\( P(D) = [P(A) \times P(D|A)] + [P(B) \times P(D|B)] + [P(C) \times P(D|C)] \)

Key Takeaway: Total probability is just adding up all the ways your specific outcome could possibly happen.


4. Bayes’ Theorem: The Formula

Now, let's look at the star of the show. Bayes’ Theorem allows us to "reverse" the conditional probability. If we know the probability of a symptom given a disease, Bayes helps us find the probability of the disease given the symptom.

The Formula:
\( P(A|B) = \frac{P(B|A) \times P(A)}{P(B)} \)

Breaking it down:
- \( P(A|B) \): The Posterior. What we want to find (e.g., chance of having the disease given a positive test).
- \( P(B|A) \): The Likelihood. (e.g., chance of a positive test given you have the disease).
- \( P(A) \): The Prior. Our original belief (e.g., how common the disease is in the population).
- \( P(B) \): The Evidence. The total probability of the condition (e.g., the total chance of anyone testing positive).

Memory Aid: "The Reverse Trick"
Think of Bayes as: (The probability of the specific path you want) divided by (The total probability of all paths that lead to that outcome).


5. Step-by-Step Example (Three Events)

A factory has three machines: A, B, and C.
- Machine A makes 50% of the items (2% defective).
- Machine B makes 30% of the items (3% defective).
- Machine C makes 20% of the items (5% defective).
If an item is picked at random and found to be defective, what is the probability it came from Machine C?

Step 1: Identify what we want.
We want \( P(C | Defective) \).

Step 2: Find the top of the fraction (the specific path).
Path for Machine C and Defective: \( P(C) \times P(Defective|C) \)
\( 0.20 \times 0.05 = 0.01 \)

Step 3: Find the bottom of the fraction (total probability of defective).
- Path A: \( 0.50 \times 0.02 = 0.01 \)
- Path B: \( 0.30 \times 0.03 = 0.009 \)
- Path C: \( 0.20 \times 0.05 = 0.01 \)
Total \( P(Defective) \) = \( 0.01 + 0.009 + 0.01 = 0.029 \)

Step 4: Use the formula.
\( P(C | Defective) = \frac{0.01}{0.029} \approx 0.345 \)

Key Takeaway: Always calculate the total probability separately to keep your work clean and avoid mistakes!


6. Summary and Final Tips

Quick Review of Steps:
1. Draw a tree diagram with all probabilities.
2. Identify the evidence (the thing you know has happened).
3. Calculate the total probability of that evidence (the sum of all relevant path-ends).
4. Divide the specific path you are interested in by that total probability.

Encouraging Note: If the formula looks scary, just remember it’s always (The branch you want) / (All the branches added together). Practice drawing the trees first, and the numbers will fall into place!

Final Tip for the Exam: Oxford AQA examiners love to see your tree construction. Even if your final decimal is slightly off, you can get most of the marks for a clearly labeled tree diagram!