$\DeclareMathOperator{\p}{Pr}$ $\DeclareMathOperator{\P}{Pr}$ $\DeclareMathOperator{\c}{^C}$ $\DeclareMathOperator{\or}{ or}$ $\DeclareMathOperator{\and}{ and}$ $\DeclareMathOperator{\var}{Var}$ $\DeclareMathOperator{\E}{E}$ $\DeclareMathOperator{\std}{Std}$ $\DeclareMathOperator{\Ber}{Bern}$ $\DeclareMathOperator{\Bin}{Bin}$ $\DeclareMathOperator{\Poi}{Poi}$ $\DeclareMathOperator{\Uni}{Uni}$ $\DeclareMathOperator{\Exp}{Exp}$ $\DeclareMathOperator{\N}{N}$ $\DeclareMathOperator{\R}{\mathbb{R}}$ $\newcommand{\d}{\, d}$


Problem

In this problem we are going to calculate the probability that a patient has an illness given a positive test result for the illness. A positive test result means the test thinks the patient has the illness.

Things that we know:

  • 8% of the population has the illness.
  • The test returns a positive result 95% of the time for patients who have the illness.
  • The test resturns a positive result 7% of the time for people who do not have the illness.

This example was originally presented in the context of the nasal swab tests for COVID-19. I realize that may be sensitive to some of you. The seriousness of this pandemic underscores the potential for Bayesian probability to be applied to important contexts.


Answer

The probability that the patient has the illness given a positive test result is: