In this lesson, we will use what we already know about conditional probabilities, but also adopt a Bayesian updating scheme to easily calculate the probability of someone actually having HIV, given the sequential testing results. Remember that in the previous lesson we outlined a sequential testing scheme for how early HIV testing worked in the US military. If a recruit tests positive, the next step is to test them again. Here, we're going to make a simplifying assumption that these sequential tests are independent of each other. Since a positive outcome on the ELISA doesn't necessarily mean that the recruit actually has HIV, they are retested. What is the probability of having HIV if the second ELISA also yields a positive result? Once again, we can summarize the data in a probability tree. The first branch will have our priors. Remember, this person is no longer a randomly selected person from the population. We know something about this recruit. They tested positive on the ELISA once. Hence, the prior probability we assigned to the hypothesis that they have HIV should change. We update our prior probability with a posterior from the previous test, which was calculated to be approximately 0.12 in the previous lesson. The prior probability for the competing hypothesis that the recruit does not have HIV also gets updated to the complement of this probability. Nothing should change in the second branch since we're testing the same test with the same sensitivity and same specificity. Once again, we want to calculate the probability of HIV given positive test results. And we can do this using Bayes Rule. For this, we need the joint probabilities of HIV and positive and no HIV and positive. Putting all this together, the updated posterior probability comes out to 0.93. That is, a recruit who tested positive on ELISA twice has a 93% chance of having HIV. The calculated posterior probability of having HIV after three consecutive positive ELISAs should be more than enough for any individual diagnostic decision. However, it's important to realize that the military was testing hundreds of thousands of recruits. Hence their need for additional accuracy provided by the western blots. So if the recruit tested positive on three consecutive ELISA tests, the next step would be to test them with a western blot. Note that this is a different test with a different sensitivity and specificity. Hence in addition to updating our prior, we would also need to update the probabilities and the second set of branches. The updating scheme we introduce in this lesson is an example of a general property of Bayesian models. We will see more examples of this paradigm in the future lessons in this course.