Probability BasicsTopic #8 of 33

Conditional Probability

Probability given prior information: P(A|B), independence, and the multiplication rule.

Overview

Conditional probability is the probability of an event occurring given that another event has already occurred. It's fundamental to understanding dependent events and Bayesian reasoning.

Definition

The conditional probability of AA given BB:

P(AB)=P(AB)P(B)where P(B)>0P(A|B) = \frac{P(A \cap B)}{P(B)} \quad \text{where } P(B) > 0

Read as: "The probability of A given B."

Key Formulas

Multiplication Rule (Rearranged)

From the definition:

P(AB)=P(B)×P(AB)P(A \cap B) = P(B) \times P(A|B) P(AB)=P(A)×P(BA)P(A \cap B) = P(A) \times P(B|A)

Chain Rule

For multiple events:

P(ABC)=P(A)×P(BA)×P(CAB)P(A \cap B \cap C) = P(A) \times P(B|A) \times P(C|A \cap B)

Independence

Two events AA and BB are independent if:

P(AB)=P(A)or equivalentlyP(BA)=P(B)P(A|B) = P(A) \quad \text{or equivalently} \quad P(B|A) = P(B)

For independent events:

P(AB)=P(A)×P(B)P(A \cap B) = P(A) \times P(B)

Testing Independence

Events are independent if:

P(AB)=P(A)×P(B)P(A \cap B) = P(A) \times P(B)

If this equality doesn't hold, the events are dependent.

Total Probability Theorem

If B1,B2,,BnB_1, B_2, \ldots, B_n form a partition of SS:

P(A)=P(AB1)P(B1)+P(AB2)P(B2)++P(ABn)P(Bn)P(A) = P(A|B_1)P(B_1) + P(A|B_2)P(B_2) + \cdots + P(A|B_n)P(B_n) P(A)=P(ABi)P(Bi)P(A) = \sum P(A|B_i)P(B_i)

Common Mistakes

MistakeCorrection
P(AB)=P(BA)P(A\lvert B) = P(B\lvert A)These are generally different!
P(AB)=P(AB)P(A\lvert B) = P(A \cap B)Must divide by P(B)P(B)
Assuming independenceCheck if P(AB)=P(A)P(A\lvert B) = P(A)

Examples

Example 1: Basic Conditional Probability

A bag contains 3 red and 2 blue balls. Draw one ball, then another without replacement.

P(2nd red1st red)=24=12P(\text{2nd red} | \text{1st red}) = \frac{2}{4} = \frac{1}{2} P(2nd red1st blue)=34P(\text{2nd red} | \text{1st blue}) = \frac{3}{4}

Example 2: Using a Table

Survey results (200 people):

Favor (F)Oppose (O)Total
Male (M)6040100
Female (W)5050100
Total11090200
P(F|M) = \frac{60}{100} = 0.60 \quad \text{(60% of males favor)} P(M|F) = \frac{60}{110} = 0.545 \quad \text{(54.5% of supporters are male)} P(F)=110200=0.55P(F) = \frac{110}{200} = 0.55

Example 3: Medical Testing

  • Disease prevalence: P(D)=0.01P(D) = 0.01
  • Test sensitivity: P(+D)=0.95P(+|D) = 0.95 (true positive rate)
  • Test specificity: P(D)=0.90P(-|D') = 0.90 (true negative rate)
P(+D)=10.90=0.10(false positive rate)P(+|D') = 1 - 0.90 = 0.10 \quad \text{(false positive rate)}

Example 4: Drawing Cards Without Replacement

P(both aces when drawing 2 cards)P(\text{both aces when drawing 2 cards}):

P(A1A2)=P(A1)×P(A2A1)=452×351=122652=1221P(A_1 \cap A_2) = P(A_1) \times P(A_2|A_1) = \frac{4}{52} \times \frac{3}{51} = \frac{12}{2652} = \frac{1}{221}

Example 5: Testing Independence

Roll a die. Let AA = "even" and BB = "less than 4"

P(A)=36=12P(A) = \frac{3}{6} = \frac{1}{2} P(B)=36=12P(B) = \frac{3}{6} = \frac{1}{2} P(AB)=P({2})=16P(A \cap B) = P(\{2\}) = \frac{1}{6}

Check: P(A)×P(B)=12×12=1416P(A) \times P(B) = \frac{1}{2} \times \frac{1}{2} = \frac{1}{4} \neq \frac{1}{6}

Therefore, AA and BB are NOT independent.

Tree Diagrams

Useful for visualizing conditional probabilities:

                    ┌─ P(A|B) ─> B ∩ A
          ┌─ P(B) ─┤
         /         └─ P(A'|B) ─> B ∩ A'
Start ──┤
         \         ┌─ P(A|B') ─> B' ∩ A
          └─ P(B')─┤
                   └─ P(A'|B') ─> B' ∩ A'

Multiply along branches, add across branches for total probability.