# What is the probability of a product being defective, given subsequent observations?

Let's say I have a factory producing 28% defective bottles. A defective bottle has a 66.5% chance of breaking when dropped on the ground and a non-defective bottle only has a 9.5% chance to break.

Given that I dropped a randomly picked bottle on the ground 4 times and it didn't break (its chance to break doesn't increase with every drop), what is the chance for that bottle to be defective?

This is a homework question and I attempted to use Bayes' rule such as

$P(Defective | IntactX4) = {P(IntactX4|Defective)P(Defective)\over P(IntactX4)}$

$P(Defective | IntactX4) = {(1-0.665)^4 * 0.28\over (0.28*(1-0.665)+(1-0.28)*(1-0.095))^4}$

Therefore

$P(Defective | IntactX4) \approx0.011422987612$

However, this does not appear to be the correct answer. I wonder if there is something wrong with the way I use Bayes' rule. Can anyone shed some light?

-
There is a typo (or error) in the denominator. The first term should be exactly like the numerator. You are missing an exponent of $4$. – André Nicolas Oct 10 '12 at 21:20
You denominator is not right. – Patrick Li Oct 10 '12 at 21:25

Denominator should be

$$P(\text{Intact X 4})=P(\text{Intact X 4}|\text{Defective})P(\text{Defective}) + P(\text{Intact X 4}|\text{Good})P(\text{Good})$$

where the first term is just your numerator.

-
Thanks, I didn't realize I wasn't calculating this right. – pwny Oct 10 '12 at 21:59

I did not check the final calculations, but the math is correct. Why do you assume it to be wrong?

-

It should be $\dfrac{(1−0.665)^4\times 0.28}{0.28\times(1−0.665)^4+(1−0.28)\times(1−0.095)^4}$.

-