MATH U113 · Doubt clinic · topic page

Conditional probability, the multiplication rule and trees

P(E | F) = P(E ∩ F)/P(F): shade the condition, then read the event's share of it. Multiply along a tree path (the multiplication rule), add the paths that end in the event (total probability), and one path over the sum is the reverse question. Notes: §2.4. Cards are collapsed — open one, or use the buttons. Newest at the bottom. Back to the clinic index.

Devore Example 2.26 · 15 SepThree magazine columns: four conditional probabilities from one Venn diagramP(A | B), P(A | B ∪ C), P(A | A ∪ B ∪ C), P(A ∪ B | C) — where each numerator and denominator comes from.
Devore §2.4, Example 2.26 · as setA news magazine publishes three columns entitled "Art" (A), "Books" (B), and "Cinema" (C). Reading habits of a randomly selected reader with respect to these columns are: P(A) = .14, P(B) = .23, P(C) = .37, P(A ∩ B) = .08, P(A ∩ C) = .09, P(B ∩ C) = .13, P(A ∩ B ∩ C) = .05. Find (i) P(A | B); (ii) P(A | B ∪ C); (iii) P(A | reads at least one); (iv) P(A ∪ B | C). (Book: .348, .255, .286, .459.)

Where this lives Notes §2.4 · conditional probability · Notes §2.2 · three-event addition rule · Quiz Q2 (a union in the condition — the same move) · Devore §2.4

The doubt, named

The book jumps from the seven given numbers to the eight numbers in the Venn diagram without showing how, and then reads each conditional probability off the picture. Two skills: filling the eight regions from the inside out, and then applying one recipe for every conditional probability — shade the condition, then ask what fraction of the shaded area is the event.

Step 1Fill the eight regions, innermost first

The given intersections overlap each other, so start from the centre and subtract outward:

  • All three: .05 (given).
  • Exactly A and B: .08 − .05 = .03. Exactly A and C: .09 − .05 = .04. Exactly B and C: .13 − .05 = .08.
  • Only A: .14 − .03 − .04 − .05 = .02. Only B: .23 − .03 − .08 − .05 = .07. Only C: .37 − .04 − .08 − .05 = .20.
  • None: 1 − (.02 + .07 + .20 + .03 + .04 + .08 + .05) = 1 − .49 = .51.
Every conditional probability below is a ratio of sums of these eight numbers. Check: they add to 1.

Step 2One recipe, four times

P(E | F) = P(E ∩ F) / P(F). Shade F; the denominator is everything shaded; the numerator is the shaded part that is also in E.

  1. (i) P(A | B): shade B (.23). Inside B and in A: .03 + .05 = .08. .08/.23 = .348.
  2. (ii) P(A | B ∪ C): shade B ∪ C: .23 + .37 − .13 = .47 (or add its six regions). Inside it and in A: the parts of A that touch B or C: .03 + .05 + .04 = .12. .12/.47 = .255.
  3. (iii) P(A | at least one): shade A ∪ B ∪ C: 1 − .51 = .49. A lies entirely inside it, so the numerator is all of A, .14. .14/.49 = .286.
  4. (iv) P(A ∪ B | C): shade C (.37). Inside C and in A or B: .04 + .05 + .08 = .17. .17/.37 = .459.

Sanity: each answer is between 0 and 1, and (iii) > (ii) makes sense — conditioning on a bigger set that still contains all of A only shrinks the denominator.

Classic traps

1) Using the given intersections as if they were the "only" regions. P(A ∩ B) = .08 includes the .05 centre; "exactly A and B" is .03. Fill from the centre out. 2) The denominator of (ii). P(B ∪ C) is .47, not .23 + .37 = .60 — the overlap .13 was counted twice. 3) The numerator of (iii). A ∩ (A ∪ B ∪ C) is just A; nothing to compute. 4) Reading (iv) as P(C | A ∪ B). The condition is what follows the bar.

Try the twin: P(C | A ∪ B)?

Shade A ∪ B: .14 + .23 − .08 = .29. Inside it and in C: .04 + .05 + .08 = .17. .17/.29 = .586. Same numerator as (iv), different denominator — the bar decides which set you divide by.

Devore Examples 2.27–2.28 · 15 SepBlood typing: why "at least three must be typed" is "the first two are not O+"Four donors, exactly one is O+, typed in random order: P(at least three typed) = ½; P(third one is the O+) = ¼.
Devore §2.4, Example 2.27 · as setFour individuals have responded to a request by a blood bank for blood donations. None of them has donated before, so their blood types are unknown. Suppose only type O+ is desired and only one of the four actually has this type. If the potential donors are selected in random order for typing, what is the probability that at least three individuals must be typed to obtain the desired type? (Book: ½.) Example 2.28 continues: what is the probability that the third person typed is the O+ one? (Book: ¼.)

Where this lives Notes §2.4 · multiplication rule · Widget inspector card (the same "position of the special one" idea) · Devore §2.4

The doubt, named — your "why?" in the margin

The book writes P(at least three typed) = P(first is not O+ and second is not O+) with no explanation. The link is the stopping rule: typing stops the moment the O+ person is found. So "at least three people had to be typed" happens exactly when the first two tests both came back "not O+" — if either had been the O+, typing would have stopped at one or two. Once that sentence is clear, the rest is the multiplication rule with a shrinking pool.

