Class 12 Maths, Worked in Full Past papersGet updates
Chapter 13 · Probability

Example 16: Red ball drawn: was it from Bag II? P=3568P = \frac{35}{68}

ExamplesBayes' theorem · Section 13.5
The question

Bag I contains 3 red and 4 black balls while another Bag II contains 5 red and 6 black balls. One ball is drawn at random from one of the bags and it is found to be red. Find the probability that it was drawn from Bag II.

Exam answer

Let E1E_1⁠: Bag I is chosen, E2E_2⁠: Bag II is chosen, and AA⁠: the ball drawn is red.

E1E_1 and E2E_2 form a partition of the sample space (the ball is drawn from exactly one bag).

The bag is chosen at random, so P(E1)=P(E2)=12P(E_1) = P(E_2) = \frac12⁠.

Bag I has 3 red balls out of 7, so P(A∣E1)=37P(A|E_1) = \frac37⁠.

Bag II has 5 red balls out of 11, so P(A∣E2)=511P(A|E_2) = \frac{5}{11}⁠.

By the theorem of total probability,

P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)=12⋅37+12⋅511=314+522=33154+35154=68154\begin{aligned} P(A) &= P(E_1)P(A|E_1) \\ &\quad + P(E_2)P(A|E_2) \\ &= \frac12\cdot\frac37 + \frac12\cdot\frac{5}{11} \\ &= \frac{3}{14} + \frac{5}{22} \\ &= \frac{33}{154} + \frac{35}{154} = \frac{68}{154} \end{aligned}

By Bayes' theorem,

P(E2∣A)=P(E2)P(A∣E2)P(A)=35154÷68154=35154×15468\begin{aligned} P(E_2|A) &= \frac{P(E_2)P(A|E_2)}{P(A)} \\ &= \frac{35}{154} \div \frac{68}{154} \\ &= \frac{35}{154} \times \frac{154}{68} \end{aligned}

∴\therefore The probability that the red ball was drawn from Bag II is 3568\dfrac{35}{68}⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Work backwards from the effect to the cause. We know how likely a red ball is from each bag. Now a red ball has been seen, and we ask which bag it came from. Bayes' theorem answers this: of all the ways to get a red ball, find the share that goes through Bag II.

P(E2∣A)=Bag II and redred, by either bag.P(E_2|A) = \frac{\text{Bag II and red}}{\text{red, by either bag}}.
Given, to find, and the plan
Given
Bag I: 3 red, 4 black. Bag II: 5 red, 6 black. A bag is chosen at random, a ball is drawn from it, and the ball is red.
To find
The probability that the ball came from Bag II, given that it is red: P(E2∣A)P(E_2|A)⁠.
Plan
(1) Name the events; check the partition. (2) Find P(Ei)P(E_i) and P(A∣Ei)P(A|E_i)⁠. (3) Total probability for P(A)P(A)⁠. (4) Bayes' theorem.

Basics you need

1Probability from counting

A ball drawn at random from a bag of 7 balls, 3 of them red, is red with probability 37\frac37⁠. Basics: the classical definition

2Theorem of total probability (Section 13.5.2)

P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)P(A) = P(E_1)P(A|E_1) + P(E_2)P(A|E_2) for a partition {E1,E2}\{E_1, E_2\}⁠. Lesson: total probability and Bayes' theorem

3Bayes' theorem (Section 13.5)

P(Ei∣A)=P(Ei)P(A∣Ei)P(A)P(E_i|A) = \frac{P(E_i)P(A|E_i)}{P(A)}⁠: one path divided by all the paths to AA⁠. Lesson: Bayes' theorem

4Dividing fractions

ac÷bc=ab\frac{a}{c} \div \frac{b}{c} = \frac{a}{b}⁠: the common denominator cancels. Basics: working with fractions

