1
$\begingroup$

Suppose I have the following events:

  • Event A: Contracted HIV
  • Event B: Tested Positive with HIV

Given $1$ in $1000$ people gets contracted with HIV and the HIV Test gives a wrong test result for $1$ in $100$ people. If a person is tested Positive with HIV, I need to find the probability of him really contracted with HIV.

So I need to find $P(A|B)$ and that $P(A|B)=\frac{P(B|A) \cdot P(A)}{P(B)}$.

To find $P(B)$, I need to find all that are tested positive. So...

$P(B)=\frac{1}{1000} \cdot \frac{99}{100}+\frac{999}{1000} \cdot \frac{1}{100}=\frac{1098}{100000}$

$P(B|A)=\frac{1}{1000} \cdot \frac{99}{100}=\frac{99}{100000}$

$P(A)=\frac{1}{1000}$

Therefore, $P(A|B)=\frac{P(B|A) \cdot P(A)}{P(B)}=\frac{\frac{99}{100000}\cdot \frac{1}{1000}}{\frac{1098}{100000}}=\frac{11}{122000}=0.0000901639=0.009016\%$

While this may seem ok to me at first, I suspected my answer to be wrong because $0.009016\%$ as a figure is a little hard to believe. I did a search on the internet and looks like the answer could be just $ \frac{99}{1098} = 9.016\% $.

Is my initial answer wrong? What has gone wrong with my initial answer of $0.009016\%$? I simply followed the Bayes' Conditional formula.

  • 0
    $P(B|A)$ should be $99/100$, as this is the probability that the test will not be wrong on someone who has HIV. This is where the $1000\times$ discrepancy between your answer and the correct one lies.2012-01-17
  • 0
    $P(B|A)=0.99$. You got a far smaller number.2012-01-17
  • 0
    hmm.. I don't understand why should $P(B|A)=\frac{99}{100}$. $P(B|A)$ is the probability of Getting Tested Positive Given that a person is really contracted with HIV. So shouldn't it be Event B AND Event A, and so a multiplication between the probabilities of the two events?2012-01-17
  • 0
    @xEnOn No. It is the probability that a person tests positive *if they have HIV*. If a person has HIV, the probability that they have HIV is 1, not 1/1000.2012-01-17
  • 0
    @AlexBecker Sounds right. But then the $P(B)=\frac{1}{1000} \cdot \frac{99}{100}+\frac{999}{1000} \cdot \frac{1}{100}=\frac{1098}{100000}$ would be a little weird on the part $\frac{1}{1000} \cdot \frac{99}{100}$. Wouldn't the part $\frac{1}{1000} \cdot \frac{99}{100}$ meant *"The probability of getting tested positive if they have HIV"* too?2012-01-17
  • 1
    Forget about what *operation* to use. If a person has HIV (A), what is the probability that the test will be positive (B)? By the information we were given, the test is correct $99$ percent of the time, so given the person has HIV, there is a probability $0.99$ that the test will say yes. By the way, the problem is not well-worded. We are forced to assume that the probability of a false positive is the same as the probability of a false negative, namely $0.01$. For medical tests, the probability of a false positive is often significantly different from the probability of a false negative.2012-01-17
  • 1
    @xEnOn No. $\frac{1}{1000} \cdot \frac{99}{100}$ is the probability of being tested positive AND having HIV **for a random person**. $\frac{99}{100}$ is the probability of being tested positive for someone **with HIV**.2012-01-17
  • 1
    @AndréNicolas This is simplified in many ways, so I'm not particularly bothered by that issue. For example, people who are at risk for HIV are probably more likely to get tested as well, but the problem ignores this.2012-01-17
  • 0
    ohh..Thanks guys! Thanks so much for the help. I think I'm getting the idea now. There is a difference between the ordinary '*AND*' probability and the conditional one. And that the conditional one mainly considers only the set within the given event set. And so the $\frac{99}{100}$ is the probability of being tested positive for someone **with HIV** because **with HIV** is the given event A, particularly $P(B|A)$ and so it is just $\frac{99}{100}$.2012-01-17
  • 0
    @xEnOn Yes, that's correct.2012-01-17

1 Answers 1

4

For convenience, let's say that there are 100,000 people (why I chose 100,000 will hopefully be clear shortly). Since you said 1 in 1000 people has HIV, of our 100,000 people, 100 have HIV and 99,900 do not. Since the HIV test returns an incorrect result 1 in 100 times: of the 100 HIV-positive people, 99 will test positive and 1 will test negative; of the 99,900 HIV-negative people, 98,901 will test negative and 999 will test positive. Making a chart:

                  HIV-positive      HIV-negative      total tests positive           99               999         1,098 tests negative            1            98,901        98,902          total          100            99,900       100,000 

Now, you wanted the probability that a person who tests positive is actually HIV-positive. 1,098 people tested positive and of those, only 99 were HIV-positive. $$\frac{99}{1098}=\frac{11}{122}\approx 9.01639\%$$

As stated in comments, it's your $P(B|A)$ that's off. $P(B|A)$ is the probability that an HIV-positive person tests positive—in the table above, there are 100 HIV-positive people and 99 test positive, so $$P(B|A)=\frac{99}{100}.$$

You might consider an alternate formula for the conditional probability: $$P(A|B)=\frac{P(A\text{ and }B)}{P(B)}.$$ $P(A\text{ and }B)$ is the probability of a person testing positive and being HIV-positive, which is the 99 out of 100,000 that you computed, so $$P(A|B)=\frac{P(A\text{ and }B)}{P(B)}=\frac{\frac{99}{100000}}{\frac{1098}{100000}}=\frac{99}{1098}=\frac{11}{122}\approx 9.01639\%.$$