Probability

See also: numbers, Permutations and Combinations

Bayes' Theorem

Bayes' Theorem, named after Rev. Thomas Bayes, describes the relationship between the conditional probability of two events A and B as follows:

P(A | B) = P(A | B) P(A)
P(B)

or

P(A | B) = P(A | B) P(A)
P(B | A)P(A) + P(B | A)P(A)

Example of Bayes' Theorem application

In a certain country, it is known that 5% of the population suffers from a certain disease. A clinical test yields a correct positive result of a person carrying the disease 92% of the cases. When a person not carrying the disease is subjected to the same test, however, 10% of all the cases, the test will yield a false positive result.

Let us represent the information above as follows:

We also know the following probabilities

Using the formula for conditional probability, we can then summarize the probabilities of the events in the following table:

A (5%)A (95%)
BTrue positive
P (B ∩ A) = = 5% × 92% = 0.046
False positive
P (B ∩ A) = 95% × 10% = 0.095
BFalse negativeP (B ∩ A) = 5% × 8% = 0.004True negative
P (BA) = 95% × 90% = 0.855

Now, suppose a person was tested positive, what is the probability that he is really carrying the disease?
In other word, we are trying to find the probability of A, given B or P (A | B).

From the table above, we can see that P (A | B) is really the probability of true positive divided by the probability of getting any positive result. That is 0.046 / (0.046 + 0.095) = 0.326.

We can also get this result by using the above Bayes' Theorem formula:

P(A | B) = P(BA)
P(B)
= P(A) × P(B | A)
P(B | A)P(A) + P(B | A)P(A)
= 5% × 92%
(92% × 5%) + (10% × 95%)
= 0.046
0.046 + 0.095
= 0.046
0.141
P(A | B) = 0.326
Previous:
Conditional Probability

See also: numbers, Permutations and Combinations