Probability HIV diagnostic test is right

Hi everyone I would I really appreciate if anyone could help me out with this problem. I was discussing it with a friend and we disagreed on whether we needed to treat this as a conditional probability problem or whether we just needed to multiply 94% and 98% to get the answer. This is not for a class, I am just interested in the topic.

The probability that a patient has HIV is 0.001 and the diagnostic test for HIV can detect the virus with a probability of 0.98. Given that the chance of a false positive is 6%, what is the probability that a patient who has already tested positive really has HIV?

-
I'm confused. Could you clarify what you mean by the accuracy of the testing method? – Ben Millwood Sep 5 '12 at 19:37
This resembles an example very commonly used to illustrate Bayes' formula. – Dilip Sarwate Sep 5 '12 at 19:41
I have the same question as Ben. Does accuracy mean probability of test being positive given subject has HIV? – Michael Chernick Sep 5 '12 at 19:42
Sorry about the confusion. I edited it, I hope now it's OK. – user2467 Sep 5 '12 at 19:43
What does "the chance of a false positive" mean? Intuitively (and considering how high the given number is) I would understand it to mean "the probability that a patient who has already tested positive doesn't have HIV". But is that is what it means, then your answer is just $1-0.94=0.06$ and neither of the numbers $0.001$ or $0.98$ are relevant. – Henning Makholm Sep 5 '12 at 19:55

A positive result can come in two ways: a patient with HIV and a correct result: $0.001 \cdot 0.98=0.00098$ of the population, or a patient without HIV and a false positive. The fraction of false positives is $0.999 \cdot 0.06 = 0.05994$. The false positives are then $\frac {0.05994}{0.0094}\approx 61.2$ times more than the infected patients.

-
Sorry about all the typos, I edited the question again. Thanks for your answer. – user2467 Sep 5 '12 at 19:56
@Daniel: I have updated in light of the edit. – Ross Millikan Sep 5 '12 at 20:26

This is a classic example for the illustration of Bayes' theorem. Let's first formulate the problem in formal terms. Let $D$ be the event that the person has the disease, then $D^c$ denotes the event that the person doesn't have the disease. Let $Y$ be the event that the test gives the positive result (person has the disease as per the test diagnostic) and $N$ be the event that the test gives the negative result.

Now let's write down the given information. $$P(D) = 0.001$$ $$P(Y|D) = 0.98$$ $$P(Y|D^c) = 0.06$$ We have to find $P(D|Y)$.

Now we'll use Bayes' theorem to find the required probability. $P(D|Y) = \frac{P(Y|D)P(D)}{P(Y)}$. $$P(Y) = P(Y \cap(D\cup D^c)) = P(Y\cap D) + P(Y\cap D^c) = P(Y|D)P(D) + P(Y|D^c)P(D^c)$$ as $D$ and $D^c$ are mutually exclusive events and together form a partition of the sample space. Using the given values, we have $$P(Y) = 0.98 \times 0.001 + 0.06 \times 0.999 = 0.06092$$

Therefore, $$P(Y|D) = \frac{0.98 \times 0.001}{0.06092} = 0.016$$

-
Read Wikipedia for Bayes' theorem and conditional probability. – ajay Sep 5 '12 at 20:33
It is correct and you are a positive person so you normally get (+) – Seyhmus Güngören Sep 5 '12 at 20:42