I'm currently answering the following question.
The screening programme for a certain disease works as follows:
- The probability of the first test being positive is $\frac{9}{10}$ if you the disease and $\frac{3}{10}$ if you don’t.
- If you test negative, you are removed from the process, otherwise you are given a different test.
- For people who tested positive initially, the second test will give positive with probability $\frac{95}{100}$ if they have the disease, and $\frac{1}{10}$ if they don’t
The probability that someone has the disease is $\frac{2}{10}$
The question I'm stuck on is the following.
(d) Compute the probability that someone has the disease if both tests are positive
Here is my attempt (if you can call this one).
Let D represent the event of someone having the disease. Let P1 be event that the $1^{st}$ test is positive. Let P2 be event that the $2^{nd}$ test is positive. So, I want to compute the following
$$P( D \mid P1 \cap P2 ) = \frac{P(D. \cap P1 \cap P2)}{P(P1 \cap P2)}$$
The information I know is,
$$P(P1 \mid D)=\frac{9}{10}\quad P(P2 \mid D)=\frac{95}{100}$$ $$P(P1 \mid D^\complement)=\frac{3}{10}\quad P(P2 \mid D^\complement)=\frac{1}{10}$$
and from the previous parts.
$$P(P1)=\frac{42}{100}$$ $$P(D \mid P1)=\frac{3}{7}$$
I have no idea how to solve for each individual part without assuming that they are independent (which they are not). I've tried using the Law of Total probability and Bayes' theorem but without much luck. Any suggestions would be very grateful.
Let $A$ denote the event that the person has the disease.
Let $B$ denote the event that both tests are positive.
Then, the desired computation is
$$p(A|B) = \frac{p(A,B)}{p(B)} = \frac{p(A,B)}{p(A,B) + p(A^c,B)}. \tag1 $$
So, the problem reduces to calculating $p(A,B)$ and $p(A^c,B)$ and then plugging the values into (1) above.
$$p(A,B) = \frac{2}{10} \times \frac{9}{10} \times \frac{19}{20} = \frac{171}{1000}. \tag 2$$
$$p(A^c,B) = \frac{8}{10} \times \frac{3}{10} \times \frac{1}{10} = \frac{24}{1000}. \tag3 $$
Plugging (2) and (3) back into (1) gives
$$p(A|B) = \frac{171}{171 + 24}.$$