[Math] what is the probability that part is actually defective

probability

I've this "simple" yes it's simple, question, from which I got different outcomes, and I would like to have a differente opinion.

A manufacturing process has a 3% defect rate. Inspectors catch 95% of defects but also fail 5% of non-defective parts. If we pick a part at random from all those that pass inspection, what is the probability that part is actually defective?

On my side , I get 0,5% of probability that part is defective if picked randomly.

In the other hand, 0,16% seems to be the write answer.

If someone could share his result, It would be very much appreciated.

Rgds.

Best Answer

This problem can be tackled using conditional probability.

We are seeking the probability that a part is defective, given that it has passed inspection. $Pr(\text{defective}|\text{passed inspection})$.

By Bayes’ theorem, this is equal to $$\frac{Pr(\text{passed inspection}|\text{defective})Pr(\text{defective})}{Pr(\text{passed inspection})}$$

We are given that $Pr(\text{defective}) = 0.03$ and we know that $Pr(\text{passed inspection}|\text{defective}) = 1 - 0.95 = 0.05$ because this is the probability that a defective item is not detected.

We can then calculate $Pr(\text{passed inspection})$ as

$$Pr(\text{passed inspection}|\text{defective})Pr(\text{defective}) + Pr(\text{passed inspection}|\text{not defective})Pr(\text{not defective})$$

(because there are two ways of passing inspection, one if the item is defective, and another if the item is not defective)

which is

$$0.05 \times 0.03 + (1-0.05) \times (1 -0.03) = 0.923$$

So for $Pr(\text{defective}|\text{passed inspection})$ we have $\frac{0.03 \times 0.05}{0.923} \approx 0.0016 = 0.16\%$.