Q:

Is it possible to calculate this conditional probability?

I have this problem.
Suppose that 20% of the population is made of terrorists.
A company developed an alarm such that, when a terrorist goes through the alarm, the alarm always beeps. The problem is that sometimes the alarm beeps also when the person is not a terrorist.
We can improve the alarm in such a way that it still always beeps when faced with terrorist, but when faced with non-terrorists it commits less mistakes.
Let's call alpha the probability that the alarm beeps when faced with a non-terrorist. What is the value of alpha if P(terrorist|alarm_beeped) = 99,9%?
(P(terrorist|alarm_beeped) meaning the probability that the person is a terrorist given that the alarm beeped).
I'm working with Bayes Theorem, but can't find a solution.
Any help?
Thanks

A:

With Bayes theorem would be enough. First, suppose net events:
$T$ Person is a terrorist
$A$ Alarm beeps
From your statement, we have:
$$ P(T) = 0.2 $$
$$ P(A \vert T) = 1$$
$$ P(A \vert \bar{T}) = \alpha $$
Applying Bayes:
$$ P(T \vert A) = \frac{P(A \vert T) P(T)}{P(A)} = \frac{0.2}{0.2+0.8 \alpha}$$
Where $P(A)$ can be computed from total probability, as follow:
$$P(A) = P(A \vert T) P(T) +  P(A \vert \bar{T}) P(\bar{T}) = 0.2 + 0.8 \alpha$$
So, to have $P(T \vert A) = 0.999$, we need:
$$\frac{0.2}{0.2+0.8 \alpha} = 0.999 $$
Where you can resolve for alpha.

