False positive in probability and stats 
A cancer test is 90 percent positive when cancer is present. It gives a false positive in 10 percent of the tests when the cancer is not present. If 2 percent of the population has this cancer what is the probability that someone has cancer given that the test is positive?

I multiplied the 90 by 10 divided by 90 times 10 plus 2.
 A: Do you know Bayes Theorem?
If not you can get a feeling for it using an "expected average tree diagram".
Imagine 1000 patients.
2% have cancer so you expect to have a split:


*

*980 cancer free

*20 with cancer


Look at the 980 cancer free. We have 10% false positives (test indicates cancer when there is none); so you expect this splits:


*

*98 test positive cancer but are cancer free

*882 test negative for cancer but are cancer free


Look at the 20 with cancer. We have 90% true positives (test indicates cancer when there is cancer); so you expect this splits:


*

*18 test positive cancer and have cancer

*2 test negative for cancer and have cancer


Therefore 98+18=116 test positive for cancer and of these only 18 have cancer. 
So the probability of having cancer, given a positive test, is small: $18/116=9/58\approx 15.52\%$.
Bayes Theorem works as follows:
$$\mathbb{P}[\text{cancer | positive}]=\frac{\mathbb{P}[\text{cancer and positive}]}{\mathbb{P}[\text{positive}]}.$$
Note 
$$
\begin{align}
\mathbb{P}[\text{positive}]&=\mathbb{P}[\text{(positive | cancer) or (positive | no cancer)}]\\&=\mathbb{P}[\text{positive | cancer}]+\mathbb{P}[\text{positive | no cancer}].
\end{align},$$
and so
$$\mathbb{P}[\text{cancer | positive}]=\frac{0.02(0.9)}{0.02(0.9)+(0.98)(0.1)}=\frac{9}{58}.$$
A: Let A be the event that someone has cancer.
$$P(A)=0.02$$
Let B be the event that the cancer test returns positive. There are four cases to consider:


*

*Test positive, cancer present: $P(B|A)=0.9$

*Test negative, cancer present: $P(B^c|A)=0.1$

*Test positive, cancer not present: $P(B|A^c)=0.1$

*Test negative, cancer not present: $P(B^c|A^c)=0.9$


The two probabilities are the same here, we will need $P(B|A), P(B|A^c)$, which are given in the question.
We need to find $P(A|B)$.
Bayes' Theorem tells us that:
$$P(A|B)=\frac{P(B|A)P(A)}{P(B)}$$
and conditional probabilities tell us:
$$\begin{align}
P(B)&=P(B|A)P(A)+P(B|A^c)P(A^c)\\
&=0.9\times0.02+0.1\times0.98\\
&=0.018+0.098\\
&=0.116
\end{align}
$$
So $P(B|A)=\dfrac{0.018}{0.116}\approx0.15517$.
