2
$\begingroup$

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)}$$

$\endgroup$
5
  • $\begingroup$ Not quite correct. $\endgroup$
    – Arby
    May 9, 2017 at 11:11
  • $\begingroup$ which one first or second? what will be correct sol. then? $\endgroup$
    – chunky
    May 9, 2017 at 11:12
  • $\begingroup$ The first one is almost correct. See my answer below and try to figure out where you're a bit off. $\endgroup$
    – Arby
    May 9, 2017 at 11:14
  • $\begingroup$ More than "a bit" off! The second version produces a numeric result closer to the correct value, but only because it had two mistakes, one that tends to make the result too large and another that tends to make the result too small. $\endgroup$
    – David K
    May 9, 2017 at 13:29
  • $\begingroup$ No, just a bit off is correct as 6 of the 7 values used were correct, i.e. there was a lot right about the first attempt. Your claim, that it wasn't a bit off as the value was far off the correct value, is true as well, but I prefer to focus on the positive aspects. $\endgroup$
    – Arby
    May 9, 2017 at 23:10

3 Answers 3

4
$\begingroup$

$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}}$

$\endgroup$
1
$\begingroup$

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

$\endgroup$
0
$\begingroup$

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))}$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.