Tutorials › Bayesian Clinical Trials › Dirichlet-Multinomial Updates For Multinomial Endpoints

Posterior Computation · Tutorial 112 of 696

Dirichlet-Multinomial Updates For Multinomial Endpoints

Learn how multinomial category counts update a Dirichlet prior and how to calculate and interpret posterior means, marginal variances, and predictive probabilities.

Intermediate 9 min read

What You'll Learn

  • State the categorical sampling assumptions behind a multinomial likelihood.
  • Update each Dirichlet parameter by its corresponding observed category count.
  • Derive posterior means and marginal variances from Dirichlet moments.
  • Interpret prior concentration and fractional prior parameters.
  • Calculate a posterior predictive probability for the next endpoint.
  • Recognize when category definitions or dependence make this model inappropriate.

Why Use a Dirichlet-Multinomial Update?

A clinical endpoint may have more than two mutually exclusive outcomes. For example, at a specified assessment time, each participant might have a response, stable disease, or progression recorded. If the analysis concerns the proportions in all categories together, the unknown probabilities must be nonnegative and sum to one. A Dirichlet prior respects that constraint, and its combination with multinomial counts gives a posterior distribution in the same family.

The calculation is simple, but its interpretation depends on the endpoint and sampling model. The categories must be defined so each participant contributes to exactly one category, and the observations must be independent with a common category-probability vector under the model. The update does not itself justify those assumptions.

Definition: For \(K\) mutually exclusive and exhaustive categories, let \(\boldsymbol{p}=(p_1,\ldots,p_K)\), where \(p_i\geq 0\) and \(\sum_{i=1}^K p_i=1\). A Dirichlet distribution with parameters \(\boldsymbol{\alpha}=(\alpha_1,\ldots,\alpha_K)\), each \(\alpha_i>0\), has density proportional to \(\prod_{i=1}^K p_i^{\alpha_i-1}\) on this probability simplex. Write \(\boldsymbol{p}\sim\operatorname{Dirichlet}(\alpha_1,\ldots,\alpha_K)\), and let \(\alpha_0=\sum_{i=1}^K\alpha_i\) denote its total concentration.

Suppose \(n\) independent participants each have one endpoint category, with the same category probabilities \(\boldsymbol{p}\). Let \(Y_i\) be the number in category \(i\), so \(\sum_iY_i=n\). The count vector then has a multinomial distribution. A Dirichlet prior is a convenient joint prior for \(\boldsymbol{p}\), rather than a set of unrelated priors that might assign positive probability to category probabilities that do not sum to one.

Posterior Update and Its Derivation

For observed counts \(\boldsymbol{y}=(y_1,\ldots,y_K)\), the multinomial likelihood is proportional, as a function of \(\boldsymbol{p}\), to \(\prod_i p_i^{y_i}\). The omitted multinomial coefficient depends on the counts but not on \(\boldsymbol{p}\), so it does not affect the posterior density for \(\boldsymbol{p}\).

$$ \begin{aligned} P(\boldsymbol{y}\mid\boldsymbol{p}) &\propto \prod_{i=1}^K p_i^{y_i},\\ \pi(\boldsymbol{p}) &\propto \prod_{i=1}^K p_i^{\alpha_i-1},\\ \pi(\boldsymbol{p}\mid\boldsymbol{y}) &\propto \prod_{i=1}^K p_i^{y_i+\alpha_i-1}. \end{aligned} $$

The last expression has the form of a Dirichlet density. Its parameters are the prior parameters plus the observed counts. This is the conjugate update: the posterior remains in the Dirichlet family.

Theorem: Under the multinomial sampling model and a Dirichlet prior with all \(\alpha_i>0\), the posterior distribution is $$ \boldsymbol{p}\mid\boldsymbol{y}\sim \operatorname{Dirichlet}(\alpha_1+y_1,\ldots,\alpha_K+y_K). $$ If \(\alpha_i^*=\alpha_i+y_i\) and \(\alpha_0^*=\sum_i\alpha_i^*=\alpha_0+n\), then $$ E[p_i\mid\boldsymbol{y}]=\frac{\alpha_i^*}{\alpha_0^*}, \qquad \operatorname{Var}(p_i\mid\boldsymbol{y}) =\frac{\alpha_i^*(\alpha_0^*-\alpha_i^*)}{(\alpha_0^*)^2(\alpha_0^*+1)}. $$

