# What is Bayes’ Theorem?

May 4, 2023
290 VIEWS
Bayes' theorem (also called Bayes' rule or Bayesian theorem) is a mathematical formula used to determine the conditional probability of events. Simply put, it’s the probability of an event occurring based on the knowledge that other events relevant to the situation have also occurred.

Named after 18th-century English statistician Thomas Bayes, the theorem was first proposed in a paper Bayes wrote entitled "An Essay Towards Solving a Problem in the Doctrine of Chances." Due to the complex nature of the calculations, it was largely ignored for several years. However, during the twentieth century, Bayes’ theorem had a resurgence and began being used by more statisticians. In fact, it helped during World War II to crack the infamous Nazi Enigma code.

Today, thanks to the computational power of computers, Bayes’ theorem is used for many statistical applications. This extends to several fields such as finance, insurance, medicine, pharmacology, etc.

## The Bayes' Theorem Formula

The formula for Bayes' theorem is the following:

P(A|B) = [P(B|A) x P(A)] / P(B)

Where:

• P(A|B) = the probability of event A occurring, given event B has occurred.
• P(B|A) = the probability of event B occurring, given event A has occurred.
• P(B|A) = the probability of event B occurring, given event A has occurred.
• P(B) = the probability of event B.

Note that events A and B are statistically independent events, meaning the probability of the outcome of event A does not depend on the probability of the outcome of event B and vice versa.

## What is Bayes' Theorem Used For?

Bayes' theorem can be used for a variety of statistical applications. In any field where an individual is interested in predicting the likelihood of an outcome, they can apply this formula to create a model. The following are a few common examples:

In medicine, it can be used for determining the accuracy of medical results.

• In medicine, it can be used for determining the accuracy of medical results.
• In information technology, it can be applied to filter spam from your email.
• In weather, it can be used to predict the likelihood of a storm.
• In a court of law, it can be utilized to authenticate (or disprove) the validity of evidence.
• When underwriting insurance premiums, it can be used to predict the life expectancy of a person based on their background.
• When applying for a loan, it can be used to determine the risk of an applicant based on their credit history.
• With finance, it can be used to determine the potential reward of a given investment.
• Etc.

Practically speaking, many people use Bayes' theorem without even realizing it. When an individual makes a simple conclusion in their head about the likelihood that something will occur because something else took place, they’re actually utilizing the principle behind Bayes’ theorem. Here is a simple example:

It’s been raining outside all week, so my coworkers will be in a bad mood today.

In this scenario, the two variables “it's raining outside” and “my coworkers’ mood” are independent and have nothing to do with each other. However, based on past experience, you might predict that one is more likely to happen as a result of the other.

Of course, since Bayes’ theorem is a formula, we can do more than draw simple inferences. If we can assign actual statistical probabilities to these variables, then we can run through the computations and arrive at a quantifiable probability value.

## Investment Example of Bayes' Theorem

Throughout finance, Bayes’ theorem can be used to make predictions about potential risk and reward scenarios. This can apply to multiple applications from buying a business to optimizing an investment portfolio.

For instance, suppose the S&P 500 stock market index is down. A financial analyst would like to determine if the stock from Company A will also go down as well. In this case:

• Variable A = Company A stock will lose value
• Variable B = S&P 500 stock market index is down

Using Bayes’ theorem, we can write this scenario as:

P(Stock-A|S&P500) = [P(Stock-A) x P(S&P500|Stock-A)] / P(S&P500)

Now let’s quantify this scenario. Suppose after some analysis we find that the probability of each is:

• P(Stock-A) = 0.25
• P(S&P500) = 0.50
• P(S&P500|Stock-A = 0.75

We can then calculate the probability as follows:

P(Stock-A|S&P500) = [ 0.75 x 0.25 ] / 0.50 = 0.375

In other words, there is a 37.5% chance that Stock A will lose value if the overall stock market also loses value.

## The Bottom Line

Bayes’ theorem can be used to describe the probability of an event based on prior knowledge of other variables that might be relevant to the event. Since this is a statistical formula, it can be applied to a vast number of situations where predictions need to be quantified. When it comes to finance, Bayes’ theorem can be incredibly helpful for determining the potential risk and reward opportunity for a given opportunity.