[Math] Bayes rule with multiple tests

bayes-theoremprobability

Say you are given the following

\begin{align*}
P(cancer) &= 0.008, & P(\neg cancer) &= 0.992\\
P(\oplus|cancer) &= 0.98, & P(\ominus|cancer) &= 0.02\\
P(\oplus|\neg cancer) &= 0.03, & P(\ominus|\neg cancer) &= 0.97
\end{align*}

and you test a patient to see if they have cancer or not and it returns positive. If the patient wants to be tested another time, and it once again returns positive, what happens to the probability that the patient has cancer after testing a second time?

Best Answer

According to Bayes' Theorem, \begin{align*} P(\text{cancer} \mid \oplus \& \oplus) &= \frac{P(\text{cancer} \cap \oplus \& \oplus)}{P(\oplus \& \oplus}\\ &= \frac{P(\oplus \& \oplus \mid \text{cancer})P(\text{cancer})}{P(\oplus \& \oplus \mid \text{cancer})P(\text{cancer})+P(\oplus \& \oplus \mid \neg\text{cancer})P(\neg\text{cancer})} \end{align*} Now we have to make some assumptions about the two tests, and I think it is reasonable to assume their outcomes are independent. E.g., if someone has cancer, then the second test is positive with $98\%$ chance regardless of the first test. Then we can say: $$P(\oplus \& \oplus \mid \text{cancer})=P(\oplus \mid \text{cancer})P(\oplus \mid \text{cancer})$$ and similarly $$P(\oplus \& \oplus \mid \neg\text{cancer})=P(\oplus \mid \neg\text{cancer})P(\oplus \mid \neg\text{cancer}).$$ You should be able to finish from here.

Related Question