Solution

  1. Name the events

    Let

    • E1E_1⁠: Bag I is chosen;
    • E2E_2⁠: Bag II is chosen;
    • AA⁠: the ball drawn is red.

    E1E_1 and E2E_2 form a partition of the sample space: the ball comes from exactly one of the two bags, and each bag can be chosen.

    The bags are the possible causes; the red ball is the observed effect. Bayes' theorem needs the causes to be a partition, so that every red ball came from exactly one of them.
    A partition: pairwise disjoint, exhaustive, nonzero probabilities. Lesson: Bayes' theorem
  2. The probabilities of the causes and of red from each cause

    P(E1)=P(E2)=12.P(E_1) = P(E_2) = \frac12. P(A∣E1)=37,P(A∣E2)=511.P(A|E_1) = \frac37, \qquad P(A|E_2) = \frac{5}{11}.
    The question does not say how the bag is picked; "at random" means each bag is equally likely, and the book takes 12\frac12 each. Once a bag is chosen, every ball in it is equally likely: Bag I has 3 red of 3+4=73 + 4 = 7 balls, Bag II has 5 red of 5+6=115 + 6 = 11⁠.
    P=favourabletotalP = \frac{\text{favourable}}{\text{total}} for equally likely outcomes. Basics: the classical definition
  3. The chance of a red ball: total probability

    Since E1E_1 and E2E_2 form a partition, by the theorem of total probability

    P(A)=P(E1)P(A∣E1)+P(E2)P(A∣E2)=12⋅37+12⋅511=314+522=33154+35154=68154.\begin{aligned} P(A) &= P(E_1)P(A|E_1) \\ &\quad + P(E_2)P(A|E_2) \\ &= \frac12\cdot\frac37 + \frac12\cdot\frac{5}{11} \\ &= \frac{3}{14} + \frac{5}{22} \\ &= \frac{33}{154} + \frac{35}{154} = \frac{68}{154}. \end{aligned}
    start bag ball multiply along the path bag E₁: Bag I A: red 1/2 × 3/7 = 3/14 A′: black 1/2 × 4/7 E₂: Bag II A: red 1/2 × 5/11 = 5/22 A′: black 1/2 × 6/11 1/2 3/7 4/7 1/2 5/11 6/11
    The tree for Example 16. A red ball comes from Bag I (green path, 314\frac{3}{14}⁠) or from Bag II (rose path, 522\frac{5}{22}⁠). Bayes' theorem asks what share of the red total the rose path is.
    The two red paths cannot both happen, so their probabilities add. To add 314\frac{3}{14} and 522\frac{5}{22}⁠, use the lowest common denominator 154=2×7×11154 = 2 \times 7 \times 11⁠: 314=33154\frac{3}{14} = \frac{33}{154} and 522=35154\frac{5}{22} = \frac{35}{154}⁠. Keeping 154 (not simplifying to 3477\frac{34}{77}⁠) makes the next step easy.
    Multiply along a path, add the paths. Basics: tree diagrams
  4. From Bag II, given red: Bayes' theorem

    By Bayes' theorem,

    P(E2∣A)=P(E2)P(A∣E2)P(A)=35154÷68154=3568.\begin{aligned} P(E_2|A) &= \frac{P(E_2)P(A|E_2)}{P(A)} \\ &= \frac{35}{154} \div \frac{68}{154} \\ &= \frac{35}{68}. \end{aligned}
    The top is the Bag II red path, 12⋅511=522=35154\frac12 \cdot \frac{5}{11} = \frac{5}{22} = \frac{35}{154}⁠. The bottom is all red, 68154\frac{68}{154}⁠. Both have the denominator 154, which cancels. 35=5×735 = 5 \times 7 and 68=22×1768 = 2^2 \times 17 share no factor, so 3568\frac{35}{68} is in lowest terms. This is the book's value 3568\frac{35}{68}⁠.
    Bayes' theorem: one path over the sum of the paths. Lesson: Bayes' theorem
  5. What the answer means

    Before the draw, Bag II had probability 12\frac12⁠. After seeing red it has 3568≈0.515\frac{35}{68} \approx 0.515⁠, a little more. Bag I gets the rest: P(E1∣A)=3368P(E_1|A) = \frac{33}{68}⁠, and 3368+3568=1\frac{33}{68} + \frac{35}{68} = 1⁠.

    Red is slightly more common in Bag II (511≈0.455\frac{5}{11} \approx 0.455⁠) than in Bag I (37≈0.429\frac37 \approx 0.429⁠), so seeing red tilts the odds slightly towards Bag II. The two bags are almost alike, so the change is small.
    For a partition, P(E1∣A)+P(E2∣A)=1P(E_1|A) + P(E_2|A) = 1⁠. Lesson: Bayes' theorem
Result

The probability that the red ball was drawn from Bag II is 3568\frac{35}{68}⁠.

(Textbook answer: 3568\frac{35}{68}⁠.)

Check it with numbers

Picture 154 draws: Bag I is used 77 times and Bag II 77 times. Bag I gives red in 37\frac37 of its draws, 33 times; Bag II gives red in 511\frac{5}{11} of its draws, 35 times. Of the 33+35=6833 + 35 = 68 red balls, 35 came from Bag II: 3568≈0.5147\frac{35}{68} \approx 0.5147⁠.

Common mistakes
  1. Answering 511\frac{5}{11}⁠. That is P(A∣E2)P(A|E_2)⁠, the chance of red from Bag II. The question asks the reverse, P(E2∣A)P(E_2|A)⁠.
  2. Pooling the balls. Counting all 8 red balls together and answering 58\frac58 treats every ball as equally likely; but a ball in the smaller Bag I is more likely to be drawn, because each bag has probability 12\frac12⁠.
  3. Leaving out the 12\frac12⁠. Here it cancels, so the answer survives; with unequal bag probabilities (as in Example 19) it does not.
What to take away
  1. Bayes' theorem in four moves: name the causes, find P(Ei)P(E_i) and P(A∣Ei)P(A|E_i)⁠, add the paths for P(A)P(A)⁠, divide the wanted path by P(A)P(A)⁠.
  2. With a common denominator the last division is just "numerator over numerator".
  3. Very similar: Exercise 13.3, Question 2.

Every fact used, and where it comes from

FactUsed inSource
Partition of the sample spaceStep 1Section 13.5.1 (Lesson: Bayes' theorem)
P=favourabletotalP = \frac{\text{favourable}}{\text{total}}Step 2Class XI, Probability (Basics: the classical definition)
Theorem of total probabilityStep 3Section 13.5.2 (Lesson: total probability)
Bayes' theoremSteps 4, 5Section 13.5 (Examples 15 to 21)
Dividing fractions with a common denominatorStep 4Arithmetic (Basics: working with fractions)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →