Exactly $\frac{1}{5}$ people that live on earth have a condition .There are two tests for this condition, the Z1 test and the Z2 test. When a person goes to a doctor to test for this condition, with probability $\frac{2}{3}$ the doctor conducts Z1 on them and with probability $\frac{1}{3}$ the doctor conducts Z2 on them. When Z1 is done, the outcome is as follows:
- If the person has the condition, the result is positive with probability $\frac{3}{4}$.
- If the person does not have the condition, the result is positive with probability $\frac{1}{4}$.
When Z2 is done, the outcome is as follows:
- If the person has the condition, the result is positive with probability 1.
- If the person does not have the condition, the result is positive with probability $\frac{1}{2}$.
A person is picked uniformly at random and sent to a doctor to test for this condition. The result comes out positive. What is the probability that the person has the condition?
Let A= Person has the condition and B= The test is positive. Now I have to calculate:
$$P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$$
Now, in the above equation, $P(A)=\frac{1}{5}$,but how do I calculate $P(B|A)$ and $P(B)$ for both Z1 and Z2?
With $A$ = diseased, $B$ = tests positive
$P(A|B) = \Large\frac{P(A \cap B)}{P(B)} = \frac{P(B|A)\cdot P(A)} {P(B|A)\cdot P(A) + P(B|A^c)\cdot P(A^c)}$
For Z1
$P(A|B) =\Large\frac{\frac34\frac15}{\frac34\frac15 + \frac14\frac45}$
Compute similarly for $Z_2$, and then apply the law of total probability to combine the results. I suppose you can carry on by yourself now ?