Bayes Theorem
Bayes Theorem
Basic Theory
Bayes Theorem tells what is the probability of A given B:

Here is the simple proof of Bayes Theorem. We know that the probability of A given B, or the probability of B given A is like this:

Therefore we know that:

Simple Example
A typical problem solved by Bayes Theorem is drug testing problem:
1 | Suppose that a drug test will produce 99% true positive results for drug users and 99% true negative results for non‐drug users. Suppose that 0.5% of people are users of the drug. What is the probability that a randomly selected individual with a positive test is a drug user? |
For this problem, we know that:

Then we can calculate the result like this:
