# Disease-diagnosis device probability problem

Probability for a disease is $0.05$.The probability that a diagnosis device will give positive result if the person has the disease is $0.99$ and vice versa.

a- If test is positive what is the probability that a person has the disease?

b- If test is applied to 2 persons and both show positive what is the possibility that they are both sick?

I think the first one has a probability of $0.99$ and the second one will be just the intersection so $0.98$.

• Can you explicitly say what you mean by "vice versa"? – thanasissdr Mar 25 '16 at 3:20
• The idea that a negative result if the person actually has the disease is again 0.99 – Enea Mar 26 '16 at 20:50
• Maybe you mean that if the person has no disease then the device will give negative result with probability $0.99$? – thanasissdr Mar 26 '16 at 21:05

One person is chosen randomly for the test. Since the probability to be ill is 0.05, 5% of the population is ill, assuming it is big enough to neglect statistical dispersion. So the probability to pick a healthy individual is 0.95 and the probability to pick an ill person is 0.05.

Among the diseased, 99% of them are positive, and among the healthy, 1% are positive. Let $N$ denote the number of people in the total population. The population of positives is constituted of $N_p$ = $0.99 \times 0.05 \times N+0.01 \times 0.95 \times N$ people. So if the test is positive, the probability of picking someone with the disease is $\frac{N_{p,diseased}}{N_p}=\frac{0.99 \times 0.05 \times N}{0.99 \times 0.05 \times N+0.01 \times 0.95 \times N}=\frac{0.99 \times 0.05}{0.99 \times 0.05+0.01 \times 0.95}=\frac{99}{118}\approx 0.84$

If the test is applied to both people : if N is big enough, the probability to be ill with a positive test is the same whether one person is removed from the pool. The events being independent, we have $P(both-are-ill)=\frac{99}{118}^2=\frac{9801}{13924}\approx 0.70$

• For the first one you used Bayes` theorem and for the second cause the events are independent P(AB)=P(A)*P(B) – Enea Mar 24 '16 at 20:51
• True ! But not consciously though. Solving these kinds of problems with only logic instead of premade theorems provides good training. – Evariste Mar 24 '16 at 20:56
• I think you have misinterpreted the value of $0.01$. It is the probability that the test is negative, under the assumption that the person has the disease. – thanasissdr Mar 25 '16 at 3:47

Consider ten thousand people. Five hundred of them will have the disease; of those people, $99 \times 5 = 495$ will test positive. $9500$ of them will not have the disease; of those, $99 \times 95 = 9405$ will test negative, and $95$ will test positive.

A given person who tests positive therefore has a chance of $\frac{495}{95+495} = 495/590 \simeq 0.84$ of having the disease.

• Assuming that we take one person out of 10000 people and the device says that this person has the disease there will be a 99% chance that the person actually has the disease? – Enea Mar 24 '16 at 20:18
• @PatrickStevens I think you made a mistake, you meant 9500 instead of 99500, so only 95 will test positive. So the probablity is 495/590=99/118 which is approximately 0.84 – Evariste Mar 24 '16 at 20:39
• @Evariste Oh dear, that was a very very stupid mistake on my part! Thanks. – Patrick Stevens Mar 24 '16 at 20:44
• @Enea No. You have not taken into account the base rate of the disease. Intuitively, the disease's rarity means you should be a bit less confident when you're told someone probably has the disease. – Patrick Stevens Mar 24 '16 at 20:45

Let $A=\{$a person has the disease$\}$, $A' = \{$a person has not the disease$\}$ and $B=\{$the test is positive$\}$. What we know is that $P(A) = 0.05$ and $P(B\mid A) = 0.99$. So, the first question asks for $P(A\mid B)$. In my opinion, "vice versa" means the probability that the person has the disease is $0.99$ if the test is positive. So, in math terms $P(A\mid B) = 0.99$. Also, it is true that: $$P(A\mid B) = \frac{P(B\mid A) \cdot P(A)}{P(B\mid A) \cdot P(A) + P(B\mid A') \cdot P(A')}.$$

Beware that (in general) $\boxed{P(B\mid A') \neq 1-P(B\mid A)}$.