Step 1Translate the event

Let B = "first person typed is not O+" and A = "second person typed is not O+". Then

{at least three must be typed} = B ∩ A

Not "the third one is O+" — that is a different, smaller event (Example 2.28). "At least three" includes the case where the O+ person is fourth.

Step 2Multiplication rule with a shrinking pool

P(A ∩ B) = P(A | B) · P(B) = 23 · 34 = 612 = 12

P(B) = 3/4: three of the four are not O+. P(A | B) = 2/3: given the first was not O+, three people remain and two of them are not O+. The condition changes the pool — that is the whole reason this is a conditional probability and not (3/4)(3/4).

The O+ donor lands in each slot with probability ¼. "At least three typed" = slot 3 or 4 = ½. "Third is O+" = slot 3 = ¼. The multiplication rule and this picture must agree.

Step 3Example 2.28: the third one is the O+

Now three things must happen in order: first not O+, second not O+, third O+. Chain the conditionals, each with the pool one smaller:

P(third is O+) = 34 · 23 · 12 = 14

The 1/2 at the end: after two non-O+ people are gone, two remain and one of them is the O+. Check against the picture: the O+ donor is equally likely to be in any of the four positions, so "third" is ¼ ✓ — and "at least three" = "third or fourth" = ¼ + ¼ = ½ ✓, agreeing with Example 2.27 by a completely different route.

Classic traps

1) (3/4)(3/4). The second draw is from three people, not four; the pool shrinks. 2) "At least three" = "exactly three". It also includes "the O+ is fourth". 3) Multiplying unconditional probabilities. The multiplication rule is P(A ∩ B) = P(A | B)P(B) — the second factor is conditional unless the events are independent, and these are not.

Try the twin: P(at least two must be typed)? P(all four must be typed)?

At least two: the first is not O+, 3/4. All four: the first three are not O+, (3/4)(2/3)(1/2) = 1/4 — the O+ donor sits in slot 4. The four position probabilities ¼, ¼, ¼, ¼ add to 1 ✓.

Devore Example 2.29 · 15 SepThree DVD brands and warranty repairs: the tree, and the question that is Bayes without the nameP(brand 1 and needs repair) = .125; P(needs repair) = .205; P(brand 1 | needs repair) = .61.
Devore §2.4, Example 2.29 · as setAn electronics store sells three different brands of DVD players. Of its DVD player sales, 50% are brand 1 (the least expensive), 30% are brand 2, and 20% are brand 3. Each manufacturer offers a 1-year warranty on parts and labour. It is known that 25% of brand 1's DVD players require warranty repair work, whereas the corresponding percentages for brands 2 and 3 are 20% and 10%, respectively. 1. What is the probability that a randomly selected purchaser has bought a brand 1 DVD player that will need repair while under warranty? 2. What is the probability that a randomly selected purchaser has a DVD player that will need repair while under warranty? 3. If a customer returns to the store with a DVD player that needs warranty repair work, what is the probability that it is a brand 1 DVD player? A brand 2? A brand 3? (Book: .125; .205; .61, .29, .10.)

Where this lives Notes §2.4 · multiplication rule, total probability, Bayes · Director candidates card (identical shape) · Quiz Q1 · Devore §2.4

The doubt, named

The book's tree carries two kinds of number: unconditional on the first branches (which brand, .50/.30/.20) and conditional on the second (repair given that brand, .25/.20/.10). Multiply along a path to get the probability of that path; add the paths that end in "repair" to get P(repair). Question 3 then asks the reverse — brand given repair — which is one path over that sum. The book does not call it Bayes here; it is.

Step 1Symbols, then the tree

A1, A2, A3 = brand 1, 2, 3 bought: P(A1) = .50, P(A2) = .30, P(A3) = .20. B = needs repair: P(B | A1) = .25, P(B | A2) = .20, P(B | A3) = .10.

Multiply along a path; add across the paths that end in "repair".

Step 2The three questions

  1. Brand 1 and repair — one path: P(A1 ∩ B) = P(B | A1) · P(A1) = (.25)(.50) = .125.
  2. Repair — all paths ending in B (total probability): P(B) = .125 + (.20)(.30) + (.10)(.20) = .125 + .060 + .020 = .205.
  3. Brand given repair — one path over the sum: P(A1 | B) = .125/.205 = .61; P(A2 | B) = .060/.205 = .29; P(A3 | B) = .020/.205 = .10. They add to 1 ✓.

Read the last line: brand 1 is 50% of sales but 61% of repairs, because it is also the most repair-prone. The evidence "needs repair" moved the probability toward brand 1 — the direction a posterior should move.

Classic traps

1) Answering .25 for question 3. That is P(B | A1); the question asks P(A1 | B). 2) Adding .25 + .20 + .10 for question 2. Those are conditional on different brands; each must be weighted by its brand's share first. 3) Forgetting the denominator in 3. .125 is a joint probability; divided by P(B) it becomes the conditional.

Try the twin: P(brand 3 | does NOT need repair)?

P(B′) = 1 − .205 = .795. Path: P(A3 ∩ B′) = (.90)(.20) = .18. .18/.795 = .226 — up from the prior .20, since brand 3 is the most reliable.