Bayes theorem P(A) for second step

54 Views Asked by At

Here is the problem. Alice went to doctor and doctor said test will produce 99% true result for ill people and 99% true negative for non-ill people. For this particular illness there is 1 per 1000 who get ill.

So I implemented this in bayes theorem formula and found out Alice chance that she is ill are about 9%, considering tests were positive.

I am trying to figure out how to calculate prob. that Alice is ill if she would go to second doctor, who has same test BUT Alice would be negative there.

For P(A) I used 9%, because this is the result from first testing. Is this a way to do it? For this parameter, I get prob that Alice is ill with score 0,09%, which is very small percent. Note, it's 0.09%. Please let me know if I calculated everything ok.

1

There are 1 best solutions below

2
On BEST ANSWER

$\newcommand{\ill}{\text{ill}}\newcommand{\well}{\text{well}}$ First we'll do it by turning the crank. Then further below, we'll see a simpler way. \begin{align} \Pr(\ill\mid +) & = \frac{\Pr(+\mid \ill)\Pr(\ill)}{\Pr(+\mid\ill)\Pr(\ill) + \Pr(+\mid\well)\Pr(\well)} \\[10pt] & = \frac{99\times 1}{(99\times 1) + (1\times999)} = \frac{11}{122} = 0.0901639\ldots \\[20pt] \Pr(\ill\mid+,-) & = \frac{\Pr(+,-\mid \ill)\Pr(\ill)}{\Pr(+,-\mid\ill)\Pr(\ill) + \Pr(+,-\mid\well)\Pr(\well)} \\[10pt] & = \frac{(99\times 1\times 1)}{(99\times1\times1)+(1\times99\times 999)} = \frac 1 {1000}. \end{align}

But now take the prior probability of illness to be $11/122:$

\begin{align} \Pr(\ill\mid -) & = \frac{\Pr(-\mid \ill)\Pr(\ill)}{\Pr(-\mid\ill)\Pr(\ill) + \Pr(-\mid\well)\Pr(\well)} \\[10pt] & = \frac{99\times 1}{(99\times 1) + (1\times999)} = \frac 1 {1000}. \end{align} It's an exercise in algebra to see why these two methods yield identical results.

Here's a simpler way to look at it: \begin{align} \frac{\Pr(\ill\mid +)}{\Pr(\well\mid +)} = \frac{\Pr(\ill)}{\Pr(\well)} \cdot \frac{\Pr(+\mid\ill)}{\Pr(+\mid\well)}. \end{align} Looking at it this way makes that algebra exercise far simpler.

This simpler point of view can be written in this way: $$ \text{posterior odds} = \text{prior odds} \times \text{likelihood ratio} \\ (\text{where “odds'' means }\frac p {1-p} \text{ where } p \text{ is probability}). $$