Sequential application of Bayes' theorem will do this.Originally Posted by mika
which should be read as: "The probability of event A occurring given that
event B has occurred is equal to the probability of B occurring given that A has
occurred times the unconditional probability of A divided by the unconditional
probability of B".
The two stages of this problem are:
i. The person comes in (having probability of 0.2 of being infected), they take
test 1. On the basis of this test they now have a probability of being infected.
ii. The person (now with probability of being infected takes test 2.
On the basis of this test they now have a probability of being infected.
Let's look at stage i:
The test result is negative so:
(note is the probability of negative on test 1 if person infected
times the probability that person is infected plus the probability of
negative on test 1 if person not infected times the probability that the person
is not infected).
Now let's look at stage ii:
Now we repeat the process again for the second test (now the probability
that the person is infected is ):