Conditional Probability
View .md

Probability Trees

Probability trees visualize multi-stage experiments with conditional probabilities.

Building a Tree

  1. Draw branches for each outcome at stage 1 (with probabilities)
  2. From each branch, draw branches for stage 2 (with conditional probabilities)
  3. Continue for all stages

Multiplication Rule

Multiply probabilities along branches to find the probability of any path through the tree:

P(A∩B)=P(A)⋅P(B∣A)P(A \cap B) = P(A) \cdot P(B | A)

Reading the formula:

  • P(A)P(A) — probability of the first event
  • P(B∣A)P(B | A) — probability of the second event given the first one already happened
  • The product gives the probability that both events occur in sequence

Why it works: The definition of conditional probability says P(B∣A)=P(A∩B)P(A)P(B | A) = \frac{P(A \cap B)}{P(A)}. Multiply both sides by P(A)P(A) and you get the multiplication rule. On a tree, you’re simply multiplying the probabilities along a path from root to leaf.

The key question: does the first event change the second?

The multiplication rule hinges on P(B∣A)P(B \vert A) — the probability of the second event after the first has occurred. But that raises a natural question: does the first event actually change the odds for the second one, or not?

Consider drawing marbles from a bag. After you draw the first marble, you have a choice: put it back or keep it out. This choice determines whether the first draw changes the situation for the second.

  • With replacement — you put the marble back. The bag is exactly the same as before, so the second draw is unaffected by the first.
  • Without replacement — you keep the marble out. The bag now has one fewer marble, so the odds shift.

This matters for the multiplication rule because P(B∣A)P(B \vert A) — the conditional probability in the formula — depends on whether the first event changed the situation:

Scenario P(B∣A)P(B \vert A) Reason
With replacement Same as P(B)P(B) The first draw doesn’t affect the second — the bag is restored
Without replacement Different from P(B)P(B) The first draw removes an item — the bag changes

Example: A bag has 3 red and 2 blue marbles (5 total). Draw two marbles.

With replacement (put the first marble back):

  • P(both red)=P(1st red)×P(2nd red∣1st red)=35×35=925=0.36P(\text{both red}) = P(\text{1st red}) \times P(\text{2nd red} | \text{1st red}) = \frac{3}{5} \times \frac{3}{5} = \frac{9}{25} = 0.36
  • After replacing, the bag is the same — so P(2nd red∣1st red)=P(2nd red)=35P(\text{2nd red} | \text{1st red}) = P(\text{2nd red}) = \frac{3}{5}

Without replacement (keep the first marble):

  • P(both red)=P(1st red)×P(2nd red∣1st red)=35×24=620=0.3P(\text{both red}) = P(\text{1st red}) \times P(\text{2nd red} | \text{1st red}) = \frac{3}{5} \times \frac{2}{4} = \frac{6}{20} = 0.3
  • After removing a red, only 2 red remain out of 4 — the conditional probability drops to 24\frac{2}{4}

The multiplication rule is the same formula either way. The difference is what number goes into P(B∣A)P(B | A) — and that depends on whether the first draw changes the situation.

General Chain Rule

For three or more events, the rule extends naturally:

P(A1∩A2∩A3)=P(A1)⋅P(A2∣A1)⋅P(A3∣A1∩A2)P(A_1 \cap A_2 \cap A_3) = P(A_1) \cdot P(A_2 | A_1) \cdot P(A_3 | A_1 \cap A_2)

Reading the formula:

  • P(A1)P(A_1) — probability of the first event
  • P(A2∣A1)P(A_2 | A_1) — probability of the second event given the first
  • P(A3∣A1∩A2)P(A_3 | A_1 \cap A_2) — probability of the third event given both the first and second

Each factor conditions on all previous events — not just the immediately preceding one. This matters: P(A3∣A1∩A2)P(A_3 | A_1 \cap A_2) is not the same as P(A3∣A2)P(A_3 | A_2) when A1A_1 carries additional information.

The pattern continues for any number of events. For four events:

P(A1∩A2∩A3∩A4)=P(A1)⋅P(A2∣A1)⋅P(A3∣A1∩A2)⋅P(A4∣A1∩A2∩A3)P(A_1 \cap A_2 \cap A_3 \cap A_4) = P(A_1) \cdot P(A_2 | A_1) \cdot P(A_3 | A_1 \cap A_2) \cdot P(A_4 | A_1 \cap A_2 \cap A_3)

Just keep adding one conditional factor at a time — each new factor conditions on everything that came before.

Example: Draw three cards from a deck without replacement. Find P(three Aces)P(\text{three Aces}).

  • P(1st Ace)=452P(\text{1st Ace}) = \frac{4}{52}
  • P(2nd Ace∣1st Ace)=351P(\text{2nd Ace} | \text{1st Ace}) = \frac{3}{51} — one Ace removed, 51 cards left
  • P(3rd Ace∣1st two Aces)=250P(\text{3rd Ace} | \text{1st two Aces}) = \frac{2}{50} — two Aces removed, 50 cards left
  • P(three Aces)=452×351×250≈0.00018P(\text{three Aces}) = \frac{4}{52} \times \frac{3}{51} \times \frac{2}{50} \approx 0.00018

Repeated Trials

What does the tree mean if we run the same experiment many times?

  • P(A1)P(A_1) — out of all trials, the proportion where A1A_1 happens
  • P(A2∣A1)P(A_2 | A_1) — out of only the trials where A1A_1 happened, the proportion where A2A_2 also happens
  • Multiplying them gives the proportion of all trials where both A1A_1 and A2A_2 happen

The tree captures this step-by-step filtering process visually — each branch narrows down the set of trials, and multiplying along a path gives the proportion that makes it all the way to that leaf.

Example: Two Coin Flips

Each leaf has probability 0.5×0.5=0.250.5 \times 0.5 = 0.25.

Example: Disease Testing

A test for a disease (1% prevalence):

  • Test positive if diseased: 95%
  • Test positive if healthy: 10%

Summing Probabilities

To find P(positive), sum all paths ending in positive:

P(+)=0.0095+0.099=0.1085P(+) = 0.0095 + 0.099 = 0.1085


Key Terms

Probability TreeA diagram that branches at each stage, showing all possible outcomes and their probabilities
Multiplication RuleP(A∩B)=P(A)×P(B∣A)P(A \cap B) = P(A) \times P(B|A) — the probability of both events occurring, using the conditional probability.
Chain RuleExtends the multiplication rule: P(A∩B∩C)=P(A)×P(B∣A)×P(C∣A∩B)P(A \cap B \cap C) = P(A) \times P(B|A) \times P(C|A \cap B), and so on for more events.
Path ProbabilityThe probability of reaching a leaf node by multiplying all branch probabilities along the path
With ReplacementThe first item is returned before the next draw, so each draw sees the same pool — probabilities stay the same across draws.
Without ReplacementThe first item is kept out, so the pool changes — probabilities shift on each subsequent draw.