Probability of infection with two positive tests

bayes-theoremconditional probabilityprobability

A person does two independent tests to check for an infection, both are positive. How high is the probability of an infection, if sensitivity $P(T|I)$ and specificity $P(\neg T| \neg I)$ of both tests as well as the prevalence $P(I)$ are known?

My approach:
\begin{align}
P(I|T_1, T_2) &= \frac{P(T_1, T_2|I)P(I)}{P(T_1, T_2)}\\
&= \frac{P(T_1|I)P(T_2|I)P(I)}{P(T_1)P(T_2)}\\
&= \frac{P(T_1|I)P(T_2|I)P(I)}{\big[P(T_1|I)P(I)+P(T_1|\neg I)P(\neg I)\big]\cdot \big[P(T_2|I)P(I)+P(T_2|\neg I)P(\neg I)\big]}\\
&= \frac{P(T_1|I)P(T_2|I)P(I)}{\big[P(T_1|I)P(I)+[1-P(\neg T_1|\neg I)][1-P(I)]\big]\cdot \big[P(T_2|I)P(I)+[1-P(\neg T_2|\neg I)][1-P(I)]\big]}\\
\end{align}

However, if I input numbers I often get $P(I|T_1, T_2) > 1$, which should not be possible (e.g. with $P(T|I) = P(\neg T| \neg I) = 0.95$ and $P(I) = 0.1$ the result is $P(I|T_1, T_2)\approx 4.6$).

Where is the mistake?

Best Answer

Based on @lulu's comment, this should be the solution:

\begin{align} P(I|T_1, T_2) &= \frac{P(T_1, T_2|I)P(I)}{P(T_1, T_2)}\\ &= \frac{P(T_1|I)P(T_2|I)P(I)}{P(T_1, T_2|I)P(I)+P(T_1, T_2|\neg I)P(\neg I)}\\ &= \frac{P(T_1|I)P(T_2|I)P(I)}{P(T_1|I)P(T_2|I)P(I)+P(T_1|\neg I)P(T_2|\neg I)P(\neg I)}\\ &= \frac{P(T_1|I)P(T_2|I)P(I)}{P(T_1|I)P(T_2|I)P(I)+[1-P(\neg T_1|\neg I)][1-P(\neg T_2|\neg I)][1-P(I)]} \end{align}

The problem was that $T_1$ and $T_2$ are not independent if they are not conditioned on $I$ or $\neg I$.

Related Question