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
- 3.1 Bayesian Framework — prior, likelihood, posterior, Bayes’ rule.
- 3.5 Conjugate Families — the general conjugacy pattern this note instantiates.
- 2.2c.3 Gaussian Distribution — the workhorse distribution.
- 2.2c.6 Gamma Distribution — parent of Inverse-Gamma; used for .
- 2.2c.8 Student’s t Distribution — Student- arises as the marginal posterior for with unknown .
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
Example 1: Measurement Calibration (Known )
A scale has calibration mean (unknown) and known measurement noise standard deviation g. A prior based on the manufacturer’s specification is (prior mean 100 g, prior standard deviation 1 g). Ten calibration weighings of a reference mass yield sample mean g.
Prior precision: .
Data precision: .
Posterior precision: , hence , g.
Posterior mean: g.The prior’s effective sample size is , so 10 observations overwhelm the prior entirely. The posterior sits essentially at the sample mean with a tight credible interval g.
Predictive for the next weighing: , i.e. a predictive standard deviation of g — only slightly wider than pure noise because the posterior uncertainty about is already very small.
Example 2: Polling with an Informative Prior
Suppose pre-election support for a candidate has been running at 52% with historical standard deviation 2%: prior . A new poll samples respondents with observed sample proportion and reported standard error . Treating the sample proportion as approximately Gaussian with known :
Precisions: ; .
Posterior precision: , so .
Posterior mean: .The posterior sits closer to the informative prior than to the new poll because the prior carries more precision than the single poll. A frequentist reading the poll alone would see ; the Bayesian credible interval is narrower and shifted, reflecting the prior information. As more polls accumulate, the prior’s 2500 pseudo-observations are gradually outweighed by the accumulating .
Example 3: Unknown Variance — Student- Credible Interval
A sample of i.i.d. observations from (both unknown) has sample mean and sample sum of squares . Using the reference prior (equivalent to in NIG):
Posterior parameters: , , , .
Marginal posterior for : .The posterior scale is . A 95% equal-tail credible interval uses the 0.975 quantile of , which is 2.306:
This matches the classical 95% -interval with , so and , giving . The slight numerical difference comes from using the posterior’s degrees of freedom instead of ; it reflects the choice between the Jeffreys prior () and the marginally stronger “classical” convention that debits one degree of freedom for estimating .
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
- 3.5 Conjugate Families — parent index.
- 3.5.1 Beta-Binomial Model — the canonical conjugate-pair template.
- 3.5.3 Gamma-Poisson Model — count-data analog.
- 3.5.4 Dirichlet-Multinomial Model — categorical analog.
- 3.2 Credible Intervals — Student- credible intervals arise from the NIG posterior.
- 3.6 Hierarchical Models — Normal-Normal is the building block for Gaussian hierarchies and James-Stein shrinkage.
- 3.8.1 Bayesian Linear Regression — multivariate Normal-Normal extended to regression coefficients.
- 2.2c.3 Gaussian Distribution — underlying distribution.
- 2.2c.8 Student’s t Distribution — arises as the marginal posterior for with unknown variance.