Bayesian Statistics
Prerequisites: Statistics. Full path (2 pages)
Intuitive
Recommended Books:
- The Theory That Would Not Die: How Bayes' Rule Cracked the Enigma Code, Hunted Down Russian Submarines, and Emerged Triumphant from Two Centuries of Controversy by Sharon Bertsch McGray
Concrete
Bayesian statistics treats a probability as a degree of belief about a proposition, including propositions about the values of parameters. The basic tool is Bayes' theorem. For a parameter and observed data ,
- is the prior: what we believe about before seeing the data.
- is the likelihood: the probability of the observed data if the parameter had the value . As a function of it is in general not normalized, so it is not a probability density for .
- is the posterior: the updated belief after seeing the data.
- is the evidence (or marginal likelihood). It normalizes the posterior.
The theorem itself is a one-line consequence of the product rule, .
Worked example: a coin of unknown bias. Let be the probability of heads. We take a Beta prior,
and observe heads in flips. The likelihood is binomial, . Multiplying prior and likelihood gives a posterior proportional to , which is again a Beta distribution with parameters and . Its mean is
For a uniform prior () this is , Laplace's rule of succession. For large the prior parameters become irrelevant and the mean approaches the observed frequency . A prior whose posterior stays in the same family is called conjugate.
Using the posterior. The result of a Bayesian analysis is the whole posterior distribution. From it we quote summaries: the posterior mean or mode, and a credible interval, an interval that contains with posterior probability of, say, 68%. Parameters we do not care about (nuisance parameters , for example a detector calibration) are integrated out:
Comparing models. For two models and , Bayes' theorem applied to the models gives
The ratio of evidences is the Bayes factor. Because the evidence averages the likelihood over the prior, a model with many adjustable parameters spreads its prior over a large space and is penalized unless the data need those parameters.
In practice the integrals are rarely doable in closed form, and posteriors are sampled numerically, typically with Markov chain Monte Carlo methods.
- An Intuitive (and Short) Explanation of Bayes’ Theorem by Kalid Azad
- Understanding Bayes Theorem With Ratiosby Kalid Azad
- Bayesian data analysis for newcomers by John K. Kruschke and Torrin M. Liddell; (Available also here)
- Bayes' Theorem Examples: A Visual Introduction For Beginners by Dan Morris (book)
- Probability Theory: The Logic of Science by Edwin T. Jaynes
Abstract
In measure-theoretic form, a Bayesian model consists of a parameter space with a prior probability measure , a sample space , and a Markov kernel assigning to each parameter a probability measure on . These define a joint probability measure on ,
The posterior is the conditional distribution of given : a kernel such that
for all measurable and , where is the marginal of on . Such a regular conditional distribution exists when is a standard Borel space, and it is unique up to -null sets. If the model is dominated, for a -finite measure , the posterior has a density with respect to the prior and we recover Bayes' formula:
Conjugacy in exponential families. If , then priors of the form are closed under updating: after independent observations the hyperparameters become and . The Beta-binomial example in the Concrete layer is a special case.
Reparametrization and Jeffreys' prior. A prior density is a density, so it transforms with a Jacobian under . A "flat" prior in one parametrization is not flat in another. The Jeffreys prior , built from the Fisher information , is invariant: transforms as a metric on , and is its Riemannian volume form.
Large-sample behaviour. For a finite-dimensional model with independent identically distributed data from , under regularity conditions that include smoothness of the model, in the interior of , non-singular Fisher information and a prior with continuous positive density at , the Bernstein-von Mises theorem states that the total variation distance between the posterior and the normal distribution goes to zero in -probability, with the maximum likelihood estimator. In this regime Bayesian credible intervals and frequentist confidence intervals agree asymptotically. In infinite-dimensional models this can fail.
Foundations. Cox's theorem gives conditions (whose precise form has been debated) under which any rule for assigning real-valued plausibilities to propositions, consistent with Boolean logic and a few regularity requirements, is equivalent to probability theory. This is the basis of the view of probability as extended logic in Jaynes' book linked in the Concrete layer.