Here is a justification for the moments. For a Dirichlet vector with parameters \(\boldsymbol{\alpha}^*\), its normalizing constant is \(\Gamma(\alpha_0^*)/\prod_i\Gamma(\alpha_i^*)\). Multiplying its density by \(p_i\) changes the exponent for category \(i\) by one; the ratio of the resulting normalizing constants gives \(E[p_i]=\alpha_i^*/\alpha_0^*\). Multiplying by \(p_i^2\) similarly gives the second moment:

$$ E[p_i^2]= \frac{\alpha_i^*(\alpha_i^*+1)} {\alpha_0^*(\alpha_0^*+1)}. $$

Subtracting the square of the mean gives the marginal variance. In detail, writing \(a=\alpha_i^*\) and \(A=\alpha_0^*\),

$$ \operatorname{Var}(p_i) =\frac{a(a+1)}{A(A+1)}-\left(\frac{a}{A}\right)^2 =\frac{a(A-a)}{A^2(A+1)}. $$

The category probabilities are dependent because they sum to one. For distinct categories \(i\) and \(j\), the posterior covariance is \(\operatorname{Cov}(p_i,p_j\mid\boldsymbol{y})=-\alpha_i^*\alpha_j^*/((\alpha_0^*)^2(\alpha_0^*+1))\), which is negative. Consequently, reporting separate marginal summaries does not imply the category probabilities vary independently.

Worked Updates

Worked Example: Three Clinical Endpoint Categories

Suppose, hypothetically, that 30 participants have one of three outcomes at a fixed assessment: response, stable disease, or progression. The observed counts are 18, 7, and 5, respectively. Use a uniform Dirichlet prior, \(\operatorname{Dirichlet}(1,1,1)\). This prior is symmetric across the three categories, and the counts sum to 30 as required.

The posterior parameters are \((1+18,1+7,1+5)=(19,8,6)\), with total concentration \(A=33\). Thus the posterior mean category probabilities are:

$$ E[\boldsymbol{p}\mid\boldsymbol{y}] =\left(\frac{19}{33},\frac{8}{33},\frac{6}{33}\right) \approx (0.5758,0.2424,0.1818). $$

For response, the marginal posterior variance is \[ \operatorname{Var}(p_{\text{response}}\mid\boldsymbol{y}) =\frac{19(33-19)}{33^2(33+1)} =\frac{266}{37026} \approx 0.007184. \] The posterior standard deviation is therefore \(\sqrt{0.007184}\approx0.08476\). The posterior mean response probability is about 57.6%, and this standard deviation describes posterior uncertainty in that probability, not variability among individual response indicators.

Worked Example: A Category With No Observed Participants

In a hypothetical trial, 10 participants are classified as having response, stable disease, or progression, with counts \((0,4,6)\). Take the prior to be \(\operatorname{Dirichlet}(2,3,5)\). The prior parameters sum to 10; they encode the prior distribution, not additional observed participants.

The posterior is \(\operatorname{Dirichlet}(2,7,11)\), with total concentration 20. The posterior mean probabilities are \((2/20,7/20,11/20)=(0.1000,0.3500,0.5500)\). For response, the marginal variance is

$$ \operatorname{Var}(p_{\text{response}}\mid\boldsymbol{y}) =\frac{2(20-2)}{20^2(21)} =\frac{36}{8400} \approx 0.004286. $$

The observed response count is zero, but the posterior response probability is not fixed at zero: the prior assigned positive probability to response probabilities above zero, and the data update that prior. This is one reason a zero observed count should not be reported as proof that the underlying category is impossible.

Worked Example: Predicting the Next Participant's Category

