Doing it correctly

If we look at various national surveys on breast cancer, the general likelihood of developing breast cancer is a very small number. Let us assume that the prior probability in the population as a whole is

$$ p(Y=1) =0.004. $$

We need also to account for the fact that the test may produce a false positive result (false alarm). Let us here assume that we have

$$ p(X=1\vert Y=0) =0.1. $$

Using Bayes' theorem we can then find the posterior probability that the person has breast cancer in case of a positive test, that is we can compute

$$ p(Y=1\vert X=1)=\frac{p(X=1\vert Y=1)p(Y=1)}{p(X=1\vert Y=1)p(Y=1)+p(X=1\vert Y=0)p(Y=0)}=\frac{0.8\times 0.004}{0.8\times 0.004+0.1\times 0.996}=0.031. $$

That is, in case of a positive test, there is only a \( 3\% \) chance of having breast cancer!