# Conditional Probability/ Bayes' Theorem puzzle

I always believed that problems on conditional probability could be solved with common logic without using Bayes' theorem (because I cannot understand Bayes' theorem intuitively and I didn't bother because I knew another way).

But this problem gives me varying answers with general logic and Bayes' Theorem.

A test for a sickness is 99% reliable. That is, 99% of the healthy people test negative, and 99% of sick people test positive.
Given that 1% of the entire population is actually sick, what are the chances that you are actually sick if you test positive?

Here is my solution without using Bayes' theorem.

$$P(being\ sick\ |\ test\ positive) = \frac{Number\ of\ people\ who\ are\ actually\ sick}{Number\ of\ people\ who\ test\ positive}$$

$$So,P(being\ sick\ |\ test\ positive)= \frac{1\%\ of\ \ the\ total\ population}{1\%\ of\ healthy\ people+99\%\ of\ sick\ people}$$ $$Let\ the\ total\ population\ be\ x. So,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$ $$P=\frac{0.01x}{0.01*0.99x+0.99*0.01x}$$ $$P=\frac{1}{0.99+0.99}=\frac{1}{1.98}$$

But, when you use Bayes' theorem, you get P=1/2. Why is the denominator off by 0.02?
Either I'm wrong (but I really can't see why) or there is some kind of an approximation in Bayes' theorem (highly impossible). Can someone please tell me what are the other factors that Bayes' theorem considers but my solution doesn't? I would also be extremely grateful if someone could explain the theorem can be understood intuitively.

• If there would be more people that are actually sick than people who test positive, then your probability would exceed $1$ so something is wrong there, as is explained in the answer of vadim123. – drhab Nov 29 '13 at 15:54

Your numerator should be those people that get sick AND test positive, or $0.99\times 0.01x$.

In some sense, your universe is those people who test positive, which is $0.01x$. That includes healthy people with false positives, and sick people with true positives. In this problem those two populations are of equal size, hence $\frac{1}{2}$.

I'll try to give you a different point of view on Bayes's theorem and then solve the numerical puzzle.

Bayes's theorem is just the consequence of the rule for joint probabilities, and all results we get from it we can also get by considering joint probabilities:

If we have two propositions $$A$$, $$B$$, the probability about their conjunction ("and") given background knowledge $$I$$ is $$\mathrm{P}(A \land B \mid I) = \mathrm{P}(A \mid B \land I) \times \mathrm{P}(B \mid I).$$ This formula is saying: to assess the probability that both $$A$$ and $$B$$ are true, first assess the probability that $$A$$ is true assuming that $$B$$ is true, and then assess the probability that $$B$$ by itself is true. Then multiply the two probabilities. You can find a discussion of why this procedure is intuitively reasonable in an article by R. T. Cox: Probability, frequency, and reasonable expectation, Am. J. Phys. 14 (1946), pp. 1–13 (also at this link, and this link).

But conjunction is commutative: $$A \land B \iff B \land A$$. So we can exchange $$A$$ and $$B$$ in the formula above: $$\mathrm{P}(A \land B \mid I) = \mathrm{P}(B \mid A \land I) \times \mathrm{P}(A \mid I). \label{product}\tag{1}$$

Combining the two expressions of the formula we have $$\mathrm{P}(A \mid B \land I) \times \mathrm{P}(B \mid I) = \mathrm{P}(B \mid A \land I) \times \mathrm{P}(A \mid I), \label{commutative}\tag{2}$$ which again is saying that whether we apply the procedure with one proposition first, or with the other first, we must logically get the same conclusion.

If we isolate $$\mathrm{P}(A \mid B \land I)$$ on the left side we finally find $$\mathrm{P}(A \mid B \land I) = \frac{\mathrm{P}(B \mid A \land I) \times \mathrm{P}(A \mid I)}{\mathrm{P}(B \mid I)},$$ and this is Bayes's theorem. As you see, instead of using Bayes's theorem we can proceed from formula $$\eqref{commutative}$$, which in turn comes from $$\eqref{product}$$.

Now to your numerical problem. The information $$I$$ that it gives you is this: $$\mathrm{P}(\text{negative} \mid \text{healthy} \land I) = 0.99,$$ $$\mathrm{P}(\text{positive} \mid \text{sick} \land I) = 0.99,$$ $$\mathrm{P}(\text{sick} \mid I) =0.01,$$ and it's asking you $$\mathrm{P}(\text{sick} \mid \text{positive} \land I) = \text{?}$$

Note that the premises immediately give us some other probabilities: each person either tests positive or negative, so $$\mathrm{P}(\text{negative} \mid \text{any health condition} \land I) + \mathrm{P}(\text{positive} \mid \text{any health condition} \land I) =1,$$ and therefore we have two additional probabilities: $$\mathrm{P}(\text{positive} \mid \text{healthy} \land I) = 1- \mathrm{P}(\text{negative} \mid \text{healthy} \land I) =0.01,$$ $$\mathrm{P}(\text{negative} \mid \text{sick} \land I) = 1- \mathrm{P}(\text{positive} \mid \text{sick} \land I) =0.01.$$ Also, every person is either sick or healthy, so $$\mathrm{P}(\text{healthy} \mid I) + \mathrm{P}(\text{sick} \mid I) =1,$$ and therefore $$\mathrm{P}(\text{healthy} \mid I) = 1- \mathrm{P}(\text{sick} \mid I) = 0.99.$$

Now let's use formula $$\eqref{commutative}$$ to find the probability asked by the problem: $$\mathrm{P}(\text{sick} \mid \text{positive} \land I) \times \mathrm{P}(\text{positive} \mid I) = \mathrm{P}(\text{positive} \mid \text{sick} \land I) \times \mathrm{P}(\text{sick} \mid I),\label{solution}\tag{3}$$ that is, we are calculating the probability that someone is sick and tests positive. In the equation above we already have the last two probabilities. We need the second, $$\mathrm{P}(\text{positive} \mid I)$$. To calculate this we use formula $$\eqref{product}$$. For a person who tests positive we have two possibilities: either the person tests positive and is healthy, or tests positive and is sick. The two possibilities are mutually exclusive. Therefore $$\mathrm{P}(\text{positive} \mid I) = \mathrm{P}(\text{positive} \land \text{healthy}\mid I) + \mathrm{P}(\text{positive} \land \text{sick}\mid I).$$ Applying formula $$\eqref{product}$$ to each summand we get $$\mathrm{P}(\text{positive} \mid I) = \mathrm{P}(\text{positive} \mid \text{healthy} \land I) \times \mathrm{P}(\text{healthy} \mid I) + \mathrm{P}(\text{positive} \mid \text{sick} \land I) \times \mathrm{P}(\text{sick} \mid I).$$ Here we already have all probabilities and we find $$\mathrm{P}(\text{positive} \mid I) = 0.01 \times 0.99 + 0.99 \times 0.01 = 0.0198.$$

We can finally use this in formula $$\eqref{solution}$$: $$\mathrm{P}(\text{sick} \mid \text{positive} \land I) \times 0.0198 = 0.99 \times 0.01,$$ and we find $$\mathrm{P}(\text{sick} \mid \text{positive} \land I) = \frac{0.99 \times 0.01}{0.0198} = 0.5,$$ which is the answer to the problem.

From the calculations above you can see that Bayes's theorem gives you, in a compact and ready-to-use way, the final result of applying formula $$\eqref{commutative}$$ twice.