There is a rare disease that only happens to 1 out of 100,000 people. A test shows positive 99% of times when applied to an ill patient and, 1% of times when applied to a healthy patient. Please answer the following questions.
What is the probability for you to have the disease given that your test result is positive?
What is the probability for you to have the disease when you did two tests and both of them show positive? Assume that two tests are conducted independent.
Assume that the patient keeps on trying the test, what is the minimum number of tests that the patient has to try to be 99% percent sure that he is actually ill? Assume that all tests are conducted independently.
$$ \Pr(D\mid +)= { \Pr(+\mid D)\Pr(D) \over (\Pr(+\mid D)\Pr(D)+\Pr(+\mid \bar D)\Pr(\bar D)) } $$ On substituting we get approximately $0.0989 %$ But for the second question if he/she tested positive for both times The probability should increase of him having the disease But when we multiply $0.989\times 0.989=0.978$ is the probability he has the disease
Please help me where I am going wrong
Your answer for $P(D|{+})$ in the comments of about 0.1% is correct. But surely you know that multiplying two numbers less than 1 will give you another number which is less than either of them, so your method cannot be right.
We want $P(D|{+}{+})$, the probability of $D$ given two positive test results. You can use Bayes' theorem again to get $$ P(D|{+}{+})={P({+}{+}|D)P(D)\over P({+}{+})} $$ But we need to think about what the values of $P({+}{+}|D)$ and $P({+}{+})$ are. We're told that the results are independent, so $P({+}{+}|D)=P({+}|D)P({+}|D)$.
The value of $P({++})$ is given by $$P({+}{+})= P({+}\mid D)^2P(D)+P({+}\mid\bar D)^2P(\bar D) $$ since the tests are independent of each other, but conducted on the same person with the same chances of having or not having the disease. So the answer is
$$ P(D|{+}{+})={P({+}|D)^2P(D)\over P(++)} $$ You already have $P({+}|D)$ and $P(D)$ from your answer, and you can calculate $P({+}{+})$ as shown above, so just plug the values in. It comes out to about 9%.