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

Miscellaneous · Q6: Four boxes of marbles: a red marble came from box A, B or C, 115,25,815\frac{1}{15}, \frac25, \frac{8}{15}

Miscellaneous ExerciseBayes' theorem · Section 13.5
The question

Suppose we have four boxes A,B,C and D containing coloured marbles as given below:

BoxMarble colour
RedWhiteBlack
A163
B622
C811
D064
Exam answer

Let E1,E2,E3,E4E_1, E_2, E_3, E_4⁠: box A, B, C, D is selected, and RR⁠: the marble drawn is red.

E1,E2,E3,E4E_1, E_2, E_3, E_4 form a partition of the sample space (exactly one box is selected).

The box is selected at random, so P(Ei)=14P(E_i) = \frac14⁠, i=1,2,3,4i = 1, 2, 3, 4⁠.

Each box has 10 marbles, so P(R∣E1)=110P(R|E_1) = \frac{1}{10}⁠, P(R∣E2)=610P(R|E_2) = \frac{6}{10}⁠, P(R∣E3)=810P(R|E_3) = \frac{8}{10} and P(R∣E4)=0P(R|E_4) = 0⁠.

By the theorem of total probability,

P(R)=P(E1)P(R∣E1)+P(E2)P(R∣E2)+P(E3)P(R∣E3)+P(E4)P(R∣E4)=14⋅110+14⋅610+14⋅810+14⋅0=1+6+8+040=1540\begin{aligned} P(R) &= P(E_1)P(R|E_1) \\ &\quad + P(E_2)P(R|E_2) \\ &\quad + P(E_3)P(R|E_3) \\ &\quad + P(E_4)P(R|E_4) \\ &= \frac14\cdot\frac{1}{10} + \frac14\cdot\frac{6}{10} \\ &\quad + \frac14\cdot\frac{8}{10} + \frac14\cdot 0 \\ &= \frac{1 + 6 + 8 + 0}{40} = \frac{15}{40} \end{aligned}

By Bayes' theorem,

P(E1∣R)=P(E1)P(R∣E1)P(R)=140÷1540\begin{aligned} P(E_1|R) &= \frac{P(E_1)P(R|E_1)}{P(R)} \\ &= \frac{1}{40} \div \frac{15}{40} \end{aligned} P(E2∣R)=640÷1540P(E_2|R) = \frac{6}{40} \div \frac{15}{40} P(E3∣R)=840÷1540P(E_3|R) = \frac{8}{40} \div \frac{15}{40}

∴\therefore P(box A | red) =115= \dfrac{1}{15}⁠, P(box B | red) =615=25= \dfrac{6}{15} = \dfrac25 and P(box C | red) =815= \dfrac{8}{15}⁠.

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

One of the boxes has been selected at random and a single marble is drawn from it. If the marble is red, what is the probability that it was drawn from box A?, box B?, box C?

The one idea this problem is built on

The boxes are equally likely to be chosen and each holds 10 marbles, so every one of the 40 marbles is equally likely to be the one drawn. Given that it is red, it is one of the 1+6+8+0=151 + 6 + 8 + 0 = 15 red marbles, and box A holds 1 of them, box B 6 and box C 8. Bayes' theorem gives exactly these shares: 115\frac{1}{15}⁠, 615\frac{6}{15}⁠, 815\frac{8}{15}⁠.

Given, to find, and the plan
Given
Four boxes with the marbles in the table; a box is selected at random (each with probability 14\frac14⁠) and one marble is drawn from it at random; the marble is red.
To find
P(box A | red), P(box B | red), P(box C | red).
Plan
(1) Name the events; check the partition. (2) Read P(R∣Ei)P(R|E_i) from the table. (3) Total probability for P(R)P(R)⁠. (4) Bayes' theorem for each box. (5) Sense check.

Basics you need

1Classical probability

A marble drawn at random from a box of 10 is red with probability red marbles10\frac{\text{red marbles}}{10}⁠. Basics: P(E) = n(E)/n(S)

2Conditional probability (Section 13.2)

"Red, if box B was chosen" is P(R∣E2)P(R|E_2)⁠: the box is already known. Lesson: conditional probability

