Applying Bayes theorem to a simple problem

3.5k Views Asked by At

When a test for steroids is given to soccer players, 98% of the players taking steroids test positive and 12% of the players not taking steroids test positive. Suppose that 5% of soccer players take steroids. What is the probability that a soccer player who tests positive takes steroids?

The way I approached this was drawing a tree of possibilities then calculating like so: $+$ = "testing positive", $S =$ "taking steroids", $\frac{P(+|S) \times P(S)}{P(+|S) \times P(S) + P(+|\neg S) \times P(\neg S)}$ $=\frac{.95 \times .98}{.95 \times .98 + .05 \times .12} = .9936$.

However, others are saying the answer is $.3006$. Was I wrong in my methodology?

1

There are 1 best solutions below

0
On BEST ANSWER

We want to know the probability that a soccer player who tests positive takes steroids, i.e. $P(S|+)$.

By Bayes Theorem we have: $$P(S|+)=\frac{P(+|S)P(S)}{P(+|S)P(S)+P(+| \neg S)P(\neg S)}$$

We are given $P(S)=0.05$, $P(+|S)=0.98$, $P(+|\neg S)=0.12$, $P(\neg S)=0.95$.

Plugging them in gives $P(S|+)=\frac{0.98\times 0.05}{0.98\times 0.05+0.12\times 0.95} \approx 0.3006$.

I hope that helps.