A chemist is interested in determining whether a certain trace impurity is present in a product. An experiment has a probability of 0.80 of detecting the impurity if it is present. The probability of not detecting the impurity if it is absent in 0.90. The probabilities of the impurity being present and being absent are 0.40 and 0.60 respectively. Five separate experiments result in only three detections. What is the probability that the impurity is present?
Can someone help me get on the right track?
What I got out of this question is: $T^+$ = detection, $T^-$= no detection, I = impure, P = pure. $P(T^+|I)$ = 0.8 which implies $P(T^-|I)$ = 0.2; $P(T^-|P)$ = 0.9 which implies $P(T^+|P)$ = 0.1; P(I) = 0.4; P(P)=0.6
I assumed I'd need the reversed conditional probability of $P(I|T^+)$ and $P(I|T^-)$.
$P(T^+)$ = (0.8)(.4) + (0.1)(0.6) = 0.38 by law of total probability, and therefore $P(T^-)$ = 0.62.
$P(I|T^+)$ = $\frac{P(T^+|I)P(I)}{P(T^+)} = \frac{(0.8)(0.4)}{0.38} = \frac{16}{19}$
By similar computation, $P(I|T^-)$ = $\frac{3}{19}$
Final computation would be binomial distribution of ${5}\choose{3}$$(\frac{16}{19})^3$$(\frac{3}{19})^2$
However this ends up not matching with the answer I'm given (studying for a test). Can anyone tell me where I've messed up or if my approach is all wrong?
The probability of having an impurity present and getting three detections in five experiments is
$$\text{P}(I \,{\small\text{ AND }} \, 3 {\small\text{ out of }}5)=\left(\frac{2}{5}\right) \cdot \binom{5}{3} \left(\frac{4}{5}\right)^3\left(\frac{1}{5}\right)^2 = \frac{256}{3125}$$
The probability of not having an impurity present and getting three detections in five experiments is
$$\text{P}(P \,{\small\text{ AND }} \, 3 {\small\text{ out of }}5)=\left(\frac{3}{5}\right) \cdot \binom{5}{3} \left(\frac{1}{10}\right)^3\left(\frac{9}{10}\right)^2 = \frac{243}{50000}$$
We are looking for $\,\text{P}(I \, | \, 3 {\small\text{ out of }}5).$
$$ \begin{align} \text{P}(I \, | \, 3 {\small\text{ out of }}5) &= \frac{\text{P}(I \,{\small\text{ AND }} \, 3 {\small\text{ out of }}5)}{\text{P}(3 {\small\text{ out of }}5)}\\[2ex] &= \frac{\dfrac{256}{3125}}{\dfrac{256}{3125} + \dfrac{243}{50000}}\\[2ex] &= \boxed{\frac{4096}{4339}} \end{align} $$