🔗 Conditional Probability and Independence
1. What is Conditional Probability?
Conditional probability is the probability of an event occurring given that another event has already occurred. We write this as P(A|B), which reads as "the probability of A given B."
Think of it as updating our probability based on new information. When we know something has happened, it changes the likelihood of other events.
where P(B) > 0
• The vertical bar "|" means "given that"
• We're looking at the probability of A in a world where B has already happened
• The sample space shrinks to only include outcomes where B occurred
You draw a card from a standard deck. What is the probability it's a king, given that it's a face card?
Solution:
• Let A = drawing a king, B = drawing a face card
• There are 12 face cards (J, Q, K in each suit)
• Of those 12 face cards, 4 are kings
• P(King|Face card) = 4/12 = 1/3
Note: Without the condition, P(King) = 4/52 = 1/13, but knowing it's a face card changes the probability!
A bag contains 12 marbles: 8 red (6 large, 2 small) and 4 blue (2 large, 2 small)
Q: If we know the marble is large, what's P(Red|Large)?
A: There are 8 large marbles total, 6 are red. So P(Red|Large) = 6/8 = 3/4
📝 Practice Question
2. Independent vs. Dependent Events
Understanding whether events are independent or dependent is crucial for calculating probabilities correctly.
| Independent Events | Dependent Events |
|---|---|
| The outcome of one event does NOT affect the probability of the other | The outcome of one event DOES affect the probability of the other |
| P(A|B) = P(A) | P(A|B) ≠ P(A) |
| P(A AND B) = P(A) × P(B) | P(A AND B) = P(A) × P(B|A) |
| Example: Flipping a coin twice | Example: Drawing cards without replacement |
Events A and B are independent if and only if:
• P(A|B) = P(A), or
• P(B|A) = P(B), or
• P(A AND B) = P(A) × P(B)
Flipping a coin and rolling a die. Are these independent?
Answer: Yes!
The coin flip doesn't affect the die roll. P(Heads) = 1/2 regardless of the die result.
Drawing two cards from a deck without replacement.
Answer: Dependent!
• P(2nd card is Ace) depends on what the 1st card was
• If 1st card was an Ace: P(2nd is Ace) = 3/51
• If 1st card was NOT an Ace: P(2nd is Ace) = 4/51
📝 Practice Question
3. Multiplication Rule for Dependent Events
When events are dependent, we use conditional probability in our multiplication rule.
or equivalently
P(A AND B) = P(B) × P(A|B)
What's the probability of drawing two aces in a row from a standard deck (without replacement)?
Solution:
• P(1st Ace) = 4/52
• P(2nd Ace | 1st was Ace) = 3/51
• P(Both Aces) = 4/52 × 3/51 = 12/2652 = 1/221
A box contains 10 items: 7 good and 3 defective. If you select 2 items without replacement, what's the probability both are defective?
Solution:
• P(1st defective) = 3/10
• P(2nd defective | 1st defective) = 2/9
• P(Both defective) = 3/10 × 2/9 = 6/90 = 1/15
📝 Practice Question
4. Bayes' Theorem
Bayes' Theorem allows us to "reverse" conditional probabilities. If we know P(B|A), we can find P(A|B). This is incredibly useful in real-world applications like medical testing, spam filtering, and more!
Bayes' Theorem
Where P(B) = P(B|A) × P(A) + P(B|not A) × P(not A)
• You know P(B|A) but need P(A|B)
• You have "test results" and need to find the probability of the actual condition
• You're working with diagnostic or screening scenarios
A disease affects 1% of the population. A test for the disease is 95% accurate (correctly identifies both those with and without the disease 95% of the time). If someone tests positive, what's the probability they actually have the disease?
Solution:
Let D = has disease, T = tests positive
• P(D) = 0.01
• P(T|D) = 0.95 (true positive)
• P(T|not D) = 0.05 (false positive)
Using Bayes' Theorem:
P(D|T) = [0.95 × 0.01] / [0.95 × 0.01 + 0.05 × 0.99]
P(D|T) = 0.0095 / 0.059 ≈ 0.161 or about 16%
Surprisingly, even with a positive test, there's only a 16% chance of having the disease because the disease is so rare!
📝 Practice Question
5. Putting It All Together
📝 Challenge Question
🎯 Lesson Summary
Outstanding! You've mastered conditional probability and independence. Here's what you learned:
- ✅ Conditional probability: P(A|B) = P(A AND B) / P(B)
- ✅ Independent events: P(A|B) = P(A); events don't affect each other
- ✅ Dependent events: P(A AND B) = P(A) × P(B|A)
- ✅ Bayes' Theorem: Reversing conditional probabilities for real-world applications
- ✅ Key insight: New information changes probabilities!
Next lesson: We'll explore discrete random variables and probability distributions!