Answer:
(a) If a bottle fails inspection, the probability that it has a flaw is P(F | Fail) = 0.0195
(b) If a bottle passes inspection, the probability that it does not have a flaw is P(NF | Pass) = 0.99
Step-by-step explanation:
Let F denote that the bottle has a flaw, NF denote that the bottle has no flaw, Pass denote that the bottle passes the inspection test and Fail denote that the bottle fails the inspection test.
We are given with the probabilities:
P(F) = 0.0002
P(Fail | F) = 0.995
P(Pass | NF) = 0.99
We can obtain the probabilities:
P(NF) = 1 - 0.0002 = 0.9998
P(Pass | F) = 1 - P(Fail | F)
= 1 - 0.995
P(Pass | F) = 0.005
P(Fail | NF) = 1 - P(Pass | NF)
= 1 - 0.99
P(Fail | NF) = 0.01
a. We need to find the probability that the bottle has a flaw given that it fails the inspection i.e. P(F | Fail). We can use the Baye's theorem to find this probability.
P(F | Fail) = P(Fail | F)*P(F) / [P(Fail | NF)*P(NF) + P(Fail | F)*P(F)]
= (0.995)*(0.0002)/[(0.01)*(0.9998) + (0.995)*(0.0002)]
= 0.000199/(0.009998+0.000199)
= 0.000199/0.010197
P(F | Fail) = 0.0195
b. We need to compute the probability that the bottle does not have a flaw given that it passes the inspection. i.e. P(NF | Pass)
P(NF | Pass) = P(Pass | NF)*P(NF) / [P(Pass | F)*P(F) + P(Pass | NF)*P(NF)]
= (0.99)*(0.9998)/[(0.005)*(0.0002) + (0.99)*(0.9998)]
= 0.989802/(0.000001 + 0.989802)
= 0.989802/0.989803
P(NF | Pass) = 0.99