Hello World

2025/09/19

Bayes’ Rule

Bayes’ rule (or Bayes’ theorem) is a fundamental theorem in probability theory that describes how to update probabilities based on new evidence.

Mathematical Formula

The formula for Bayes’ rule is:

$$P(A|B) = \frac{P(B|A) \cdot P(A)}{P(B)}$$

Where:

In Words

The probability of hypothesis A being true given evidence B equals the probability of observing evidence B given that A is true, multiplied by the prior probability of A, divided by the total probability of observing B.

Example

If we want to find the probability that it’s raining given that we see people carrying umbrellas:

$$P(\text{Rain}|\text{Umbrellas}) = \frac{P(\text{Umbrellas}|\text{Rain}) \cdot P(\text{Rain})}{P(\text{Umbrellas})}$$