# How do I solve for the probability?

## Two machines A and B produce 40% and 60% of the daily output respectively. Each machine also produces a total of 3% and 5% respectively, of items that are defective. a) An item is selected at random. What is the probability that it is defective? b) An item is selected and found to be defective. What is the probability that it came from machine B?

Jun 8, 2018

Let $P \left(A\right)$ be the probability of selecting machine A, $P \left(B\right)$ be the probability of selecting machine A and $P \left(D\right)$ be the probability that it is defective
$P \left(A\right) = 0.4$
$P \left(B\right) = 0.6$
$P \left(D | A\right) = 0.03$
$P \left(D | B\right) = 0.05$

Let the number of items be 1000, then:

400 of them will be from A and 12 out of the 400 will be defective,

600 of them will be B and , 30 out of the 600 will be defective
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Question a)  P(D) = ?

$P \left(D\right) = P \left(A\right) \cdot P \left(D | A\right) + P \left(B\right) \cdot P \left(D | B\right) = 0.4 \cdot 0.03 + 0.6 \cdot 0.05 = 0.012 + 0.03 = 0.042$

Thus, the probability that the item is defective is 4.2%

Question b) P(B|D) = ?

$P \left(B | D\right) = \setminus \frac{P \left(D | B\right)}{P \left(D\right)} = \frac{0.03}{0.42} = \setminus \frac{5}{7} \mathmr{and} 0.857142 \ldots$