3Total probability and Bayes' theorem (Section 13.5)

P(R)=∑P(Ei)P(R∣Ei)P(R) = \sum P(E_i)P(R|E_i) and P(Ej∣R)=P(Ej)P(R∣Ej)P(R)P(E_j|R) = \frac{P(E_j)P(R|E_j)}{P(R)}⁠. Lesson: Bayes' theorem

4Tree diagrams

One branch per box, then red or not red; multiply along each path. Basics: tree diagrams

Solution

  1. Name the events

    Let E1,E2,E3,E4E_1, E_2, E_3, E_4 be the events that box A, B, C, D is selected, and let RR be the event that the marble drawn is red.

    E1,E2,E3,E4E_1, E_2, E_3, E_4 form a partition of the sample space: exactly one box is selected, and each has probability 14≠0\frac14 \neq 0⁠.

    The box is the hidden cause; the colour is what we see. The question asks which box is likely, given the colour.
    Partition of a sample space (Section 13.5.1). Lesson: Bayes' theorem
  2. The probabilities from the table

    Each box is selected with probability

    P(E1)=P(E2)=P(E3)=P(E4)=14.\begin{aligned} &P(E_1) = P(E_2) \\ &= P(E_3) = P(E_4) = \frac14. \end{aligned}

    Each box holds 10 marbles (1+6+3=101 + 6 + 3 = 10⁠, 6+2+2=106 + 2 + 2 = 10⁠, 8+1+1=108 + 1 + 1 = 10⁠, 0+6+4=100 + 6 + 4 = 10⁠), so

    P(R∣E1)=110,P(R∣E2)=610,\begin{aligned} P(R|E_1) &= \frac{1}{10}, \\ P(R|E_2) &= \frac{6}{10}, \end{aligned} P(R∣E3)=810,P(R∣E4)=0.\begin{aligned} P(R|E_3) &= \frac{8}{10}, \\ P(R|E_4) &= 0. \end{aligned}
    Once the box is known, the chance of red is the number of red marbles in that box out of its 10. Box D has no red marble, so a red marble cannot come from it.
    P(E)=n(E)n(S)P(E) = \frac{n(E)}{n(S)}⁠. Basics: classical probability
  3. The chance of a red marble: total probability

    Since E1,…,E4E_1, \ldots, E_4 form a partition, by the theorem of total probability

    P(R)=P(E1)P(R∣E1)+P(E2)P(R∣E2)+P(E3)P(R∣E3)+P(E4)P(R∣E4)=14⋅110+14⋅610+14⋅810+0=140+640+840=1540.\begin{aligned} P(R) &= P(E_1)P(R|E_1) \\ &\quad + P(E_2)P(R|E_2) \\ &\quad + P(E_3)P(R|E_3) \\ &\quad + P(E_4)P(R|E_4) \\ &= \frac14\cdot\frac{1}{10} + \frac14\cdot\frac{6}{10} + \frac14\cdot\frac{8}{10} + 0 \\ &= \frac{1}{40} + \frac{6}{40} + \frac{8}{40} = \frac{15}{40}. \end{aligned}
    start box chosen marble multiply along the path box E₁: box A R: red 1/4 × 1/10 = 1/40 R′: not red 1/4 × 9/10 E₂: box B R: red 1/4 × 6/10 = 6/40 R′: not red 1/4 × 4/10 E₃: box C R: red 1/4 × 8/10 = 8/40 R′: not red 1/4 × 2/10 E₄: box D R: red 1/4 × 0 = 0 R′: not red 1/4 × 1 1/4 1/10 9/10 1/4 6/10 4/10 1/4 8/10 2/10 1/4 0 1
    The tree for Question 6. The red paths (green) have products 140\frac{1}{40}⁠, 640\frac{6}{40}⁠, 840\frac{8}{40} and 0; together 1540\frac{15}{40}⁠.
    A red marble comes from exactly one of the four boxes, so the four red paths add. Keeping the denominator 40 (rather than reducing 1540\frac{15}{40} to 38\frac38⁠) makes the next step easy.
    Multiply along a path, add the paths. Basics: tree diagrams
  4. Each box, given red: Bayes' theorem

    By Bayes' theorem, P(Ej∣R)=P(Ej)P(R∣Ej)P(R)P(E_j|R) = \frac{P(E_j)P(R|E_j)}{P(R)}⁠. So

    P(E1∣R)=140÷1540=115,P(E2∣R)=640÷1540=615=25,P(E3∣R)=840÷1540=815.\begin{aligned} P(E_1|R) &= \frac{1}{40} \div \frac{15}{40} = \frac{1}{15}, \\ P(E_2|R) &= \frac{6}{40} \div \frac{15}{40} = \frac{6}{15} = \frac25, \\ P(E_3|R) &= \frac{8}{40} \div \frac{15}{40} = \frac{8}{15}. \end{aligned}
    Each top is that box's red path from the tree; the bottom is all the red paths together. Dividing by 1540\frac{15}{40} is multiplying by 4015\frac{40}{15}⁠, so the 40s cancel.
    Bayes' theorem (Section 13.5). Examples 15 to 21
  5. A quick sense check

    Box D gets P(E4∣R)=0÷1540=0P(E_4|R) = 0 \div \frac{15}{40} = 0⁠, and 115+615+815+0=1\frac{1}{15} + \frac{6}{15} + \frac{8}{15} + 0 = 1⁠. The answers are in the ratio 1:6:81 : 6 : 8⁠, the numbers of red marbles in A, B and C.

    The boxes are equally likely and equally full, so every marble is equally likely to be drawn; given red, the marble is one of 15 equally likely red marbles. That is why the answers are simply 115\frac{1}{15}⁠, 615\frac{6}{15}⁠, 815\frac{8}{15}⁠.
    ∑P(Ej∣R)=1\sum P(E_j|R) = 1 for a partition. Lesson: Bayes' theorem
