Probability defective items Two shipments of parts are received. The first shipment contain 1000 parts with 10% defective and the second contain 2000 parts with 5% defectives. Two parts are selected from a shipment selected at random and they are found to be good. Find the probability that the tested parts were from 1st shipment?
 A: Let $A$ be the event the parts were selected from the first shipment, and let $G$ be the event they are both good. 
We want the probability they are from the first shipment, given they are both good. So we want $\Pr(A|G)$.
By the definition of conditional probability, we have
$$\Pr(A|G)=\frac{\Pr(A\cap G)}{\Pr(G)}.\tag{1}$$ 
We find the two probabilities on the right-hand side of (1).
The event $G$ can happen in two disjoint ways: (i) we select from the first shipment, and both items are good or (ii) we select from the second shipment, and both items are good.
We find the probability of (i). The probability we choose from the first shipment is $\frac{1}{2}$. Given that we selected from the first shipment, the probability they were both good is $\frac{900}{1000}\cdot \frac{899}{999}$. 
Thus the probability of (i) is $\dfrac{1}{2}\cdot\dfrac{900}{1000}\cdot\dfrac{899}{999}$.
Similarly, find the probability of (ii). Add to get $\Pr(G)$. 
Note that the numerator in Formula (1) is just what we called the probability of (i).
Remark: We interpreted "$10\%$ bad" literally, as in exactly $10$ percent, that is, exactly $100$ bad items in the group of $1000$. However, another reasonable interpretation is that the first shipment comes from a supplier who has a $10\%$ bad rate. Then we would replace $\frac{900}{1000}\cdot \frac{899}{999}$ by $\left(\frac{90}{100}\right)^2$. Numerically, it makes no practical difference.