Consider a hypothetical endpoint with four categories, with prior parameters \((0.5,1,1.5,2)\) and observed counts \((2,0,3,5)\). The counts sum to 10. Updating gives posterior parameters \((2.5,1,4.5,7)\), whose total is 15. The posterior mean probabilities are approximately \((0.1667,0.06667,0.3000,0.4667)\).

For one additional participant whose outcome is recorded under the same category definitions and sampling model, the posterior predictive probability of category 4 is

$$ P(\text{next outcome is category 4}\mid\boldsymbol{y}) =E[p_4\mid\boldsymbol{y}] =\frac{7}{15} \approx 0.4667. $$

This equality follows by averaging the conditional probability \(P(\text{category 4}\mid p_4)=p_4\) over the posterior distribution of \(p_4\). It predicts a single next outcome; it does not mean that the unknown \(p_4\) is known to equal 0.4667.

Assumptions, Checks, and Alternatives

The update is appropriate when the endpoint categories are mutually exclusive and exhaustive for the analysis, the number of observations is treated as fixed, and each participant's category is a draw from the same probability vector independently of the others. For example, a protocol may define one primary status at a particular time point. If a participant can be counted in multiple categories, the counts do not have the stated multinomial model. If categories omit outcomes, the analyst must define how those outcomes are handled rather than silently treating the recorded categories as exhaustive.

Before calculating a posterior, check that every \(y_i\) is a nonnegative integer and \(\sum_i y_i=n\), that all prior parameters are positive, and that category labels mean the same thing for every participant. Examine whether the common-probability and independence assumptions are credible. Clustering by site, repeated observations from the same participant, or meaningful changes in outcome probability over time may require a model that represents those features. Missing endpoint data also need a considered handling strategy; simply excluding them can change the population being described.

The Dirichlet prior makes a direct joint model for all category probabilities. Its total concentration \(\alpha_0\) controls how concentrated the prior is around its mean vector \((\alpha_1/\alpha_0,\ldots,\alpha_K/\alpha_0)\); the prior mean alone does not describe the full prior. Fractional parameters are valid. A symmetric prior expresses equal treatment of categories, but symmetry is not automatically clinically plausible. Prior predictive checks can help assess whether the prior implies plausible outcome patterns before observing trial data.

A common alternative mistake is to place separate independent Beta priors on each \(p_i\). Those independent draws need not sum to one, so they do not in general define a valid joint model for a multinomial endpoint. A Beta distribution can describe one marginal category probability under a Dirichlet model, but the category probabilities remain jointly constrained. More flexible regression models may be needed when probabilities vary with treatment, covariates, site, or time; the simple conjugate update does not account for such structure.

Common pitfall: Adding counts only to categories that were observed and setting a zero-count category's posterior probability to zero is incorrect. The update is \(\alpha_i^*=\alpha_i+y_i\) for every category. If \(\alpha_i>0\), a zero count leaves that category with a positive posterior parameter and generally positive posterior probability.

Check Your Understanding

Try each calculation from the stated prior and counts. Solutions follow the questions.

  1. With prior \(\operatorname{Dirichlet}(1,2,1)\) and counts \((6,3,1)\), what are the posterior parameters and posterior mean probabilities?
  2. With prior \(\operatorname{Dirichlet}(2,2,2)\) and counts \((1,4,1)\), calculate the posterior variance of the probability for category 2.
  3. For posterior parameters \((3,5,2)\), what is the posterior predictive probability that the next participant is in category 3?
  4. Why is the Dirichlet-multinomial update inappropriate if participants may be counted in more than one endpoint category?

Solutions. For question 1, the posterior parameters are \((1+6,2+3,1+1)=(7,5,2)\), with total 14, so the posterior mean probabilities are \((7/14,5/14,2/14)=(0.5000,0.3571,0.1429)\). For question 2, the posterior parameters are \((3,6,3)\), with total 12. The category 2 variance is \(6(12-6)/(12^2(13))=36/1872\approx0.01923\). For question 3, the total is 10, so the predictive probability is the posterior mean \(2/10=0.2000\). For question 4, multinomial counts require mutually exclusive categories, so overlapping categories can count the same participant more than once and do not follow the stated multinomial sampling model.

Clinical Biostats