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?

1 Answer
Jun 8, 2018

Let #P(A)# be the probability of selecting machine A, #P(B)# be the probability of selecting machine A and #P(D)# be the probability that it is defective
# P(A) = 0.4 #
# P(B) = 0.6 #
# P(D | A) = 0.03 #
# P(D| B) = 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(D) = P(A)* P(D|A) + P(B) * P(D|B) = 0.4 * 0.03 + 0.6* 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(B|D) = \frac{ P(D|B) }{ P(D)} = 0.03/0.42 = \frac{5}{7} or 0.857142... #