Sounds right to me. Ok - so let's try to put some actual numbers in here for you. Lets pretend that 100000 people took this test. Now we know that 10% are actually HIV positive.

So that means that 10000 people are HIV positive. We also know the sensitivity is .999 which is the proportion of those 10000 people that are going to get a positive test back. So 10000*.999 = 9990 people have a positive test AND are HIV positive. Which means that 10 people have a negative test AND are HIV positive. Do you see why that last sentence is true?

We can do something similar for those people that are HIV negative. There are 90000 HIV negative people out of the 100000 (do you see why this is?) and we have a specificity of .9999. Specificity is the proportion of those that are actually HIV negative that get a negative test. So .9999*90000 = 89991 people are HIV negative AND have a negative test. Can you work out how to get how many people are HIV negative and have a positive test?

So from this we should be able to make a table

[Dason's table here]

Can you see how to answer the original question using this table?

Just so you know I'm going to head to bed so I won't be answer any more questions until morning. Good luck!

Right. I'm no Bayesian expert so using Dason's original posting let's try and work this through.

PPV = number who test positive who are truly positive. Let's say 10000 people took the test. We know that rate of disease is 0.002 = 0.2%. Therefore 10000 x 0.002 = 20 have the disease. We know that the sensitivity is 0.95 which is proportion of those 20 that are going to get a positive test back. So 20 x 0.95 = 19 people have a positive test AND the disease. And 20 - 19 = 1 person has a negative test but has the disease.

We can do the same for disease negative. There are 9980 disease negative people. Specificity is 0.85 (i.e proportion negative that get a negative result). So 9980 x 0.85 = 8,483 disease negative with a negative result. Negative and positive test are 9980 - 8483 = 1,497.

So we can make a table..... (actually I can't make a table using this but here's my attempt)

(I prettied it up for you. I hope you don't mind - Dason)
\(

\begin{tabular}{|l|rr|}

\hline

&Have disease &Don't have disease \\

\hline

+ve & 19 & 1497\\

-ve & 1 &8483\\

\hline

\end{tabular}

\)

So.....

total number who test positive = 19 + 1497 = 1516

Proportion of those who test positive who have the disease (PPV) = 19 / 1516 = 0.0125 = 1.25% [QED]

You can see now where the last lines of the second post come from 0.0019 / (0.0019 + 0.1497)

I hope that this is clearer now...... it certainly is for me!

Thanks to Dason (and kelly g for posting the question) as I have learned something today.