Example 1
Question: Bags are filled with marbles as shown below: Bag I: 3 Red, 2 Blue Bag II: 1 Red, 4 Blue Bag III: 2 Red, 3 Blue A bag is chosen at random and one marble is drawn at random from it. The marble drawn is Red. Find the probability that it came from Bag II.
Solution: Let \(B_1\), \(B_2\), \(B_3\) denote the events of selecting Bag I, Bag II, and Bag III respectively, and let \(R\) denote the event that the marble drawn is Red. Since a bag is chosen at random: \[P(B_1) = P(B_2) = P(B_3) = \frac{1}{3}\] Now we find the conditional probabilities of drawing a Red marble from each bag. Bag I has 3 Red out of 5 total: \[P(R \mid B_1) = \frac{3}{5}\] Bag II has 1 Red out of 5 total: \[P(R \mid B_2) = \frac{1}{5}\] Bag III has 2 Red out of 5 total: \[P(R \mid B_3) = \frac{2}{5}\] By the Total Probability Theorem: \[P(R) = P(B_1)\cdot P(R \mid B_1) + P(B_2)\cdot P(R \mid B_2) + P(B_3)\cdot P(R \mid B_3)\] \[P(R) = \frac{1}{3}\cdot\frac{3}{5} + \frac{1}{3}\cdot\frac{1}{5} + \frac{1}{3}\cdot\frac{2}{5}\] \[P(R) = \frac{1}{3}\left(\frac{3}{5} + \frac{1}{5} + \frac{2}{5}\right) = \frac{1}{3} \cdot \frac{6}{5} = \frac{6}{15} = \frac{2}{5}\] By Bayes' Theorem, the probability that the Red marble came from Bag II is: \[P(B_2 \mid R) = \frac{P(B_2)\cdot P(R \mid B_2)}{P(R)}\] \[P(B_2 \mid R) = \frac{\dfrac{1}{3} \cdot \dfrac{1}{5}}{\dfrac{2}{5}} = \frac{\dfrac{1}{15}}{\dfrac{2}{5}} = \frac{1}{15} \times \frac{5}{2} = \frac{5}{30} = \frac{1}{6}\]
Answer: \(P(B_2 \mid R) = \dfrac{1}{6}\)
Example 2
Question: A factory has four machines — M1, M2, M3, and M4 — producing items. The number of defective items produced by each machine per batch is given below: M1: 2 defective, 8 non-defective M2: 5 defective, 5 non-defective M3: 3 defective, 7 non-defective M4: 4 defective, 6 non-defective A machine is chosen at random and one item is picked at random from its batch. The item turns out to be defective. Find the probability that it was produced by machine M3.
Solution: Let \(M_1, M_2, M_3, M_4\) be the events of selecting machines M1, M2, M3, M4 respectively, and let \(D\) be the event that the selected item is defective. Since a machine is chosen at random: \[P(M_1) = P(M_2) = P(M_3) = P(M_4) = \frac{1}{4}\] Each machine has a batch of 10 items. The conditional probabilities of a defective item are: For M1 (2 defective out of 10): \[P(D \mid M_1) = \frac{2}{10} = \frac{1}{5}\] For M2 (5 defective out of 10): \[P(D \mid M_2) = \frac{5}{10} = \frac{1}{2}\] For M3 (3 defective out of 10): \[P(D \mid M_3) = \frac{3}{10}\] For M4 (4 defective out of 10): \[P(D \mid M_4) = \frac{4}{10} = \frac{2}{5}\] By the Total Probability Theorem: \[P(D) = P(M_1)\cdot P(D \mid M_1) + P(M_2)\cdot P(D \mid M_2) + P(M_3)\cdot P(D \mid M_3) + P(M_4)\cdot P(D \mid M_4)\] \[P(D) = \frac{1}{4}\left(\frac{1}{5} + \frac{1}{2} + \frac{3}{10} + \frac{2}{5}\right)\] Converting to a common denominator of 10: \[\frac{1}{5} = \frac{2}{10}, \quad \frac{1}{2} = \frac{5}{10}, \quad \frac{3}{10} = \frac{3}{10}, \quad \frac{2}{5} = \frac{4}{10}\] \[P(D) = \frac{1}{4} \cdot \frac{2 + 5 + 3 + 4}{10} = \frac{1}{4} \cdot \frac{14}{10} = \frac{14}{40} = \frac{7}{20}\] By Bayes' Theorem: \[P(M_3 \mid D) = \frac{P(M_3)\cdot P(D \mid M_3)}{P(D)}\] \[P(M_3 \mid D) = \frac{\dfrac{1}{4} \cdot \dfrac{3}{10}}{\dfrac{7}{20}} = \frac{\dfrac{3}{40}}{\dfrac{7}{20}} = \frac{3}{40} \times \frac{20}{7} = \frac{60}{280} = \frac{3}{14}\]
Answer: \(P(M_3 \mid D) = \dfrac{3}{14}\)