Example 16: Red ball drawn: was it from Bag II?
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.
Let : Bag I is chosen, : Bag II is chosen, and : the ball drawn is red.
and form a partition of the sample space (the ball is drawn from exactly one bag).
The bag is chosen at random, so .
Bag I has 3 red balls out of 7, so .
Bag II has 5 red balls out of 11, so .
By the theorem of total probability,
By Bayes' theorem,
The probability that the red ball was drawn from Bag II is .
Want the reason behind every step, the basics and the checks?
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.
- 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: .
- Plan
- (1) Name the events; check the partition. (2) Find and . (3) Total probability for . (4) Bayes' theorem.
Basics you need
A ball drawn at random from a bag of 7 balls, 3 of them red, is red with probability . Basics: the classical definition
for a partition . Lesson: total probability and Bayes' theorem
: one path divided by all the paths to . Lesson: Bayes' theorem
: the common denominator cancels. Basics: working with fractions
Solution
Name the events
Let
- : Bag I is chosen;
- : Bag II is chosen;
- : the ball drawn is red.
and 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' theoremThe probabilities of the causes and of red from each cause
The question does not say how the bag is picked; "at random" means each bag is equally likely, and the book takes each. Once a bag is chosen, every ball in it is equally likely: Bag I has 3 red of balls, Bag II has 5 red of .for equally likely outcomes. Basics: the classical definitionThe chance of a red ball: total probability
Since and form a partition, by the theorem of total probability
The tree for Example 16. A red ball comes from Bag I (green path, ) or from Bag II (rose path, ). 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 and , use the lowest common denominator : and . Keeping 154 (not simplifying to ) makes the next step easy.Multiply along a path, add the paths. Basics: tree diagramsFrom Bag II, given red: Bayes' theorem
By Bayes' theorem,
The top is the Bag II red path, . The bottom is all red, . Both have the denominator 154, which cancels. and share no factor, so is in lowest terms. This is the book's value .Bayes' theorem: one path over the sum of the paths. Lesson: Bayes' theoremWhat the answer means
Before the draw, Bag II had probability . After seeing red it has , a little more. Bag I gets the rest: , and .
Red is slightly more common in Bag II () than in Bag I (), so seeing red tilts the odds slightly towards Bag II. The two bags are almost alike, so the change is small.For a partition, . Lesson: Bayes' theorem
The probability that the red ball was drawn from Bag II is .
(Textbook answer: .)
Picture 154 draws: Bag I is used 77 times and Bag II 77 times. Bag I gives red in of its draws, 33 times; Bag II gives red in of its draws, 35 times. Of the red balls, 35 came from Bag II: .
- Answering . That is , the chance of red from Bag II. The question asks the reverse, .
- Pooling the balls. Counting all 8 red balls together and answering 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 .
- Leaving out the . Here it cancels, so the answer survives; with unequal bag probabilities (as in Example 19) it does not.
- Bayes' theorem in four moves: name the causes, find and , add the paths for , divide the wanted path by .
- With a common denominator the last division is just "numerator over numerator".
- Very similar: Exercise 13.3, Question 2.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Partition of the sample space | Step 1 | Section 13.5.1 (Lesson: Bayes' theorem) |
| Step 2 | Class XI, Probability (Basics: the classical definition) | |
| Theorem of total probability | Step 3 | Section 13.5.2 (Lesson: total probability) |
| Bayes' theorem | Steps 4, 5 | Section 13.5 (Examples 15 to 21) |
| Dividing fractions with a common denominator | Step 4 | Arithmetic (Basics: working with fractions) |
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 →