Math Detours · Grade 10 · Sharpen · 15

Conditional probability and trees

With and without replacement, independence, P(A given B), and the two-children problem, which fools most adults.

Name ____________________Date ____________

Tonight's idea

Almost every probability problem is a tree. Each branch is a stage, each branch carries a probability, and two rules do all the work:

Multiply along a path to get the probability of that whole sequence of events.
Add across paths that lead to the outcome you care about.

If you draw a card and put it back, the second draw looks exactly like the first. If you keep it, the deck has changed, and the second-stage branches must say so.

Two events \(A\) and \(B\) are independent when knowing one tells you nothing about the other. The precise test is

\(A\) and \(B\) are independent exactly when \(P(A \text{ and } B) = P(A)\,P(B)\).

The probability of \(A\) given that \(B\) has happened is written \(P(A \mid B)\): shrink the world to the cases where \(B\) is true and ask what fraction of those also have \(A\):

\(P(A \mid B) = \dfrac{P(A \text{ and } B)}{P(B)}\).

Multiply both sides by \(P(B)\): that is the tree's multiplication rule, so branch probabilities are conditional probabilities. Independence is the special case \(P(A \mid B) = P(A)\).

Watch one: a bag of 5 red and 3 blue

Draw two counters without replacement. Both red: along the path, \(\tfrac58 \times \tfrac47 = \tfrac{20}{56} = \tfrac{5}{14}\). One of each colour: two paths, red-then-blue and blue-then-red, \(\tfrac58\cdot\tfrac37 + \tfrac38\cdot\tfrac57 = \tfrac{30}{56} = \tfrac{15}{28}\). With replacement the second draw forgets the first, so both red is \(\tfrac58 \times \tfrac58 = \tfrac{25}{64}\), a little more than \(\tfrac{5}{14}\).

RB 5⁄83⁄8 4⁄73⁄75⁄72⁄7 RR 5⁄8 × 4⁄7 = 20⁄56RB 5⁄8 × 3⁄7 = 15⁄56 BR 3⁄8 × 5⁄7 = 15⁄56BB 3⁄8 × 2⁄7 = 6⁄56
Multiply along a path; add the two highlighted paths for "one of each colour".

Your turn

  1. Two fair dice. Find \(P(\text{sum} = 7)\) and \(P(\text{sum} = 7 \mid \text{first die shows } 3)\). Then test with the definition: are "first die shows 6" and "sum is 7" independent? Are "first die shows 6" and "sum is 8"?
  2. A fair coin is flipped three times. Find \(P(\text{exactly two heads})\), \(P(\text{exactly two heads} \mid \text{first flip is a head})\) and \(P(\text{all heads} \mid \text{at least one head})\).
  3. The two-children problem. A family has two children, each a girl with probability \(\tfrac12\), independently. (a) You learn the older child is a girl. What is the probability both are girls? (b) Instead you learn only that at least one is a girl. Now what is the probability both are girls? Draw the four equally likely families and cross out the ones the information rules out.
  4. A survey of 200 students: 120 play a sport, 80 play an instrument, 48 do both. Test whether "plays a sport" and "plays an instrument" are independent. Then compute \(P(\text{instrument} \mid \text{sport})\) and check it agrees.

Play with these at mathdetours.com/demos/dice.html and mathdetours.com/demos/monty.html.

Stretch: Monty Hall

Three doors, a car behind one. You pick door 1. The host, who knows where the car is, opens one of the other doors to show a goat, and offers a switch. Draw the tree (car at 1, 2 or 3, each \(\tfrac13\); then which door the host opens) and show that switching wins with probability \(\tfrac23\).

Answers

  1. \(P(7) = \tfrac{6}{36} = \tfrac16\). Given the first die is 3, the sum is 7 only if the second is 4: \(\tfrac16\). "First is 6" and "sum is 7": \(P(\text{both}) = P(6,1) = \tfrac1{36}\) and \(\tfrac16 \cdot \tfrac16 = \tfrac1{36}\). Equal, so independent: whatever the first die shows, exactly one value of the second makes 7. "First is 6" and "sum is 8": \(P(\text{both}) = \tfrac1{36}\), but \(\tfrac16 \cdot \tfrac5{36} = \tfrac5{216}\). Not equal, so dependent.
  2. Eight equally likely sequences. Exactly two heads: HHT, HTH, THH, so \(\tfrac38\). Given the first is H, shrink to HHH, HHT, HTH, HTT; two have exactly two heads: \(\tfrac12\). All heads given at least one head: \(\tfrac{1/8}{7/8} = \tfrac17\).
  3. Families, older first: GG, GB, BG, BB, each \(\tfrac14\). (a) Older is a girl: GG or GB, so \(\tfrac12\). (b) At least one girl: GG, GB, BG, so \(\tfrac13\). The information in (b) is weaker: it rules out only BB, whereas (a) also rules out BG.
  4. \(P(S) = 0.6\), \(P(I) = 0.4\), \(P(S \text{ and } I) = \tfrac{48}{200} = 0.24 = 0.6 \times 0.4\). Independent. \(P(I \mid S) = \tfrac{48}{120} = 0.4 = P(I)\), as independence requires.

Stretch. If the car is behind door 1 (\(\tfrac13\)), switching loses. If it is behind door 2 or 3 (\(\tfrac23\)), the host is forced to open the other goat door and switching wins. So switch: \(\tfrac23\). The host's choice carried information, because he avoided the car.

← PreviousNext: Standard deviation and the bell curve →