In: Statistics and Probability
Ex. A group of research scientists collect 2000 water samples from drinking water in Central Arizona. They test those samples for a certain chemical. The test isn’t 100% accurate. If the sample contains the chemical, it will show a positive test result 93% of the time. If the sample does not contain the chemical, it gives a negative result 97% of the time. If 170 groundwater samples contain chemicals, what is the probability the sample contains a chemical if you have a positive test return for the sample
We are given:
P(Positive test when sample contains the chemical ) = 93% = 0.93
P(Negative test when sample contains the chemical ) = 1 - 0.93 = 0.07
P(Negative test when sample does not contain the chemical ) = 97% = 0.97
P(Positive test when sample does not contain the chemical ) = 1 - 0.97 = 0.03
P(sample contains chemical) = 170/2000 = 0.085
P(sample does not contain chemical) = 1-0.085 = 0.915
Required probability = P(sample contains chemical when positive test)
= P(sample contains chemical and positive test) / P(positive test)
Now,
P(sample contains chemical and positive test) = P(sample contains chemical)*P(Positive test when sample contains the chemical ) = 0.085*0.93 = 0.079
P(positive test) = P(sample contains chemical)*P(Positive test when sample contains the chemical ) + P(sample does not contain chemical)*P(Positive test when sample does not contain the chemical )
= 0.085*0.93 + 0.915*0.03 = 0.1065
So,
Required probability = P(sample contains chemical when positive test) = 0.079 / 0.1065 = 0.742