Example 1: Bayes’ theorem with a tree diagram
A factory has two machines. Machine A makes 60% of the items and machine B makes 40%. 2% of the items from A and 5% of the items from B are defective. An item chosen at random is defective. Find the probability that it was made by machine B.
P(A ∩ D) = 0.6 × 0.02 = 0.012P(B ∩ D) = 0.4 × 0.05 = 0.020P(D) = 0.012 + 0.020 = 0.032P(B | D) = 0.020 / 0.032 = 0.625
Answer: 0.625
