Chapter 3 Exercises
HIV test
1. Referring to Example 3.1.1. write BUGS code to compute the probability that someone testing positive actually has HIV. (Don’t just write out the formula in Example 3.1.1, but use BUGS to perform Bayesian inference on the required parameter, given the observed data, as in Section 3.3)
2. Suppose the individual in question has another two tests, one positive and one negative. By extending the code from question 1, compute the probability that they have HIV, assuming conditional independence (given the disease state) between test results.
3. What if all three tests had been positive? How does this compare with what you might have expected the result to be before running the analysis, and why?