Sum Rule, Product Rule, Bayes' Theorem
Probability and Distributions
Three rules underpin all of probability. The sum rule (or marginalization): p(x) = sum_y p(x, y) (or int p(x, y) \, dy in the continuous case). Given a joint distribution, you recover a marginal by summing/integrating out the other variable. This is how we go from 'full knowledge' to 'knowledge abou
Sum rule marginalizes; product rule factors joints; Bayes inverts conditionals.
Without sum/product/Bayes, probability becomes a collection of formulas with no internal logic. These three rules are the entire calculus.
Three rules underpin all of probability. The sum rule (or marginalization): (or in the continuous case). Given a joint distribution, you recover a marginal by summing/integrating out the other variable. This is how we go from 'full knowledge' to 'knowledge about alone'.
The product rule: . The joint probability factors into a conditional times a marginal in either direction. Chaining it gives us the chain rule of probability: , essential for autoregressive models like language models.
Bayes' theorem is just the product rule rearranged: . It inverts a conditional: if we know how effects follow from causes (), we can reason about causes from observed effects (). The pieces have standard names: is the prior, is the likelihood, is the posterior, and is the evidence.
Bayes' rule is the engine of Bayesian inference: start with a prior belief about parameters , observe data , and update to . The evidence in the denominator is often intractable, which is why approximate methods — variational inference, MCMC, Laplace approximations — are so central to modern probabilistic ML.
Applications stretch from classic spam filters (Bayes' rule combining word likelihoods and class priors) to medical diagnosis (testing-rule problem: with a 99% accurate test and 1% prevalence, the posterior probability of disease given a positive test is only about 50%, a frequently botched intuition) to modern Bayesian neural networks and diffusion models. Fluency with these three rules is the baseline for all probabilistic reasoning.
Exercises
Put your understanding to the test. Score + streak + speed all count.
Confirm you've got it
3 quick questions. Get 2 right to mark this lesson complete.