MATH 335: AIDS testing example

The ELISA screening test for testing a blood sample for the HIV antibodies being present in human blood has these properties:

Suppose the incidence of HIV in the population being tested is denoted by p . In class p = .003. In general we can show using Theorem 2.4.1 (Law of Total Probability) that:

P(HIV positive | positive ELISA reading) = p*.977 / (p*.977 + (1-p)*.074)

Here is R code and output computing this for various values of p


p <- c(.003, .005, .01, .05, .10, .2, .3, .4 , .5)
prob <- p*.977 / (p*.977 + (1-p)*.074)

round(cbind(p,prob),3)

          p  prob
 [1,] 0.003 0.038
 [2,] 0.005 0.062
 [3,] 0.010 0.118
 [4,] 0.050 0.410
 [5,] 0.100 0.595
 [6,] 0.200 0.767
 [7,] 0.300 0.850
 [8,] 0.400 0.898
 [9,] 0.500 0.930