probability (Bayes' rule)

148 Views Asked by At

In a country, the prevalence of malaria is observed to be 43 out of every 1000 people. The test for malaria is a 90% chance of detecting it when the patient is suffering from malaria. The same test yields a negative result in 95% of the cases of people not infected with malaria. What is the posterior probability that a person has malaria if test returns positive ?

what I have tried is-

$$\frac{0.90 \times 0.043}{(0.90\times0.043+(1-0.95)\times0.043)}$$

is this correct ??

or this-

$$\frac{0.90\times0.043}{(0.90\times0.043+0.95\times0.043)}$$

3

There are 3 best solutions below

0
On

$P(Malaria|Positive Test)=\frac {P(Malaria\cap Positive Test)} {P(Positive Test)}$

$P(Postive Test)=P(Positive Test|Malaria)\cdot P(Malaria) + P(Positive Test|No Malaria)\cdot P(No Malaria)$

The problem in your first attempt is you multiply $P(Positive Test|No Malaria)\cdot P(Malaria)$ instead of $P(Positive Test|No Malaria)\cdot P(No Malaria)$

Spoiler below:

So $P(Malaria|Positive Test)=\frac {.9\cdot \frac {43} {1000}} {.9\cdot \frac {43} {1000}+.05\cdot \frac {957} {1000}}$

0
On

When it comes to bayes law I always find it easier to visualize it:

You will note from the diagram below is that there are 2 options for the malaria (when it's positive and the other is negative). You asked What is the posterior probability that a person has malaria if test returns positive which implies in this case option_1 (he really has malaria) but there's another possibility that the test shows positive but he doesn't have it.

so Arby calc is correct and to put it in simple probability terms:

                                 option1
P(Malaria|Positive Test) =  ---------------
                             option1+option2

enter image description here

0
On

what I have tried is-

$$\frac{0.90 \times 0.043}{(0.90\times0.043+(1-0.95)\times0.043)}$$

So close.

That would be ($T$ for test-positive, $M$ for malaria): $$\dfrac{\mathsf P(T\mid M)\times\mathsf P(M)}{\mathsf P(T\mid M)\times\mathsf P(M)+(1-\mathsf P(T^\complement\mid M^\complement))\times\mathsf P(M)}$$

Where as you clearly want $$\mathsf P(M\mid T)~=~\dfrac{\mathsf P(T\mid M)\times\mathsf P(M)}{\mathsf P(T\mid M)\times\mathsf P(M)+(1-\mathsf P(T^\complement\mid M^\complement))\times(1-\mathsf P(M))}$$