What is the Bayes' Theorem

Bayes' theorem, named after 18th-century British mathematician Thomas Bayes, is a mathematical formula for determining conditional probability. The theorem provides a way to revise existing predictions or theories given new or additional evidence. In finance, Bayes' theorem can be used to rate the risk of lending money to potential borrowers.

The formula is as follows:

Bayes' theorem is also called Bayes' Rule or Bayes' Law.

BREAKING DOWN Bayes' Theorem

Applications of the theorem are widespread and not limited to the financial realm. As an example, Bayes' theorem can be used to determine the accuracy of medical test results by taking into consideration how likely any given person is to have a disease and the general accuracy of the test.

Bayes' theorem gives the probability of an event based on information that is or may be related to that event. The formula can be used to see how the probability of an event occurring is affected by new information, supposing the new information is true. For example, say a single card is drawn from a complete deck of 52 cards. The probability that the card is a king is 4 divided by 52, which equals 1/13 or approximately 7.69%. Remember that there are 4 kings in the deck. Now, suppose it is revealed that the selected card is a face card. The probability the selected card is a king, given it is a face card, is 4 divided by 12, or approximately 33.3%, as there are 12 face cards in a deck.

Deriving Bayes' Theorem Formula

Bayes' theorem follows simply from the axioms of conditional probability. Conditional probability is the probability of an event given that another event occurred. For example, a simple probability question may be "What is the probability of Amazon.com, Inc., (AMZN) stock price falling?" Conditional probability takes this question a step further by asking "What is the probability of AMZN stock price falling given that the Dow Jones Industrial Average (DJIA) index fell earlier?"

The conditional probability of A given that B has happened can be expressed as:

P(A|B) = P(A and B) / P(B) = P(A∩B) / P(B)

If A is AMZN price falls and B is DJIA is already down, then the conditional probability expression reads as "the probability that AMZN drops given a DJIA decline is equal to the probability that AMZN price declines and DJIA declines over the probability of a decrease in the DJIA index.

P(A∩B) is the probability of both A and B occurring. This is also the same as the probability of A occurring times the probability that B occurs given that A occurred, expressed as P(A) x P(B|A). Using the same reasoning, P(A∩B) is also the probability that B occurs times the probability that A occurs given that B occurs, expressed as P(B) x P(A|B). The fact that these two expressions are equal leads to Bayes' theorem, which is written as:

if, P(A∩B) = P(A) x P(B|A) = P(B) x P(A|B)

then, P(A|B) = [P(A) x P(B|A)] / P(B).

Where P(A) and P(B) are the probabilities of A and B without regard to each other.

P(B|A) is the probability that B will occur given A is true.

Finally, P(A|B) is the conditional probability of A occurring given B is true.

The formula explains the relationship between the probability of the hypothesis before getting the evidence P(A) and the probability of the hypothesis after getting the evidence P(A|B), given a hypothesis A and evidence B.

As another example, imagine there is a drug test that is 98% accurate, meaning 98% of the time it shows a true positive result for someone using the drug and 98% of the time it shows a true negative result for nonusers of the drug. Next, assume 0.5% of people use the drug. If a person selected at random tests positive for the drug, the following calculation can be made to see whether the probability the person is actually a user of the drug.

(0.98 x 0.005) / [(0.98 x 0.005) + ((1 - 0.98) x (1 - 0.005))] = 0.0049 / (0.0049 + 0.0199) = 19.76%

Bayes' theorem shows that even if a person tested positive in this scenario, it is actually much more likely the person is not a user of the drug.