The problem I'm dealing with is taken from my book's section on Bayes' Theorem, which I understand. Here it is:

Assume one person out of 10,000 is infected with HIV, and there is a test in which 2.5% of all people test positive for the virus although they do not really have it. If you test negative on this test, then you definitely do not have HIV. What is the chance of having HIV, assuming you test positive for it?


So I started by defining some sets. Let $T$ be the event that you test positive for HIV, $\overline{T}$ be the event that you test negative for HIV, $H$ be that you actually have HIV, and $\overline{H}$ be that you don't have HIV. We want to find $p(H \space | \space T)$, and here's what we know:

1) $p(H) = 0.0001$

2) $p(\overline{H}) = 0.9999$

3) $p( T \space | \space \overline{H}) = 0.025$

4) $p( H \space | \space \overline{T}) = 0$ (because the prompt states that if you test negative, then you definitely don't have HIV, so the probability of having HIV given that you tested negative is $0$).

Issues and concerns

From here, I don't know how to proceed, because here's what Bayes Theorem states:

$p(H \space | \space T) = \frac{p(T \space | \space H) \cdot p(H)}{p(H)p(T \space | \space H) + p(\overline{H})p(T \space | \space \overline{H})}$

The only component I don't know is $p(T \space | \space H)$.

What's more concerning to me is that the book says something different for #4 above, the statement about definitely not having HIV if you test negative:

The problem states that if a person tests negative, then that person definitely does not have HIV. Therefore, it is impossible for a person to test negative and have HIV, so $p(\overline{T} \cap H) = 0$. Since $p(\overline{T}|H) = p(\overline{T} \cap H)/p(H)$, then $p(\overline{T}|H) = 0$. Since $p(\overline{T}|H) + p(T|H) = 1$, we know that $p(T|H) = 1$

But I disagree with their claim that the statement

If you test negative on this test, then you definitely do not have HIV

Translates to $p(\overline{T}|H) = 0$. Why was I wrong?

  • 1
    $\begingroup$ Related - see my answer here: math.stackexchange.com/questions/2279851/… $\endgroup$ Commented Jul 12, 2017 at 19:16
  • $\begingroup$ Okay, thinking of it as a false negative makes sense. But what is the difference between saying "the probability of having HIV given you tested negative" and "the probability of testing negative given you have HIV" in this scenario? $\endgroup$ Commented Jul 12, 2017 at 19:19
  • $\begingroup$ Your first statement is about false negatives - probability $0$. The second is about false positives - probability $2.5\%$, though badly worded. Maybe it's $2.5\%$ positive for the whole population. $\endgroup$ Commented Jul 12, 2017 at 19:22
  • $\begingroup$ Thanks! Though I'm still slightly confused: how is the second statement about false positives if it's not about testing positive while not having HIV? Certainly, if you don't have HIV and test for HIV, that's a false positive. But I'm talking about "the probability of testing negative given you have HIV", which is a false negative because it falsely reports that you are "negative" for HIV when in fact you have it. $\endgroup$ Commented Jul 12, 2017 at 19:23
  • $\begingroup$ It's not. Sorry. They are both about false negatives. The difference between them is the denominator when computing the probability - a row total or a column total in the contingency table in my linked answer. $\endgroup$ Commented Jul 12, 2017 at 19:33

1 Answer 1


You weren't wrong! Indeed the statement most directly translates to $P(H|\overline{T})=0$, which is what you did. However, this implies that $P(\overline{T} \cap H)=0$ and that $P(\overline{T}|H)=0$, which is what the book did. All these three probabilities are $0$ when you are dealing with mutually exclusive events.

  • $\begingroup$ Gotcha, so it's just two ways of saying the same thing for this problem, and I happened to choose the one that was not so obvious to translate to the probability I needed in my equation (even though it was equivalent). I imagine this is only true because the probability was $0$, because otherwise you can't equate those two probabilities. $\endgroup$ Commented Jul 12, 2017 at 19:57
  • $\begingroup$ @AleksandrH Exactly! In general, when $A$ and $B$ are mutually exclusive events, then $P(A|B)=P(B|A)=P(A \cap B)=0$. So there are actually 3 ways of capturing that. I would say you chose the correct one as the direct translation (and I think the book should have started with that one as well) but you can then infer the others as well. $\endgroup$
    – Bram28
    Commented Jul 12, 2017 at 20:05
  • $\begingroup$ Can you maybe also help me with this question: math.stackexchange.com/questions/2740647/… $\endgroup$
    – John Smith
    Commented Apr 17, 2018 at 1:41
  • $\begingroup$ @JohnSmith The posted Answer there should tell you how to do that one. $\endgroup$
    – Bram28
    Commented Apr 17, 2018 at 11:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .