In: Math
. A chemist wishes to detect an impurity in a certain compound that she is making. There is a test that detects an impurity with probability 0.92; however,
This test indicates that an impurity is there when it is not about 5% of the time. The chemist produces compounds with the impurity about 15% of the time. A compound is selected at random from the chemist’s output. The test indicates that an impurity is present. What is the conditional probability that the compound actually has the impurity?
P ( Impurity Actually Present ) = 0.15
P ( Impurity Not Actually Present ) = 0.85
P ( Detecting Impurity | Impurity Actually Present ) = 0.92
P ( Detecting Impurity | Impurity Actually Not Present ) = 0.05
We want probability that selected compound actually has the Impurity given that test has detected impurity i.e. ,
P ( Impurity Actually Present | Detecting Impurity ) = ?
We use Bayes Theorem in this Case :
P ( Impurity Actually Present | Detecting Impurity )
= [ P ( Detecting Impurity | Impurity Actually Present ) * P ( Impurity Actually Present ) ] / { P ( Detecting Impurity | Impurity Actually Present ) * P ( Impurity Actually Present ) + P ( Detecting Impurity | Impurity Actually Not Present ) * P ( Impurity Actually Not Present ) }
= ( 0.92 * 0.15 ) / ( ( 0.92 * 0.15 ) + ( 0.05 * 0.85 ) ) = 276 / 361 = 0.764543