Normal-Normal Conjugacy (Known Variance)

Let the unknown parameter be a mean and the observations be i.i.d. Gaussian with known variance . The Normal-Normal conjugate pair is

which produces the closed-form posterior

Here is the sample mean. The update rule is clean in the precision parametrization : posterior precision equals prior precision plus data precision, and the posterior mean is the precision-weighted average

The prior’s “effective sample size” is : the prior carries as much information as pseudo-observations of value .

Posterior summaries:

  • Mean, median, mode all equal by symmetry of the Gaussian.
  • Posterior variance shrinks like as data accumulate.
  • Posterior predictive for a new observation : . The predictive variance decomposes into posterior uncertainty about plus irreducible observation noise.

Noninformative limit. Taking (precision ) recovers the flat prior on and produces , numerically identical to the frequentist sampling distribution of . The posterior mean equals the MLE and the posterior variance equals the squared standard error.

Normal-Inverse-Gamma Conjugacy (Unknown Mean and Variance)

When both the mean and variance are unknown, the conjugate prior is the Normal-Inverse-Gamma family, written :

The parameter is the prior effective sample size for , and parametrize the prior for with prior mean for . Given observations with sample mean and sample sum of squares , the posterior is with


The three contributions to are the prior scale, the within-sample dispersion, and a “disagreement penalty” for how far the data mean sits from the prior mean.

Marginal posterior for (integrating out ): Student- with degrees of freedom,

which collapses to the Gaussian of the known- case as . This Student- posterior is why -intervals are the default for credible intervals on a Gaussian mean when the variance is not known in advance; see 3.2 Credible Intervals.

Prerequisites

Intuition

Gaussian densities are the unique family (up to scaling) whose logarithm is a quadratic in the unknown. Multiplying two Gaussians in therefore produces another Gaussian, because the sum of two quadratics is again a quadratic. The prior contributes the quadratic and the likelihood contributes ; completing the square in yields the posterior Gaussian with precision equal to the sum of the prior and likelihood precisions.

The central mechanism is precision addition. Precision measures the sharpness of information: a prior that asserts is known to within standard deviation has precision , and observations with noise standard deviation jointly carry precision . These add, and the posterior mean is the weighted average with weights equal to precisions. This is the Bayesian analog of how a Kalman filter fuses information from two sensors, and it generalizes directly to multivariate Gaussians (where precision is the inverse covariance matrix).

When the variance is unknown, the Student- structure emerges because the posterior for is heavy-tailed (Inverse-Gamma), and averaging a Gaussian with variance over an Inverse-Gamma for produces a Student- for . The degrees-of-freedom parameter tracks how much data has been seen: with observations and a weakly informative prior, the posterior for is approximately , which recovers the frequentist -distribution of the sample mean.

Properties

(Precision Addition) Posterior precision equals prior precision plus data precision; posterior means are precision-weighted averages.

Writing for precision, the Normal-Normal update is

where . This makes the prior interpretable as pseudo-observations of value . The multivariate extension replaces scalar precisions with precision matrices , and the same additive law holds: , .

(Shrinkage to the Prior Mean) The posterior mean is between the prior mean and the sample mean, biased toward whichever carries more precision.

Rewriting with , the posterior mean is a convex combination. When is small relative to the prior’s effective sample size , the posterior sits near ; when , it sits near . This pattern is the univariate case of the shrinkage behaviour that drives hierarchical models and James-Stein estimation.

(Posterior Predictive is Gaussian with Inflated Variance) New observations are predicted with variance , never just .

For the known- model, . The first term captures remaining uncertainty about ; the second term is irreducible observation noise. A Bayesian predictive interval is strictly wider than the plug-in interval using , and this is precisely what protects a Bayesian forecast from the overconfidence of plug-in prediction. Under the unknown- model, the predictive for is Student- rather than Gaussian, with location and scale on degrees of freedom.

(Sequential Updating) Posterior after observations equals the posterior after observations used as the prior for the next .

Because precision addition is associative, processing data in batches and collapsing to a single posterior yields the same result as processing all data at once. This is the Gaussian special case of the general (Sequential Updating) property in 3.1 Bayesian Framework: treating the posterior as the next prior gives identical inference regardless of batching. This is the fundamental structure of online learning and the Kalman filter.

(Bernstein-von Mises for Normal-Normal) With any proper prior, the posterior converges to as .

The posterior mean and posterior variance because the prior contribution becomes negligible against the data contribution . The posterior therefore recovers the frequentist sampling distribution of the MLE, delivering the (Prior Washing Out) property of 3.1 Bayesian Framework exactly and explicitly — for Normal-Normal, BvM is not asymptotic but happens cleanly at every .

(Marginal Posterior is Student-t When is Unknown) Integrating out from the NIG posterior gives a Student- marginal for .


with degrees of freedom. With a Jeffreys-style noninformative prior (the limit ), this collapses to the classical Student- result , where is the unbiased sample variance — the Bayesian posterior and the frequentist sampling distribution coincide numerically. This is why the familiar -interval is also a Bayesian credible interval under the Jeffreys prior.

(Noninformative Prior and Exchangeability with Frequentist Inference) The limit reproduces frequentist formulas exactly.

For known , the flat-prior posterior is , matching the sampling distribution of . For unknown with the reference prior , the marginal posterior for is . The Bayesian credible interval then coincides with the frequentist confidence interval, even though their interpretations differ — see 3.2 Credible Intervals for the contrast.

(Multivariate Extension) For unknown mean vector with known covariance , the conjugate prior is multivariate Gaussian.

If and , then with and . For unknown covariance, the conjugate prior is the Normal-Inverse-Wishart, the multivariate analog of NIG, used throughout Bayesian linear regression; see 3.8.1 Bayesian Linear Regression.

Examples

Derivation

Goal: derive the posterior under the known-variance Normal-Normal model.

Starting from Bayes’ rule, the log posterior is

with both terms quadratic in :


Adding the two quadratics and completing the square in :

where is the weighted average and . Exponentiating gives the claimed posterior.

The posterior-predictive derivation is similar: marginalize over the Gaussian posterior for ,

with and independent. The sum of independent Gaussians is Gaussian with added variances: .

See Also