===================
== Nathan's Blog ==
===================
infrequent posts about things I am working on

A Brief Introduction to Bayes’ Theorem

Bayes’ Theorem stated is, “the conditional probability of A given B is the conditional probability of B given A scaled by the relative probability of A compared to B”. I find it easier to understand through a practical explanation. Let’s say you are having a medical test performed at the recommendation of your doctor, who recommends tests to everyone because they get a nice kickback and college tuition is not cheap! You are young and healthy and are being tested for the existence of a new form of cancer that only exists in 1% of the population. These cancer detecting tests accurately detect the cancer 8 out of 10 times in an infected individual. However, they “detect” cancer in 1 out of 10 cancer free patients. Your test results come back positive! But before you get worried, let’s figure out the chance that you actually have cancer.

This is a job for conditional probability. You want to know the probability that the test detected cancer in you, a young healthy individual. “The chance of an event is the number of ways it could happen given all possible outcomes”[1]:

or

 

When the result is considered in conjunction with the likelihood of other outcomes, it is not that troubling. The table below has the likelihood for each of the outcomes:

<th>
  Cancer (1% of Pop.)
</th>

<th>
  No Cancer (99% of Pop.)
</th>
<td>
  True Positive<br /> 1% x 80% = .8%
</td>

<td>
  False Positive<br /> 99% x 10% = 9.9%
</td>
<td>
  False Negative<br /> 1% x 20% = .2%
</td>

<td>
  True Negative<br /> 99% x 90% = 89.1%
</td>

 

The chance of cancer for a true positive is only .8%! A false positive is much more likely at 9.9%. The likelihood you have cancer even with a positive test result is low. You should definitely seek a second opinion.

It is important to keep in mind that we are calculating odds of an event given all possibilities. You probably do rough versions of this calculation daily. “Given the dark rain clouds outside and rain in the forecast, I will take an umbrella since I believe it will rain while I am out.” If that is not enough to get you excited about Bayes and his contribution to statistics, know that he did it all in an effort to prove the existence of God! If you would like to learn more, check out the links below.

[1]A primer on Bayes theorem which I used as inspiration: https://betterexplained.com/articles/an-intuitive-and-short-explanation-of-bayes-theorem/

The peer reviewed “wiki” entry on Bayesian statistics: http://www.scholarpedia.org/article/Bayesian_statistics

Stanford encyclopedia of Philosophy entry on Bayes Theorem: https://plato.stanford.edu/entries/bayes-theorem/