Dirichlet-Multinomial Conjugacy
Let be an unknown probability vector on a -category simplex (, ). The Dirichlet-Multinomial conjugate pair is
where with and with . The posterior is
The prior hyperparameters update componentwise: add the observed count in each category to the prior’s concentration for that category. The prior is interpretable as “pseudo-observations” in category , for a total prior sample size .Posterior summaries: writing ,
- Posterior mean of : — a weighted average of the prior mean and the MLE .
- Posterior mode (MAP) of : when for all .
- Posterior marginal of a single : — reduces to Beta-Binomial when .
- Posterior covariance: for . Components are always negatively correlated because they share the unit budget.
Common prior choices:
- on the simplex: flat prior; posterior mode equals the MLE (with a small shift).
- (Perks-Jeffreys-like, sparse): small favors mass concentrating on a few categories.
- (Jeffreys prior): reparametrization-invariant; gentle shrinkage toward the simplex center.
Posterior predictive for a new observation (single draw from one of categories):
For new i.i.d. draws , the predictive is Dirichlet-Multinomial (also called Pólya / multivariate hypergeometric): , with variance strictly larger than the plug-in Multinomial.
Prerequisites
- 3.1 Bayesian Framework — prior, likelihood, posterior, Bayes’ rule.
- 3.5 Conjugate Families — the general conjugacy pattern this note instantiates.
- 3.5.1 Beta-Binomial Model — two-category special case; all intuitions carry over.
- 2.2b.4 Multinomial Distribution — the likelihood.
- 2.2c.10 Dirichlet Distribution — the prior family.
Intuition
The Dirichlet distribution is the multivariate generalization of the Beta: instead of one probability on , it models a full probability vector on the simplex. Its density is proportional to , exactly the kernel of the Multinomial likelihood viewed as a function of . Multiplying prior by likelihood adds exponents componentwise, and the result is again Dirichlet with concentrations incremented by the observed category counts.
The shape parameters play two roles at once. First, their ratios set the prior mean (expected probability for each category). Second, their total sets the prior’s concentration — a large produces a prior tightly focused around its mean vector, and a small produces a prior that is dispersed across the simplex. This two-parameter control is why the Dirichlet is the standard prior over discrete distributions: it separates “what I expect” from “how confident I am.”
The negative posterior correlation between components is an unavoidable structural fact. Evidence that category has more probability mass than thought necessarily implies that some other category(s) have less, because the components must sum to one. No conjugate prior on the simplex could avoid this; it is a property of simplex geometry, not of Dirichlet specifically.
Properties
(Reduces to Beta-Binomial When ) The two-category Dirichlet-Multinomial is the Beta-Binomial model.
With , , and , the Dirichlet prior is and the Multinomial likelihood is . The posterior is exactly the Beta-Binomial posterior. All Beta-Binomial results lift to the multicategory case.
(Posterior Marginal of Each is Beta) Marginalizing over the other components leaves a Beta distribution.
This follows from the aggregation property of the Dirichlet: merging all categories other than into one aggregate category collapses the Dirichlet to a Beta on . Credible intervals for a single category probability reuse the Beta machinery from the 3.5.1 Beta-Binomial Model.
(Aggregation and Subcomposition) Merging categories keeps the posterior Dirichlet; conditioning on a subset is also Dirichlet.
If categories are partitioned into groups with and , then . Conditional on the total probability in a subset, the within-subset probabilities (renormalized) are independently Dirichlet distributed. This is why Dirichlet is the natural model for hierarchical categorical data.
(Posterior Mean as Simplex Shrinkage) Posterior mean lies between the prior mean vector and the MLE, weighted by effective sample sizes.
A Dirichlet prior with total mass acts like prior observations distributed across the categories. A category with zero observed count still receives nonzero posterior mass , a form of Laplace smoothing that prevents posterior probabilities from collapsing to zero on unseen categories. This is widely used in natural-language models under the name “additive smoothing.”
(Sequential Updating) Componentwise accumulation of category counts yields the same posterior as batch updating.
After seeing of total size and then of size , the posterior is — associative in the count vector. See 3.1 Bayesian Framework.
(Posterior Predictive is Dirichlet-Multinomial) Predictive for new draws has extra variance compared to the plug-in Multinomial.
The marginal for each component is Beta-Binomial, and the variance of is inflated above (the Multinomial marginal variance) by a factor that approaches 1 only as the posterior concentrates. The Dirichlet-Multinomial is the multicategory analog of the Beta-Binomial predictive distribution.
(Negative Covariance is Structural) for all .
Because is a hard constraint, any Bayesian model on the simplex must assign negative posterior covariance between distinct components. The exact formula is
If a model’s inferential goal depends on independent category probabilities, this is a sign that the underlying problem is miscast — the simplex constraint is real.
(Dirichlet Multinomial as a Count-Data Alternative) Marginalizing away yields a Dirichlet-Multinomial likelihood.
For applications where the parameter is a nuisance, integrating out gives the marginal distribution of the counts, , known as the Dirichlet-Multinomial or Pólya distribution. This serves as a more flexible likelihood than Multinomial itself in overdispersed count-category data, and is the basis of hyperparameter tuning via empirical Bayes.
Examples
Example 1: Survey on a Three-Option Question
A survey asks respondents to choose among three options A, B, C. A weakly informative uniform prior is (with ). Observed counts are .
Posterior: with total .
Posterior means: — essentially the sample proportions because the prior is very weak.
Marginal credible interval for : , 95% equal-tail CI .
Posterior predictive for one new respondent: , , — the predictive plug-in uses the posterior mean, not the MLE.
Example 2: Laplace Smoothing in a Language Model
Over a vocabulary of words, a corpus of words is counted. Many words appear zero times. An MLE would assign probability zero to these words — disastrous for computing the likelihood of any future text containing one of them.
Using a prior with (equivalent to adding one pseudo-count per word):
For an unseen word (), the posterior mean is — nonzero. For a common word appearing times, , only slightly pulled toward uniform from the raw rate . This is add-one (Laplace) smoothing, a standard regularization in -gram language models derived directly from the Dirichlet-Multinomial posterior mean.
Example 3: A/B/C Test with Sparse Data
A trial of three website variants records no conversions for variant C out of 20 visitors: . Naively, the MLE says variant C has zero conversion rate. Using a uniform Dirichlet prior :
Posterior: .
Posterior means: .
Credible interval for (Beta marginal ): 95% equal-tail CI — wide, reflecting genuine uncertainty.A frequentist Wald confidence interval for would be undefined (standard error zero with ) or degenerate; the Bayesian analysis gives a usable interval directly. Running variant C further to resolve the uncertainty is the correct next step.
Derivation
Goal: derive the posterior.
The Dirichlet prior is
supported on the simplex. The Multinomial likelihood for with is
Multiplying and dropping -free constants:
the kernel of , with normalizing constant .
Posterior predictive: integrating out for a single new category draw,
For new draws , the integral of against the Dirichlet posterior yields the closed-form Dirichlet-Multinomial .
See Also
- 3.5 Conjugate Families — parent index.
- 3.5.1 Beta-Binomial Model — two-category special case.
- 3.5.2 Normal-Normal Model — continuous analog on the real line.
- 3.5.3 Gamma-Poisson Model — count-data analog on the positive reals.
- 3.6 Hierarchical Models — Dirichlet hyperprior over topic or cluster proportions.
- 3.7 Marginal Likelihood — Dirichlet-Multinomial evidence enables empirical-Bayes tuning of .
- 2.2b.4 Multinomial Distribution — the likelihood.
- 2.2c.10 Dirichlet Distribution — the prior.