# probability disease(bayes)

Suppose that the probability of a person having the fever is $5/100$.

The probability that a person with the fever tests negative is $2/100$.

The probability that a person who does not have the fever tests positive is $10/100$.

If person X tests positive, what is the probability that people have the disease

let $D$ disease, $P$ positive.(using the bayes's theorem)

$$P(D | P) = p(P | D)*p(D)/p(P)$$

given that

$$(5/100) - (2/100) = 3/100. = p(P | D)$$

and $$p(P) = 3/100 + 10/100 = 13/100$$

plug in.

$$\frac{(3/100)(2/100)}{13/100}$$

therefore $$3/650$$

correct?

• Have you just been taught Bayes' Theorem ? Sep 16 '15 at 9:30
• When I read the title I was like "Oh, let me check it out, I might have this" Sep 16 '15 at 9:30

We have two hypotheses:

1. $H_1$, the person is ill
2. $H_0$, the person is not ill

We have prior knowledge that: $$P(H_1)=0.05$$ $$P(H_0)=0.95$$

Our observable variable is $T$, that indicates the test results.

The likelihood of $T$ is: $$P(T|H_1)=0.98$$ $$P(T|H_0)=0.10$$

Using Bayes theorem, we derive the posterior: $$P(H_1|T)=\frac{P(H_1)P(T|H_1)}{P(T)}=\frac{P(H_1)P(T|H_1)}{P(H_1)P(T|H_1)+P(H_0)P(T|H_0)}$$ All you have left, is substitute the probabilities

• thanks (0.05*0.98)/{(0.05*0.98)+(0.95*0.10)} therefore 0.34 right? Sep 16 '15 at 14:26

I think you would be better off if you understood it in a simple way, before using a formula.

Suppose 1000 people are tested, [large number taken to avoid decimals ]

of these 5% = 50 will be diseased of which 98% = 49 will test positive

950 will not be diseased, but 10% of these = 95 will test positive,

Can you now work out P(D|P), and put the whole thing into your formula ?