The question is stated as:
A shipment of watches is shipped in two boxes. One contains 150 watches of which 21 are broken. The second box contains 100 of which 4 are broken. A box is chosen at random and then from the chosen box a watch is picked at random. It turns out to be broken. What is the probability is was shipped in the first box?
My attempt:
Define the following events,
$S_1 := \text{The watch is shipped in the first box.}$
$ B_1 :=\text{The first box is choosen}$
$A := \text{The choosen watch is broken}$
The probability we want to calculate is then given by bayes theorem,
$P(S_1|A)=\frac{P(A|S_1)P(S_1)}{P(A)}$
My question: is $P(A) = \frac{25}{250}$ or do you need to use the law of total probability
$P(A) = P(A|B_1)P(B_1) + P(A|B_1^c)P(B_1^c)$ ? Or is the approach wrong in general?
I'll just go ahead and post a full solution. I'll change the notation a bit to my own taste. Let
The following probabilities are given:
The probability we want to calculate is $P(B_1|A)$ and indeed we can use Bayes' theorem for this: $$ P(B_1 | A) = \frac{P(A|B_1)P(B_1)}{P(A)} $$ The denominator is always the tricky part in these calculations. We can use the law of total probability: $$ P(A) = P(A|B_1)P(B_1) + P(A|B_2)P(B_2) = \frac{21}{150} \frac{1}{2} + \frac{4}{100}\frac{1}{2} = \frac{9}{100} $$ Now we know all the values required, and we can just plug in the values to the final expression: