Approximately $0.1\%$ of the population show life-threatening allergic reactions when a bee stings. A blood test will be developed that has a sensitivity of $95\%$ and a specificity of $95\%$.
(a) State all probabilities contained in the text. Introduce appropriate events for this.
(b) Show that this test is completely useless because a person who tests positive is less than $2\%$ really allergic.
(c) How high should the proportion of allergy sufferers in the population have to be at least so that after a positive test result there is an allergy with at least $50\%$ certainty? Explain.
$$$$
I have done the following :
For (a) :
We consider the events :
$A$ = Allergic reaction is shown $P$ = The test is positiv for allergic reaction
That $0,1\%$ of the population show life-threatening allergic reactions when a bee stings means that $P(A)=0,001$.
That the sensitivity is $95\%$ we get that $P[P\mid A]=0,95$.
That the specificity is $95\%$ we get that $P[P^c\mid A^c]=0.95$.
Is everything correct so far?
For (b) :
The probability that a person who is tested positive is really allergic is equal to $$P(A\mid P)=\frac{P(P\mid A)\cdot P(A)}{P(P)}$$ What does it mean to show that it is useless?
For (c) :
Could you give me a hint for this one?
b)
Your formula is correct. What you are calculating is PPV, Positive Predictive Value that is
$$P(A|T^+)=\frac{0.95\times0.001}{0.95\times0.001+(1-0.95)\times(1-0.001)}\approx 1.9\%$$
Even you have a good test, with high sensivity and specificity, it is useless due to the low prevalence of the population's allergy . In other words, given a positive test, your probability to be actually allergic is only 2%
c)
$$P(A|T^+)=\frac{0.95p}{0.95p+(1-0.95)(1-p)}\ge 0.5$$
and solving w.r.t. $p$ you find $p\ge 5\%$
Another way to get a higher PPV is, with the same prevalence of 0.1%, to get more than 1 consecutive positive tests.
If you get 2 consecutive positive tests, you PPV is 27%
If you get 3 consecutive positive tests, you PPV is 87%
If you get 4 consecutive positive tests, you PPV is 99%