Exercise 13.3 · Q2: Two bags: the red ball came from the first bag,
A bag contains 4 red and 4 black balls, another bag contains 2 red and 6 black balls. One of the two bags is selected at random and a ball is drawn from the bag which is found to be red. Find the probability that the ball is drawn from the first bag.
Let : the first bag is selected, : the second bag is selected, and : the ball drawn is red.
and form a partition of the sample space (exactly one bag is selected).
and
By the theorem of total probability,
By Bayes' theorem,
The probability that the ball is drawn from the first bag is .
Want the reason behind every step, the basics and the checks?
We know the result (a red ball) and ask for the cause (which bag). Bayes' theorem turns the question round: of all the ways a red ball can appear, find the share that goes through the first bag. That share is the first bag's path on the tree divided by the total of the red paths, which the theorem of total probability gives.
- Given
- Bag I: 4 red, 4 black. Bag II: 2 red, 6 black. A bag is chosen at random, then a ball is drawn from it; the ball is red.
- To find
- The probability that the ball came from the first bag, given that it is red: .
- Plan
- (1) Name the events; check the partition. (2) Write , . (3) Count each bag for , . (4) Total probability for . (5) Bayes' theorem for .
Basics you need
is the chance of once is known to have happened. For a ball from a known bag, it is the share of that bag's balls with the colour. Lesson: conditional probability
For a partition : . Basics: tree diagrams
For a partition and an event with , is the path divided by the total: . Lesson: Bayes' theorem
Solution
Name the events
Let
- : the first bag is selected;
- : the second bag is selected;
- : the ball drawn is red.
and form a partition of the sample space: exactly one bag is selected, and each has a nonzero chance.
The bags are the possible causes, and the colour is the observed result. Bayes' theorem needs the causes to be a partition, so that every red ball came from exactly one of them.Partition: pairwise disjoint, exhaustive, nonzero probabilities (Section 13.5.1). Lesson: Bayes' theoremThe chance of each bag, before looking at the ball
"Selected at random" from two bags means each bag is equally likely. These are the probabilities before the colour is known.Two equally likely choices: each. Basics: classical probabilityThe chance of red from each bag
The first bag has 4 red balls out of ; the second has 2 red out of . So
Once the bag is known, the ball is drawn at random from that bag, so the chance of red is the share of red balls in it.The overall chance of a red ball
Since and form a partition, by the theorem of total probability
The tree for Question 2. The rose path (first bag, then red) has product ; the green path (second bag, then red) has . Together the red paths give . A red ball can come about in two ways, through either bag. Each way is a path on the tree: multiply along it, then add the two paths.Multiply along a path, add the paths. Basics: tree diagramsTurn it round with Bayes' theorem
By Bayes' theorem,
The top, , is the probability of the rose path, "first bag and red". Dividing by keeps only the outcomes where the ball is red and asks what share of them came from the first bag: this is the definition .Dividing by a fraction is multiplying by its flip. Basics: dividing by a fractionDoes the answer make sense?
The second bag gets the rest: , and .
Before the draw each bag had chance . Seeing red raises the first bag to , because the first bag is twice as rich in red ( against ).
Given , exactly one of the causes happened, so the updated probabilities of the causes must add to 1. It is a quick check on any Bayes answer.
The probability that the red ball was drawn from the first bag is . (Textbook answer: .)
Each bag holds 8 balls and is chosen with chance , so each of the 16 balls is drawn with the same chance, . There are red balls, and 4 of them are in the first bag. Given red, the ball is one of these 6, so the chance it is from the first bag is , and .
- Answering , the chance of red from the first bag. That is . The question asks the reverse, .
- Stopping at . is only the bottom of Bayes' formula.
- Using for the top. The top is the whole path, , not alone.
- Thinking the colour cannot change the bag's chance. It can: a red ball is more likely to come from the bag with more red balls.
- Bayes' theorem in words: the path for your cause, divided by the sum of all the paths that give the result.
- When every ball is equally likely overall (here, equal bags of 8), Bayes' theorem agrees with simple counting of the red balls.
- The same steps, with percentages, answer Question 3; the result there is an A grade and the causes are where the student lives.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Partition of a sample space | Step 1 | Section 13.5.1 (Lesson: Bayes' theorem) |
| Equally likely choices | Steps 2, 3 | Classical probability, Class XI (Basics: classical probability) |
| Conditional probability | Steps 3, 5 | Section 13.2 (Lesson: conditional probability) |
| Theorem of total probability | Step 4 | Section 13.5.2 (Lesson: Bayes' theorem) |
| Bayes' theorem | Steps 5, 6 | Section 13.5; used in Example 16, also with two bags (Examples 15 to 21) |
| Dividing by a fraction | Step 5 | Arithmetic (Basics: dividing by a fraction) |
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 →