Conjugate Priors and Exponential-Family Bayesian Inference
Anchor (Master): Robert 2007 The Bayesian Choice (2nd ed., Springer) Ch. 3 (§3.3 conjugate priors, exponential families); Diaconis & Ylvisaker 1979 Conjugate priors for exponential families (Ann. Statist. 7); Bernardo & Smith 1994 Bayesian Theory (Wiley) Ch. 5
Intuition Beginner
A Bayesian analysis starts with a prior — your belief about an unknown quantity before seeing data — and updates it with the data to produce a posterior. The update is honest but messy: usually you must compute an awkward integral just to normalise the posterior, and the result may be a distribution with no name. For a few special pairings of prior and data, something nicer happens. The posterior comes out in the same family as the prior, only with its dials turned. A beta prior meets coin-flip data and gives a beta posterior; a gamma prior meets count data and gives a gamma posterior. A prior family with this self-reproducing property is called conjugate.
Conjugacy is convenient, but the deeper reason it matters is the picture it gives you. The prior behaves like a batch of imaginary observations you bring to the table before the real data arrive. Updating just means adding the real observations to the imaginary ones and re-reading the same dials. If your prior is worth five pretend coin flips and the data bring fifty real ones, the data dominate. If your prior is worth five hundred pretend flips, your prior wins until a great deal of real data arrives.
This is why the conjugate posterior estimate always lands between your prior guess and what the data alone would say. It is a blend, weighted by how much each side knows. The blend shifts toward the data as data accumulate, which is the same shrinkage idea behind ridge regression and many modern methods.
Visual Beginner
Picture the conjugate update as a single bookkeeping table. The prior carries a small set of pseudo-counts; the data carry their own counts; the posterior is the row-by-row sum. The shape of the distribution never changes — only the numbers inside it move.
| Quantity | Prior (pseudo-data) | Data (real) | Posterior (sum) |
|---|---|---|---|
| Coin flips: successes | |||
| Coin flips: failures | |||
| Best guess of rate |
The posterior rate sits between the prior guess and the data's , pulled toward the data because ten real flips outweigh four pseudo-flips. Add more real data and the posterior slides further toward .
Worked example Beginner
A factory line produces occasional defects. You model the number of defects per shift as Poisson with unknown rate . From past lines you believe is around , and you encode this as a Gamma prior with shape and rate , whose mean is . The gamma is conjugate to the Poisson, so the posterior will again be a gamma.
You now observe four shifts with defects, a total of defects over shifts.
Step 1. Update the shape. The conjugate rule adds the total count to the prior shape: posterior shape .
Step 2. Update the rate. The rule adds the number of shifts to the prior rate: posterior rate .
Step 3. Read the posterior estimate. The posterior is , with mean .
Step 4. Compare the three numbers. The prior mean was . The data alone (the average count) say . The posterior mean sits between them.
What this tells us. The prior acted like shifts' worth of pseudo-data carrying pseudo-defects. The real data added shifts and defects. The posterior simply pooled the two, and the estimate landed between belief and data — closer to the data because four real shifts slightly outweigh two pseudo-shifts. With forty real shifts instead of four, the posterior mean would sit almost on top of the data average.
Check your understanding Beginner
Formal definition Intermediate+
Fix a statistical model dominated by a -finite measure, with likelihood , and a prior probability measure on . The posterior is , normalised by the marginal (the disintegration recalled in 45.03.01).
Definition (conjugate family). Let be a family of priors on indexed by a hyperparameter . The family is conjugate to the likelihood if for every and every with there is a hyperparameter such that
The map is the hyperparameter update. Conjugacy is a property of the pair (prior family, likelihood); a family conjugate to one likelihood need not be conjugate to another.
The exponential-family construction. Let the likelihood be a -parameter exponential family in natural form (from 45.01.02),
with natural statistic , log-partition function , and convex natural parameter space . The natural conjugate prior on the natural parameter is
where is the set of hyperparameters for which the prior is a proper probability density and is the normalising constant. The hyperparameter plays the role of a prior sample size and of a prior sufficient-statistic total: is the prior guess for the mean of .
The posterior update. With a single observation , the posterior is again of conjugate form with
for an i.i.d. sample the update is and . The prior contributes pseudo-observations carrying a pooled natural statistic ; the data contribute observations carrying , and the posterior pools the two.
Definition (posterior predictive distribution). The posterior predictive density of a future observation given data is
the data-generating density averaged over the posterior; it is the marginal of under the updated model and propagates parameter uncertainty into predictions.
Counterexamples to common slips Intermediate+
A conjugate family is not unique, and mixtures stay conjugate. Any finite mixture of natural conjugate priors has a posterior that is again a mixture of conjugate priors (with reweighted mixing weights), so "conjugate" never means a single canonical prior. Mixtures of conjugates can approximate any prior while preserving closed-form updates.
The natural conjugate prior lives on , not necessarily on the original . Conjugacy is a statement in the natural parametrisation; reparametrising to a mean or scale parameter transforms the prior by a Jacobian, so the same prior need not look like a member of a "named" family in the original coordinates. The beta, gamma, and Dirichlet are the natural conjugates re-expressed in convenient coordinates.
Conjugacy does not require a flat or noninformative prior. Setting to seek "no information" can push outside and yield an improper prior whose posterior may also be improper. Propriety of the conjugate prior is a condition on , not an automatic feature of the form.
Key theorem with proof Intermediate+
The organising result is that the exponential-family conjugate prior closes the Bayesian update into hyperparameter arithmetic, and that the conjugacy is reflected in a linear posterior expectation of the mean parameter.
Theorem (exponential-family conjugacy and the Diaconis-Ylvisaker linear posterior expectation). Let be a full exponential family and let be the natural conjugate prior with .
(i) (Closure.) For data the posterior is with , provided .
(ii) (Linear posterior expectation.) For with , the prior mean of the mean parameter is , and after one observation the posterior mean is
This posterior expectation is affine in ; conversely, for a full family with not affinely degenerate, linearity of in forces to be of the natural conjugate form.
Proof of (i). The likelihood of the sample is with . Multiplying by the prior,
the carrier being a constant in absorbed into normalisation. The right side is, up to its normalising constant, exactly , which is a proper density precisely when .
Proof of (ii). Write the conjugate density as . The normaliser satisfies . The key identity comes from integrating the divergence of the density. Consider the vector field ; on the interior of the density decays at the boundary for , so the integral of its gradient vanishes:
Rearranging, . Applying the same identity to the posterior from part (i) gives , affine in with slope .
For the converse, suppose is affine in for -almost every . The boundary identity above shows that for any prior on with vanishing boundary flux, , and Diaconis and Ylvisaker prove that requiring this gradient to be affine in across the data range pins the posterior normaliser's -dependence to the form , hence to the natural conjugate density (up to the constraint is not concentrated on a proper affine subspace, the non-degeneracy hypothesis) [Diaconis Ylvisaker 1979].
Bridge. This theorem builds toward the standard conjugate pairs and the posterior-predictive computations of the Advanced section, and it appears again in ridge regression as a conjugate normal-normal posterior mean 45.06.03 and in empirical Bayes where the marginal of the conjugate model is the objective 45.04.05. This is exactly the device that turns the Bayesian integral into hyperparameter addition: the linearity of the exponent in inherited from the exponential family of 45.01.02 is what lets the prior's and the data's pool by simple summation. The central insight is that conjugacy is sufficiency read on the prior side — the natural statistic that quarantines the parameter in the likelihood is the same that the prior absorbs, so a fixed-dimension prior stays fixed-dimension under unlimited data. Putting these together, the affine posterior expectation exhibits the shrinkage of 45.03.01 as a convex combination of the prior mean and the datum , and the slope is the prior-sample-size dial that generalises the beta-binomial, gamma-Poisson, and normal-normal weights into one formula, the prior precision playing in the next chapter the role that is dual to the ridge regularisation strength.
Exercises Intermediate+
Advanced results Master
The natural conjugate prior and the parametric structure of
The natural conjugate prior inherits its analytic life from the log-partition function of 45.01.02. Its hyperparameter domain is convex, by the same Hölder argument that makes convex, and the propriety of the prior is exactly membership in [Diaconis Ylvisaker 1979]. The Diaconis-Ylvisaker theorem characterises the natural conjugate among all priors by the affineness of the posterior expectation in the natural statistic: a full exponential family with not affinely concentrated admits a prior with posterior mean of the mean parameter affine in if and only if that prior is the natural conjugate, and then the slope is the universal . The mean parameter is the bridge to interpretation: is the prior guess for , and the posterior pulls it toward the data's with weight fixed by .
The standard pairs are the catalogue of this one construction. The beta is the natural conjugate of the Bernoulli/binomial, the gamma of the Poisson and of the exponential rate, the Dirichlet of the multinomial; for the normal with both parameters unknown the conjugate is the normal-inverse-gamma in one dimension and the normal-inverse-Wishart in dimensions, factoring as a prior on the variance (or covariance) times a conditionally normal prior on the mean given the variance, which is the only conjugate structure compatible with the joint exponential form .
Posterior predictive distributions and the marginal likelihood
The posterior predictive is computable in closed form for conjugate models because the integral is a ratio of conjugate normalisers. With the predictive of a future natural-statistic increment is times the carrier, so the beta-binomial, the gamma-Poisson predictive (a negative binomial), and the normal predictive (a Student-, with the inflated variance recording parameter uncertainty) all drop out of the same algebra. The same ratio gives the marginal likelihood , the evidence used for model comparison and the objective that empirical Bayes maximises over [Bernardo Smith 1994]. The predictive inflates the plug-in variance precisely by the posterior variance of the mean parameter — predicting from the posterior is strictly more honest than predicting from a point estimate, and the gap closes at the parametric rate as grows.
Noninformative and Jeffreys priors, with propriety
When prior information is weak one seeks a default prior. The flat prior is not invariant under reparametrisation and can fail propriety; Jeffreys' rule , with the Fisher information, is reparametrisation-invariant by construction (the information transforms by the squared Jacobian, whose square root cancels the change-of-variables Jacobian), which is its principal virtue [Robert 2007]. For the binomial Jeffreys is the proper ; for a location parameter it is the improper flat prior; for a scale it is the improper . Impropriety is tolerable when the formal posterior is proper, but it must be checked: an improper prior can yield an improper posterior, in which case no inference exists, and in hierarchical models improper hyperpriors are a frequent silent cause of improper joint posteriors. Jeffreys priors also lose their appeal in multiparameter settings, where the joint Jeffreys rule can give poor marginal behaviour and is superseded by reference priors (Bernardo) that maximise the expected Kullback-Leibler divergence from prior to posterior. The honest summary is that there is no unique noninformative prior; the choice is a modelling decision constrained by invariance and propriety.
Limitations of conjugacy
Conjugacy is a computational luxury, not a modelling principle, and its reach is narrow. It is essentially confined to exponential-family likelihoods with their natural conjugates; the moment a model leaves that class — a logistic regression with a normal prior, a hierarchical model with non-conjugate hyperpriors, a mixture model, a likelihood with a parameter-dependent support — the posterior loses closed form and the normalising integral becomes intractable. Even within exponential families the conjugate prior may be too rigid to encode genuine prior beliefs, since its shape is dictated by rather than by the analyst; mixtures of conjugates buy flexibility at the cost of growing mixture components under repeated updating. The general resolution is to abandon closed forms and sample from the posterior, which is the motivation for Markov chain Monte Carlo 45.03.05: Gibbs sampling exploits conditional conjugacy (each full conditional is conjugate even when the joint is not), and Metropolis-Hastings handles the fully non-conjugate case. Conjugacy thus survives in modern practice less as a way to avoid computation than as the building block of the conditional updates inside a sampler.
Synthesis. The central insight is that conjugacy is sufficiency viewed from the prior: the natural statistic that quarantines the parameter in the exponential-family likelihood of 45.01.02 is the very object the natural conjugate prior absorbs, so this is exactly why the Bayesian update collapses to hyperparameter addition . The foundational reason the standard pairs — beta-binomial, gamma-Poisson, normal-normal, normal-inverse-Wishart, Dirichlet-multinomial — are one phenomenon is that each is the natural conjugate for its family's , and the Diaconis-Ylvisaker linear posterior expectation generalises their separate shrinkage formulas into one affine rule. Putting these together, the conjugate posterior mean is the convex combination realising the shrinkage of 45.03.01, and it is dual to the ridge penalty of 45.06.03 under prior-precision equals regularisation-strength, while the closed-form marginal appears again in empirical Bayes 45.04.05. The bridge is the log-partition function and its conjugate-normaliser : conjugacy, the posterior predictive, the marginal likelihood, and the Jeffreys choice are one theory about the analytic structure of , and the boundary where it ends — non-exponential or hierarchical models with no tractable — is where Markov chain Monte Carlo 45.03.05 takes over.
Full proof set Master
Proposition 1 (closure of the natural conjugate prior under updating). For a full exponential family and prior with , the posterior given i.i.d. is with , proper iff .
Proof. The sample likelihood is . Bayes' rule gives , the -free carrier absorbed into the normaliser. This is up to normalisation, which exists as a probability density iff its kernel is integrable over , i.e. iff .
Proposition 2 (convexity of ). The hyperparameter domain is convex.
Proof. The map is affine in for each fixed , hence the integrand is a log-convex function of . For and , Hölder's inequality with exponents , gives
so the convex combination lies in .
Proposition 3 (linear posterior expectation; Diaconis-Ylvisaker). For , and .
Proof. On the density is continuously differentiable on and its boundary flux through vanishes (the kernel is integrable with integrable gradient, so the surface term in the divergence theorem is zero). Therefore
giving . By Proposition 1 the posterior is ; applying the same identity to it yields .
Proposition 4 (closed-form marginal likelihood and posterior predictive). With the conjugate normaliser, the marginal likelihood is , and the one-step posterior predictive density is .
Proof. By definition , so the conjugate density integrates to one. The marginal is
and the remaining integral is , proving the marginal formula. The posterior predictive is , and the integral is .
Proposition 5 (reparametrisation invariance of the Jeffreys prior). Under a smooth reparametrisation the Jeffreys prior transforms as a density: , so Jeffreys' rule gives the same prior measure in every parametrisation.
Proof. The Fisher information transforms by , where is the Jacobian, since the score transforms by under the chain rule and information is its covariance. Taking determinants, , so . Hence the Jeffreys density in equals the Jeffreys density in pulled back with the Jacobian factor , which is exactly the change-of-variables law for a measure. The induced prior measure is therefore invariant: computing Jeffreys in any coordinate system and transforming gives the same probability assignment.
Connections Master
Bayes estimation under loss
45.03.01is the immediate consumer: the conjugate posterior mean is the squared-error Bayes estimator of the mean parameter, and the three closed-form examples computed there as estimators (normal-normal, beta-binomial, gamma-Poisson) are the special cases of the single hyperparameter-update rule proved here, with the prior-sample-size controlling the shrinkage that unit identifies.Sufficiency, factorization, and exponential families
45.01.02supply the likelihood side: the natural statistic and log-partition function that this unit's conjugate prior is built against are exactly the objects defined there, and conjugacy is sufficiency read on the prior — the prior absorbs the same that quarantines the parameter, which is why a fixed-dimension conjugate prior survives unlimited data.Markov chain Monte Carlo
45.03.05is the resolution where conjugacy ends: Gibbs sampling builds on conditional conjugacy (each full conditional of a hierarchical model is a conjugate update of the form derived here) and Metropolis-Hastings handles the non-conjugate posteriors whose intractable normaliser this unit identifies as the limitation of closed-form Bayes.Ridge regression and regularised estimation
45.06.03is the conjugate normal-normal model in disguise: the posterior mean under a Gaussian prior on regression coefficients is the ridge estimator, and the prior precision of this unit is the ridge penalty , so the precision-pooling update derived here is the ridge normal equation read as a prior.Empirical Bayes and shrinkage estimation
45.04.05consumes the marginal likelihood proved here: empirical Bayes estimates the conjugate hyperparameters by maximising this closed-form marginal over the data, turning the prior itself into a data-driven object while retaining the conjugate update for the parameter.
Historical & philosophical context Master
The conjugate update for the binomial is implicit in Thomas Bayes' posthumous 1763 essay and in Pierre-Simon Laplace's development of inverse probability, where the uniform prior on a success rate yields the beta posterior and Laplace's rule of succession is its predictive. The general programme of choosing a prior so that the posterior stays analytically tractable was made systematic by Howard Raiffa and Robert Schlaifer in Applied Statistical Decision Theory [Raiffa Schlaifer 1961] (1961), who coined the use of "conjugate" priors and tabulated the standard families for decision-theoretic use. The exponential-family unification — that every standard conjugate pair is an instance of the prior and that conjugacy is characterised by a linear posterior expectation of the mean parameter — is due to Persi Diaconis and Donald Ylvisaker in Conjugate priors for exponential families (Ann. Statist. 7, 1979) [Diaconis Ylvisaker 1979], who also proved that mixtures of conjugate priors are dense in the space of priors and remain closed under updating.
The noninformative-prior tradition runs from Bayes' and Laplace's flat priors through Harold Jeffreys' invariance rule in Theory of Probability [Jeffreys 1961] (1939; 3rd ed. 1961), and on to José Bernardo's reference priors, which maximise the expected information gain from prior to posterior and repair the multiparameter deficiencies of Jeffreys' rule. The modern computational treatment, in which conjugacy is the analytic core that survives as the conditional update inside Gibbs samplers and the building block of hierarchical models, is laid out in Andrew Gelman and colleagues' Bayesian Data Analysis [Gelman 2013] (1995; 3rd ed. 2013) and in Christian Robert's The Bayesian Choice [Robert 2007] (1994; 2nd ed. 2007), the latter organising the exponential-family conjugate theory around the same natural-parameter structure used here.
Bibliography Master
@book{raiffaschlaifer1961applied,
author = {Raiffa, Howard and Schlaifer, Robert},
title = {Applied Statistical Decision Theory},
publisher = {Harvard Business School},
year = {1961}
}
@article{diaconisylvisaker1979conjugate,
author = {Diaconis, Persi and Ylvisaker, Donald},
title = {Conjugate priors for exponential families},
journal = {Annals of Statistics},
volume = {7},
number = {2},
pages = {269--281},
year = {1979}
}
@book{jeffreys1961theory,
author = {Jeffreys, Harold},
title = {Theory of Probability},
edition = {3rd},
publisher = {Oxford University Press},
year = {1961}
}
@book{bernardosmith1994bayesian,
author = {Bernardo, Jos\'e M. and Smith, Adrian F. M.},
title = {Bayesian Theory},
publisher = {Wiley},
year = {1994}
}
@book{gelman2013bayesian,
author = {Gelman, Andrew and Carlin, John B. and Stern, Hal S. and Dunson, David B. and Vehtari, Aki and Rubin, Donald B.},
title = {Bayesian Data Analysis},
edition = {3rd},
publisher = {CRC Press},
year = {2013}
}
@book{robert2007bayesian,
author = {Robert, Christian P.},
title = {The Bayesian Choice},
edition = {2nd},
series = {Springer Texts in Statistics},
publisher = {Springer},
year = {2007}
}
@book{casellaberger2002statistical,
author = {Casella, George and Berger, Roger L.},
title = {Statistical Inference},
edition = {2nd},
publisher = {Duxbury},
year = {2002}
}