Is essentially a calculation of the probability that you can believe some form of evidence. Bayes’ theorem converts the results from your test into the real probability of the event.

## Definition

The probability that a belief is true given new evidence equals: the probability that the belief is true regardless of that evidence, times the probability that the evidence is true given that the belief is true, divided by the probability that the evidence is true regardless of whether the belief is true.

## Key Terms

- P stands for probability,
- B for belief
- E for evidence.

## Mathematically

$$ P(B|E) = P(B) \times \frac{P(E|B)}{P(E)} $$

P(B) is the probability that B is true, and P(E) is the probability that E is true. P(B|E) means the probability of B if E is true, and P(E|B) is the probability of E if B is true.

## By Example

Let’s say you get tested for a cancer estimated to occur in one percent of people your age. So let’s say your test is 99 percent reliable. That is, 98 out of 100 people who have cancer will test positive, and 99 out of 100 who are healthy will test negative.

$$ P(B) = 0.01 \\ P(E|B) = 0.99 \\ $$

P(E) is the probability of testing positive whether or not you have cancer, it includes false positives as well as true positives.

**False Positives**: To calculate the probability of a false positive, you multiply the rate of false positives (2% - since the test is 98% accurate) times the percentage of people who don’t have cancer (99%) since there is a 1% chance you have cancer.

**Actual Positives**: Given as the rate of actual cancer (1%)

$$ P(E) = (0.99 * 0.02) + 0.1 \\ P(E) = 0.0298 $$

So P(E) which is the probability that you test positive is 2.98%

Therefore the probability that you have cancer given a positive test result is 33.2%

$$ P(B|E) = 0.01 \times \frac{0.99}{0.0298} \\ P(B|E) = 0.332 $$

If you get tested again, you can reduce your uncertainty enormously, because your probability of having cancer, P(B), is now 50 percent rather than one percent.

If your second test also comes up positive, Bayes’ theorem tells you that your probability of having cancer is now 99 percent, or .99.

### Notes on this example

- Tests are not the event. We have a cancer test, separate from the event of actually having cancer.
- Tests are flawed. Tests detect things that don’t exist (false positive), and miss things that do exist (false negative).