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:
- P(A|B) = Posterior probability (probability of A given B)
- P(B|A) = Likelihood (probability of B given A)
- P(A) = Prior probability (probability of A)
- P(B) = Evidence (probability of B)
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})}$$