How to Calculate Bayes' Theorem (Example Included)
YouTube Viewers YouTube Viewers
9.98K subscribers
176 views
0

 Published On Apr 27, 2024

Bayes’ Theorem provides a way to revise existing predictions or theories (update probabilities) given new or additional evidence. The formula for Bayes’ Theorem is written as:

P(A|B) = P(A) x P(B|A) / P(B), where:

- P(A|B) = how often A happens, given that B happens
- P(B|A) = how often B happens, given that A happens
- P(A) = likelihood of A
- P(B) = likelihood of B

Let’s use a hypothetical example to illustrate this better:

Given the following 3 statements, what is the likelihood that someone who drives a car, lives in the city? We’ll call this P(Car | City) or P(A|B).

- 60% of people who live in cities drive a car, let’s call this P(City | Car) or P(B|A) = 60%
- 70% of people drive cars, let’s call this P(Car) or P(A) = 70%
- 80% of people live in cities, let’s call this P(City) or P(B) = 80%

To calculate this we simply plug in the values into the formula:

P(Car | City) = P(Car) x P(City | Car) / P(City) → 70% x 60% / 80% = 52.5%

show more

Share/Embed