Screening for HIV
Our first screening example featured a fictitious terrorist-detecting device that was not very accurate. However, as this real example shows, even when the tests are incredibly accurate we still get some surprising results if the underlying condition is rare.
Common HIV blood tests are very accurate -- estimates vary, but it is estimated that using current techniques (ELISA and Western blot) around 99.8% of people with HIV test positive, and 99.99% of people without the virus test negative. In the UK, the prevalence of HIV in adults with no risk factors is around 1 in 10000. Thus, out of 10000 people, we expect 1 to have the virus (and they will almost certainly test positive), and one false positive. We can see this in the animation below. Thus, out of two people who test positive,we expect one to have HIV -- in other words, the probability of having HIV given a positive test result.
You can experiment with the interactive graphic to see how altering the properties of the test and the prevalence of the disease affects the test.
However, among intravenous drug users, HIV rates are much higher -- in the UK, around 1.5%. What does our test tell us here? Out of 10,000 drug users who are screened, we expect around 150 to have HIV, and we expect all of them to test positive (to the nearest whole person); we also expect around 1 false positive. Thus, given a positive test result for an IV drug-user, the probability that they have HIV is around 150/151. This example is also featured in the animation.