# Defective component probability

A lot of components contain 5% defectives. Each component is subjected to a test that correctly identifies a defective, but given a component is good, there is a 2% chance that these components are also indicated defective. Given a randomly chosen component is declared defective by the tester, compute the probability that it is actually defective.

• Hmmm... I wonder how the "$5$% defectives" piece of information could have any effect on the answer... Oct 9 '14 at 8:22
• I think that part is only stating a fact of components Oct 9 '14 at 8:24
• So isn't the answer simply $98$%? Oct 9 '14 at 8:25

Use Bayes' formula: $$P(A|B)=\frac{P(A)P(B|A)}{P(B)}$$ Define $A$ as defective, $B$ as shown defective by test. So we have $$P(A|B) = \frac{0.05*1}{0.95*0.02+0.05}$$