Question involving either law of total probability or bayes theorem The question is written as follows:
1% of all individuals in a certain population carry a disease. A diagnostic test has a 90% positive detection rate for carriers of the disease and a 5% positive detection rate of non-carriers. This test is applied twice, independently, to a random individual. What is the probability that both tests yield the same result?
The back of the book states that the answer is 0.904.
Generally, questions that involve a setup of "detection of disease probability / non-detection of disease probability" are Bayes theory problems, but it doesn't appear to be asking something like "given this, what is that" which is typically what that answers. My idea was to use the law of total probability, figure out the probability of testing positive and testing negative, and do (2 x probability of positive test) + (2 x probability of negative test), but this gives me the wrong answer.
Any ideas?
 A: Case 1 -- has desease ($p=0.01$). The conditional probability of testing
positive two times is then $0.9^{2}$. The conditional probability of testing
negative two times is $0.1^{2}$.
Case 2 -- does not have desease ($p=0.99$). The conditional probability of
testing negative two times is $0.95^{2}$. And the conditional probability of
testing positive two times is $0.05^{2}$.
Then simply sum up the probabilities of the four different ways the event
(same test result) can happen: $%
prob=0.01(0.9^{2}+0.1^{2})+0.99(0.95^{2}+0.05^{2})= 0.904\,15$
A: Let T be the result of the number of positive test (of 2), C the true condition of the person (C = 1 if they have the condition, 0 otherwise)
P(same result ) = P(T=2) + P(T=0)
(Eq 1) P(T = 2) = P( T = 2 |  C = 1)P(C=1) + P(T=2 |C=0)P(C=0)
(Eq 2) P(T=0) = P(T=0|C=1)P(C=1) + P(T=0 | C=0)P(C=0)
P(C=1) = .01
P(C=0)= .99
(let $T_1$ be the result of 1 test)
P($T_1=1$|C=1) = .9 (P($T_1=0$|C=1) = .1)
P($T_1=1$|C=0) = .05  (P($T_1=0$|C=0) = .95)
P(T=2|C=1)= P($T_1 =1$|C=1)$^2$ = $.9^2$. From there, figure out the rest of the values in (Eq 1) and (Eq 2).
