# A Problem on Conditional Probability

A patient is thought to have one of three diseases $A_1$, $A_2$ and $A_3$ whose probabilities under the given conditions are $1/2$, $1/6$ and $1/3$, respectively. A test is carried out to help the diagnosis and it yields a positive result with a probability of $0.1$ for disease $A_1$, a probability of $0.2$ for disease $A_2$ and a probability of $0.9$ for disease $A_3$. A(nother) test is conducted 5 times and the results are positive 4 times and negative once. What is the probability of each disease after testing?

Let $P(P_1) = 0.1$. I can't decide whether $P(P_1)$ is $P(P_1|A_1)$. A positive result for $A_1$ does not necessarily mean the person has disease $A_1$, the results could be incorrect. Furthermore, I am not sure what I am supposed to find here: the probability of each disease after testing?? Is it the probability of each disease given that the results are positive or negative? Or a total probability? Should I use Bayes' rule here?

• That is a remarkably unclear question, at least to me. I'm sorry you had it inflicted on you. I would guess the "probabilities under the given conditions" should be treated as prior probabilities. I have no idea what information the next to last sentence is supposed to convey, or, for that matter, what the sentence before it is supposed to convey as the probabilities don't sum to 1. Apr 26, 2018 at 16:02
• Which probabilities don't sum to 1? 0.1 + 0.2 + 0.9? Apr 26, 2018 at 16:07
• Right. On further thinking about it, my guess would be that if the patient has disease $A_1$, there's a 10% chance that the test will come back positive, and similarly for the other two diseases. Perhaps we can make a leap of faith to assume the test will never come back positive if the patient doesn't have the disease, although that's not stated in the problem. Apr 26, 2018 at 16:10
• Could we do this: $P(A_1|P) = \frac{P(A_1)P(P|A_1)}{P(A_1)P(P|A_1) + P(A_2)P(P|A_2) + P(A_3)P(P|A_3)}$? Where $P(A_1)P(P|A_1) + P(A_2)P(P|A_2) + P(A_3)P(P|A_3) = 0.8$ because out of 5 times we get positive results 4 times? Apr 26, 2018 at 16:17
• I think you're on the right track. I think you have to say, if the patient has disease $A_1$, what is the probability that 4 out of 5 of the test results come back positive, and similarly for disease $A_2$ and $A_3$. Then those three probabilities are $P(\text{Observed test results}|\text{Disease }i )$, and are multiplied by the prior probabilities and normalized to get the posterior probabilities. Apr 26, 2018 at 16:21

Let us assume we have prior probabilities for the three diseases $p(A_1)$, $p(A_2)$, and $p(A_3)$ of $1/2, 1/6, 1/3$ respectively.

The test has probabilities $p_i = 0.1, 0.2,$and $0.9$ of detecting the three diseases respectively. Under the assumption that the test results are independent from one trial to the other, the results of running the test five times given that the patient has disease $A_i$ are distributed Binomial with probability parameter $p_i$. Consequently, the probability of observing four positive test results out of five trials given each of the diseases is:

$$P(\text{observed test results}|A_i) = P_{\text{binomial}}(4; n=5, p_i) = \{0.00045, 0.0064, 0.328\}$$

for the three diseases respectively.

Using Bayes' Rule, $P(A_i | \text{observed test results}) \propto P(\text{observed test results}|A_i)P(A_i)$. This calculation results in unnormalized probabilities equal to $\{0.000225, 0.00107, 0.109\}$ for the three diseases. Normalizing gives us:

$$P(A_i | \text{observed test results}) = \{0.002, 0.01, 0.988\}$$

respectively.

• I see. I’ll have to learn about normalising and $P_{\mathrm{binomial}}$ Apr 27, 2018 at 10:42
• The point of normalizing is to ensure the probabilities sum to 1. Apr 27, 2018 at 14:28