Result

P(box A | red) =115= \frac{1}{15}⁠, P(box B | red) =25= \frac25⁠, P(box C | red) =815= \frac{8}{15}⁠. (Textbook answer: 115,25,815\frac{1}{15}, \frac25, \frac{8}{15}⁠.)

Check it with numbers

Picture 400 rounds, 100 with each box. Red marbles drawn: 10 from A, 60 from B, 80 from C and 0 from D, so 10+60+80=15010 + 60 + 80 = 150 red marbles in all. Shares: 10150≈0.0667\frac{10}{150} \approx 0.0667⁠, 60150=0.4\frac{60}{150} = 0.4⁠, 80150≈0.5333\frac{80}{150} \approx 0.5333⁠, the same as 115≈0.0667\frac{1}{15} \approx 0.0667⁠, 25=0.4\frac25 = 0.4 and 815≈0.5333\frac{8}{15} \approx 0.5333⁠.

Common mistakes
  1. Answering 110\frac{1}{10}⁠, 610\frac{6}{10}⁠, 810\frac{8}{10}⁠. Those are P(red | box), the reverse of what is asked.
  2. Leaving box D out of the partition. D can still be selected; it just contributes 0 to P(R)P(R)⁠. The partition must cover every box.
  3. Dividing by 4 instead of by P(R)P(R)⁠. The bottom of Bayes' theorem is the total probability of red, 1540\frac{15}{40}⁠.
What to take away
  1. When the causes are equally likely and the boxes equally full, Bayes' theorem reduces to "the share of the red marbles in each box".
  2. Keep a common denominator (here 40) in the total probability; the division in Bayes' theorem then cancels it.
  3. Book Example 22 is the same set-up with four boxes of different sizes; there the shortcut does not apply.

Every fact used, and where it comes from

FactUsed inSource
Partition of a sample spaceStep 1Section 13.5.1 (Lesson: Bayes' theorem)
P(E)=n(E)n(S)P(E) = \frac{n(E)}{n(S)} for a random drawStep 2Class XI, Probability (Basics: classical probability)
Conditional probability P(R∣E)P(R|E)Step 2Section 13.2 (Lesson: conditional probability)
Theorem of total probabilityStep 3Section 13.5.2 (Lesson: Bayes' theorem)
Bayes' theoremSteps 4, 5Section 13.5 (Examples 15 to 21)
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 →