Lesson 2.5: Bayes' Theorem
Introduction
In this lesson, we will explore Bayes' theorem, a fundamental concept in probability that allows us to update our beliefs about the likelihood of events based on new evidence. By the end of this lesson, you should be able to:
- Calculate and use conditional probabilities, including Bayes' theorem for up to three events.
- Use tree diagrams to organize probability calculations.
- Apply Bayes' theorem to real-life scenarios, such as diagnostic testing.
- Update probabilities of events using Bayes' theorem.
- Structure calculations using tree diagrams alongside Bayes' theorem.
Understanding Conditional Probability
What is Conditional Probability?
Conditional probability is the probability of an event occurring given that another event has already occurred. It is denoted as:
$$P(A | B)$$
This notation is read as 'the probability of $A$ given $B$'.
Formula for Conditional Probability
The formula for calculating conditional probability is:
$$P(A | B) = \frac{P(A \cap B)}{P(B)}$$
where $P(A \cap B)$ is the probability of both events $A$ and $B$ occurring.
Example of Conditional Probability
Consider a bag containing 5 red balls and 3 blue balls. If we draw a ball from the bag, what is the probability of drawing a blue ball given that we know the ball drawn is not red?
- Total number of balls = 5 (red) + 3 (blue) = 8 balls.
- Since the ball drawn is not red, we are left with only the blue balls.
- Therefore, the probability of drawing a blue ball given that it is not red is:
$$P(Blue | Not \ Red) = \frac{P(Blue \cap Not \ Red)}{P(Not \ Red)} = \frac{3}{3} = 1$$
Thus, if we know the ball drawn isn’t red, its probability of being blue is 1.
Introduction to Bayes' Theorem
What is Bayes' Theorem?
Bayes' theorem provides a way to update the probability of an event based on new evidence. It relates conditional probabilities and can be expressed as:
$$P(A | B) = \frac{P(B | A) \cdot P(A)}{P(B)}$$
In this formula:
- $P(A | B)$ is the posterior probability (the probability of $A$ after observing $B$).
- $P(B | A)$ is the likelihood (the probability of $B$ if $A$ is true).
- $P(A)$ is the prior probability (the initial probability of $A$).
- $P(B)$ is the marginal probability (the total probability of $B$).
Worked Example of Bayes' Theorem
Example: Suppose a medical test for a disease is 90% effective, meaning it correctly identifies 90% of those with the disease (true positives) and incorrectly identifies 5% of those without the disease (false positives). If 1% of the population has the disease, what is the probability that a person who tests positive actually has the disease?
- Let:
- $A$: the event that a person has the disease.
- $B$: the event that a person tests positive for the disease.
- From the problem, we know:
- $P(A) = 0.01$ (1% of the population has the disease).
- $P(B | A) = 0.9$ (90% test sensitivity).
- $P(B | Not A) = 0.05$ (5% false positive rate).
- To find $P(B)$ (the total probability of testing positive), we can use the law of total probability:
$$P(B) = P(B | A) \cdot P(A) + P(B | Not A) \cdot P(Not A)$$
Calculating P(Not A):
$$P(Not A) = 1 - P(A) = 0.99$$
Now substituting:
$$P(B) = (0.9 \cdot 0.01) + (0.05 \cdot 0.99)$$
$$P(B) = 0.009 + 0.0495 = 0.0585$$
- Now applying Bayes' theorem:
$$P(A | B) = \frac{P(B | A) \cdot P(A)}{P(B)}$$
Substituting the values:
$$P(A | B) = \frac{0.9 \cdot 0.01}{0.0585} = \frac{0.009}{0.0585} \approx 0.1538$$
This means that if a person tests positive, there is approximately a 15.38% chance that they actually have the disease.
Using Tree Diagrams to Organize Calculations
Tree diagrams are a useful tool for visualizing probabilities, especially when dealing with multiple events. They allow us to systematically calculate probabilities by branching out each possible outcome.
Example of a Tree Diagram
Scenario: Let's say we have a bag with 5 red and 5 blue balls. We draw two balls without replacement. What is the probability that both are red?
- Constructing the tree diagram:
- First draw:
- Red (R) with probability $\frac{5}{10} = 0.5$.
- Blue (B) with probability $\frac{5}{10} = 0.5$.
- Second draw after drawing Red:
- Red (R) with probability $\frac{4}{9}$.
- Blue (B) with probability $\frac{5}{9}$.
- Second draw after drawing Blue:
- Red (R) with probability $\frac{5}{9}$.
- Blue (B) with probability $\frac{4}{9}$.
- Calculating probabilities:
- Probability of both balls being red:
$$P(R \text{ and } R) = P(R) \cdot P(R | R) = 0.5 \cdot \frac{4}{9} = \frac{2}{9}$$
The probability of drawing two red balls in succession is $\frac{2}{9}$.
Conclusion
In this lesson, we learned about Bayes' theorem and how to apply it in various scenarios. We explored conditional probability and how to use tree diagrams to help visualize and calculate probabilities effectively. The ability to update probabilities based on new information provides a powerful tool for reasoning under uncertainty.
Study Notes
- Conditional probability is expressed as $P(A | B)$.
- The formula for conditional probability is $P(A | B) = \frac{P(A \cap B)}{P(B)}$.
- Bayes' theorem is given by $P(A | B) = \frac{P(B | A) \cdot P(A)}{P(B)}$.
- Tree diagrams help organize probability calculations visually.
- Practice applying Bayes' theorem with real-world examples, such as medical testing or decision-making under uncertainty.
