How to calculate Pr(Diseased | 2 Positive Tests)?

P(T) = P(T | D) + P (T | !D) = 0.98 + .05 = 1.03 ...?

That is incorrect. P(T) = P(T | D) x P(D) + P(T | !D) x P(!D) (remember Bayes' Rule?)

I think this alone is enough information for you to solve it. I must post this as a comment but due to no rep, am posting it as an answer. Hope it helps.


To get a handle on what Bayes’ rule is really doing in a simple case like your first problem, look at a little table:

$$\begin{array}{r|cc|c} &T&\lnot T&\text{Total}\\ \hline D&\color{red}{0.0098}&\color{red}{0.0002}&0.01\\ \lnot D&\color{red}{0.0495}&\color{red}{0.9405}&\color{blue}{0.99}\\ \hline \text{Total}&\color{green}{0.0593}&\color{green}{0.9407}&\color{blue}{1} \end{array}$$

What’s in black shows the basic setup: the number in row $D$ and column $T$ will be the probability that you have the disease and test positive, for instance. (I’ve used $\lnot D$, meaning $\text{not }D$, for the event of not having the disease.) I’ve also written in black the one number that you were explicitly given that goes in the table, namely, the probability that a randomly chosen person has the disease. Obviously the probability in the lower righthand corner must be $1$, and the probability that a randomly chosen person does not have the disease must be $1-0.01=0.99$, so I added those in blue.

Next, we know that $98$% of the $1$% who have the test will test positive, so the probability that a randomly chosen person both has the disease and tests positive is $0.98\cdot0.01=0.0098$, and the probability that such a person both has the disease and tests negative must be $0.01-0.0098=0.0002$; I’ve added these in red.

Similar reasoning tells us that the probability that a randomly chosen person does not have the disease and tests negative is $0.95\cdot0.99=0.9405$, so the probability that such a person does not have the disease but tests positive is $0.99-0.9405=0.0495$; I’ve added these in red as well.

At this point we can complete the table by adding the $T$ and $\lnot T$ columns to get the missing totals on the bottom line.

Now, suppose that you test positive. That means that you’re one of the $14.75$% represented by the first column of the table, and you want to know your chance of being one of the $0.98$% who test positive and have the disease. That probability is $\dfrac{0.0098}{0.0593}\approx 0.1653$: you have almost one chance in six of having the disease.

Bayes’ rule boils all of this down to a single formula. We ended up calculating the ratio $$\frac{\mathrm{Pr}(D\cap T)}{\mathrm{Pr}(T)}\;,$$ but we got the numerator by calculating $\mathrm{Pr}(T|D)\mathrm{Pr}(D)$, so in fact we calculated

$$\mathrm{Pr}(D|T)=\frac{\mathrm{Pr}(T|D)\mathrm{Pr}(D)}{\mathrm{Pr}(T)}\;,$$

which is Bayes’ rule.

In this case we also had to work a bit to get the denominator; that’s typical.


We want $\Pr(D|T)$. By the universal formula to solve such problems, we have $$\Pr(D|T)\Pr(T)=\Pr(D\cap T).$$

It remains to calculate $\Pr(T)$ and $\Pr(D\cap T)$.

Let's go first for the harder one, $\Pr(T)$. The event $T$ can happen in two disjoint ways: (i) You have the disease and the test says so or (ii) You don't have the disease, but the test says you do.

For (i), the probability you have the disease is $0.01$. Given that you have the disease, the probability the test says so is $0.98$. So the probability of (i) is $(0.01)(0.98)$.

We can calculate the probability of (i) in a more fancy way. We want $\Pr(D\cap T)$. This is $\Pr(T|D)\Pr(D)$, which is $(0.98)(0.01)$.

For (ii), the probability you don't have the disease is $0.99$. Given you don't have the disease, the probability the test wrongly says you do is $0.05$. So the probability of (ii) is $(0.99)(0.05)$.

Add the probabilities of (i) and (ii) to get $\Pr(T)$.

For $\Pr(D\cap T)$, note it is just the already computed probability of (i).

Remark: At one time, tuberculosis was not uncommon. A simple antibody test, the tuberculin test, was routinely given to people. The tuberculin test gave a significant proportion of false positives, and a smaller proportion of false negatives, these mostly due to handling mixups. People who tested positive had X-ray chest examinations for confirmation. After a while, tuberculosis became quite rare, at least in relatively prosperous communities. Just as in the above problem, it turned out that a large proportion of the people who tested positive and got X-rayed were healthy. The X-rays became more of a public health hazard than the disease, and the routine tuberculin test disappeared.