Bayesian inference provides a mathematically rigorous mechanism for updating beliefs in the face of new evidence. While frequentist statistics treats parameters as fixed, unknown constants, Bayesian inference treats parameters as random variables governed by probability distributions. This paradigm allows for the coherent integration of prior knowledge with observed data.
Bayesian inference is the continuous and multivariate extension of Bayes' Theorem applied to parameter estimation.
For a parameter vector \boldsymbol{\theta}and observed data\mathcal{D}, the posterior distribution is defined as:
Bayesian updating can be visualized spatially, particularly when using approximate inference.
In Variational Inference, we seek a tractable distributionq(\boldsymbol{\theta})that closely approximates the true, intractable posteriorp(\boldsymbol{\theta} | \mathcal{D}). Geometrically, we are taking the true posterior, which lives on a complex manifold of probability measures, and projecting it onto a simpler, constrained sub-manifold (e.g., the manifold of all independent Gaussian distributions). The distance minimized is the Kullback-Leibler (KL) divergence:
Visually, imagine a highly irregular, curved 3D surface representing the true posterior. VI finds the point on a flat 2D plane (the proxy family\mathcal{Q}) that is "closest" to the peak of that 3D surface.
A Gaussian prior\mathcal{N}(0, \sigma^2 I)geometrically restricts the volume of the parameter space. It pulls the posterior distribution toward the origin, acting as a gravitational anchor that prevents the likelihood from stretching out indefinitely along axes where data is sparse.
When the prior and posterior belong to the same probability family, they are conjugate. This yields exact, closed-form updates.
Suppose the likelihood is normal with known variance\sigma^2, and the prior on the mean\muis\mathcal{N}(\mu_0, \sigma_0^2). Givennobservations with sample mean\bar{x}, the posterior for\muis also normal,\mathcal{N}(\mu_n, \sigma_n^2), where:
| Likelihood | Conjugate Prior | Posterior Distribution | Application |
|---|---|---|---|
| Bernoulli | Beta(\alpha, \beta) | Beta(\alpha + \Sigma x, \beta + n - \Sigma x) | A/B Testing |
| Poisson | Gamma(\alpha, \beta) | Gamma(\alpha + \Sigma x, \beta + n) | Traffic Modeling |
| Multinomial | Dirichlet(\mathbf{\alpha}) | Dirichlet(\boldsymbol{\alpha} + \mathbf{x}) | Topic Modeling (LDA) |
The Kalman Filter is a recursive Bayesian estimator for linear dynamical systems with Gaussian noise.
In civil engineering, assessing the failure probability of a bridge requires fusing historical material strength data (Prior) with localized, non-destructive ultrasound test results (Likelihood). Bayesian inference yields a posterior probability of failure that accounts for both generalized knowledge and site-specific anomalies.