Bayes theorem involving drug testing

440 Views Asked by At

A drugs test for athletes is 99% reliable: applied to a drug taker, it gives a positive result 99% of the time;given to a non-taker, it gives a negative result 99% of the time. It is estimated that 1% of athletes take drugs.What fraction of randomly tested athletes fail the test?

I am completely lost on how to do this as i wasn't in class that day so how would I use bayes theorem to solve this? Thanks

2

There are 2 best solutions below

1
On

Lets give the test to $10,000$ people.

$9,900$ people are not drug users (drug free). $1\%$ of them score false positives.

$100$ are drug users, $99\%$ are detected. $1\%$ are false negatives.

\begin{matrix}&\text{Pass}&\text{Fail}\\ \text{Drug Free}& 9,801& 99\\ \text{Drug User} &1& 99\end{matrix}

$198$ fail the test. $\frac 12$ of those that fail are false positives and $\frac 12$ are true positives.

1
On

Testing a random athlete: let A denote a positive test result, B the guy doing drugs. Then:$\mathsf P(A\mid B)=0.99, \mathsf P(A^{\complement}\mid B^{\complement})=0.99$ with $A^{\complement}$ being the complement of $A$, thus a negative result with $\mathsf P(A^{\complement})=1-\mathsf P(A)$ and analogous $B^{\complement}$.

You are also given $\mathsf P(B)=0.01$

You are searching for $\mathsf P(A)=\mathsf P(A\cap B)+\mathsf P(A\cap B^{\complement})$ the first is obtained trivially from the defintion of conditional probability, the second equaling $\mathsf P(A\mid B^{\complement})\cdot\mathsf P(B^{\complement})$ which are both avaible as $1-\mathsf P(A^{\complement}\mid B^{\complement})$ and $1-\mathsf P(B)$