Bayes’ Theorem and law of total probability

By re-arranging terms in the definition of P[AB] and P[BA] we have Bayes’ theorem: P[AB]=P[BA]P[A]P[B] This lets us switch A and B in conditional probability statements.

Law of Total Probability lets us decompose an event into smaller events: let {A1,A2,...,An} be a partition of Ω. Then for any BΩ P[B]=ni=1P[BAi]P[Ai] Proof is in the book, but the interpretation is that if the sample space can be chopped up into subsets Ai, we can compute the probability of P[B] by summing over its portion in each of the subsets: P[BAi]=P[BAi]P[Ai].

This allows us the write one of my favorite equations!

P[AjB]=P[BAj]P[Aj]ni=1P[BAi]P[Ai]

In Bayesian statistics, P[AjB] is the posterior, P[BAj] is the likelihood, and P[Aj] is the prior. The denominator is the normalization factor.