Stats 1 Week 8: Conditional Probability & Bayesâ Theorem
0. Prerequisites
NOTE
What you need to know:
- Intersection (): Probability of A AND B.
- Partitions: Splitting a sample space into non-overlapping chunks.
Quick Refresher
- Conditional Probability : Prob of A given B happened.
- Formula: .
- Bayesâ Theorem: Flipping the condition. Finding using .
1. Core Concepts
1.1 Conditional Probability
- Concept: The sample space shrinks. If we know B happened, B becomes the new âUniverseâ.
- Multiplication Rule: .
1.2 Independence (Formal Definition)
- Two events A and B are independent IF AND ONLY IF:
- (Knowing B tells you nothing about A).
- .
1.3 Bayesâ Theorem
- Scenario: You know . You want .
- Formula:
- Total Probability (Denominator): .
2. Pattern Analysis & Goated Solutions
Pattern 1: The âGivenâ Keyword (Basic Conditional)
Context: âRoll 2 dice. Sum is 8. Prob that one die is 5?â
TIP
Mental Algorithm:
- Identify Condition (B): âSum is 8â. List outcomes.
- . Count = 5.
- Identify Target (A): âOne die is 5â.
- Find Overlap (): Which outcomes in B have a 5?
- . Count = 2.
- Divide: .
Pattern 2: Bayesâ Theorem (Tree Diagram Method)
Context: âDisease D (1% of pop). Test T is 99% accurate. You test Positive. Prob you have Disease?â
TIP
Mental Algorithm:
- Draw Tree:
- Branch 1: Disease () Pos () / Neg ().
- Branch 2: No Disease () Pos () / Neg ().
- Identify Goal: .
- Numerator: Path âDisease AND Posâ.
- .
- Denominator: All âPosâ paths.
- (Disease AND Pos) + (No Disease AND Pos).
- .
- Divide: .
- Result: Only 50%! (Counter-intuitive).
Pattern 3: Independence Check
Context: â. Are A and B independent?â
TIP
Mental Algorithm:
- Find Intersection: Use Addition Rule.
- .
- Check Product: Calculate .
- .
- Compare: Does Intersection = Product?
- . Yes.
- Result: Independent.
3. Practice Exercises
- Conditional: . Find .
- Hint: .
- Independence: If A, B independent. . What is ?
- Hint: Itâs just . B doesnât matter.
- Bayes: 2 Urns. U1(2R, 3B), U2(3R, 2B). Pick Urn (0.5), Pick Red. Prob it was U1?
- Hint: Num: . Denom: . Ans: .
đ§ Level Up: Advanced Practice
Question 1: Bayesâ Theorem (Medical Test)
Problem: Disease prevalence 1%. Test sensitivity 99% (True Positive), Specificity 95% (True Negative). If test is positive, prob of disease? Logic:
- Events: (Disease), (Test Positive).
- Priors: .
- Conditionals: (False Positive).
- Bayes: .
- Calc:
- Num: .
- Denom: .
- Result: . Answer: ~16.7%. (Counter-intuitive! Even with positive test, mostly likely healthy).
Question 2: Independence Check
Problem: Two dice. A: Sum is 7. B: First die is 4. Are A and B independent? Logic:
- P(A): Sum 7 pairs (1,6), (2,5), (3,4), (4,3), (5,2), (6,1). Total 6/36 = 1/6.
- P(B): First die 4. Pairs (4,1)âŠ(4,6). Total 6/36 = 1/6.
- Intersection (A and B): First is 4 AND Sum is 7. Only (4,3). Prob 1/36.
- Check: .
- Result: . Answer: Yes, Independent.
Question 3: Conditional Probability Trap
Problem: Family has 2 children. Given at least one is a girl, prob that both are girls? Logic:
- Sample Space: BB, BG, GB, GG. (Prob 1/4 each).
- Condition: âAt least one girlâ â {BG, GB, GG}. (3 cases).
- Event: âBoth girlsâ â {GG}. (1 case).
- Result: 1/3. (Not 1/2!). Answer: 1/3.