🔗 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.

P(A|B) = P(A AND B) / P(B)

where P(B) > 0
Understanding P(A|B):
• 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
Example 1: Card Drawing

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!

Visual Example: Marble Selection

A bag contains 12 marbles: 8 red (6 large, 2 small) and 4 blue (2 large, 2 small)

R-L
R-L
R-L
R-L
R-L
R-L
R-S
R-S
B-L
B-L
B-S
B-S

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

In a class of 30 students, 18 are girls and 12 are boys. 10 girls and 8 boys wear glasses. If a student wearing glasses is selected at random, what is the probability the student is a girl?
A) 1/3
B) 1/2
C) 5/9
D) 2/3

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
Test for Independence:
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)
Example 2: Independent Events

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.

Example 3: Dependent Events

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

Which pair of events is independent?
A) Drawing two cards from a deck without replacement
B) Rolling two different dice
C) Selecting two students from a class without replacement
D) Drawing two marbles from a bag without replacement

3. Multiplication Rule for Dependent Events

When events are dependent, we use conditional probability in our multiplication rule.

P(A AND B) = P(A) × P(B|A)

or equivalently

P(A AND B) = P(B) × P(A|B)
Example 4: Cards Without Replacement

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

Example 5: Quality Control

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

A jar has 5 red and 3 blue marbles. You draw one marble, don't replace it, then draw another. What is the probability of drawing a red marble then a blue marble?
A) 15/56
B) 15/64
C) 8/15
D) 3/8

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

P(A|B) = [P(B|A) × P(A)] / P(B)

Where P(B) = P(B|A) × P(A) + P(B|not A) × P(not A)

When to use Bayes' Theorem:
• 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
Example 6: Medical Testing

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

In a factory, Machine A produces 60% of items and Machine B produces 40%. Machine A has a 2% defect rate, while Machine B has a 5% defect rate. If a randomly selected item is defective, what's the probability it came from Machine A?
A) 0.50
B) 0.375
C) 0.60
D) 0.02

5. Putting It All Together

📝 Challenge Question

A bag contains 4 red balls and 6 blue balls. You draw 2 balls without replacement. What is the probability that the second ball is red, given that the first ball was blue?
A) 4/10
B) 4/9
C) 3/9
D) 6/10

🎯 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!