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:
    1. (Knowing B tells you nothing about A).
    2. .

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:

  1. Identify Condition (B): “Sum is 8”. List outcomes.
    • . Count = 5.
  2. Identify Target (A): “One die is 5”.
  3. Find Overlap (): Which outcomes in B have a 5?
    • . Count = 2.
  4. 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:

  1. Draw Tree:
    • Branch 1: Disease () Pos () / Neg ().
    • Branch 2: No Disease () Pos () / Neg ().
  2. Identify Goal: .
  3. Numerator: Path “Disease AND Pos”.
    • .
  4. Denominator: All “Pos” paths.
    • (Disease AND Pos) + (No Disease AND Pos).
    • .
  5. Divide: .
    • Result: Only 50%! (Counter-intuitive).

Pattern 3: Independence Check

Context: “. Are A and B independent?”

TIP

Mental Algorithm:

  1. Find Intersection: Use Addition Rule.
    • .
  2. Check Product: Calculate .
    • .
  3. Compare: Does Intersection = Product?
    • . Yes.
    • Result: Independent.

3. Practice Exercises

  1. Conditional: . Find .
    • Hint: .
  2. Independence: If A, B independent. . What is ?
    • Hint: It’s just . B doesn’t matter.
  3. 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:

  1. Events: (Disease), (Test Positive).
  2. Priors: .
  3. Conditionals: (False Positive).
  4. Bayes: .
  5. 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:

  1. P(A): Sum 7 pairs (1,6), (2,5), (3,4), (4,3), (5,2), (6,1). Total 6/36 = 1/6.
  2. P(B): First die 4. Pairs (4,1)
(4,6). Total 6/36 = 1/6.
  3. Intersection (A and B): First is 4 AND Sum is 7. Only (4,3). Prob 1/36.
  4. Check: .
  5. 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:

  1. Sample Space: BB, BG, GB, GG. (Prob 1/4 each).
  2. Condition: “At least one girl” → {BG, GB, GG}. (3 cases).
  3. Event: “Both girls” → {GG}. (1 case).
  4. Result: 1/3. (Not 1/2!). Answer: 1/3.