Signature
alpha_0 = alpha_1 + alpha_2 + alpha_3; E_2 = alpha_2 / alpha_0; V_2 = alpha_2 * (alpha_0 - alpha_2) / (alpha_0^2 * (alpha_0 + 1)); V_1 = alpha_1 * (alpha_0 - alpha_1) / (alpha_0^2 * (alpha_0 + 1)); C_12 = -alpha_1 * alpha_2 / (alpha_0^2 * (alpha_0 + 1)); R_12 = C_12 / sqrt(V_1 * V_2)
| Inputs | Definition | Unit |
|---|---|---|
alpha_1 | Remaining in the starting state in the article's example | none, above zero |
alpha_2 | Progression in the article's example | none, above zero |
alpha_3 | Death in the article's example | none, above zero |
alpha_0 | Precision of the row; with counts and no prior, the number of patients followed | none |
|---|---|---|
E_2 | Unit: probability | — |
V_2 | Unit: probability squared | — |
V_1 | Unit: probability squared | — |
C_12 | Always negative | probability squared |
R_12 | Unit: none, between minus one and zero | — |
Function
Dirichlet distribution for one row of a transition matrix: moments, conjugate update from transition counts and beta marginals
Treats the probabilities of moving from one health state to each of K destinations as a single uncertain vector that always adds to one, with one positive parameter per destination. The ratios of the parameters fix the means and their sum fixes the precision; observed transition counts add to a Dirichlet prior to give a Dirichlet posterior, and each component on its own follows a beta distribution. Sampling a row from normalised gamma draws is HE-FM-BETA-005 on the beta distribution page. Notation follows the Dirichlet Distribution article.
Try this function
Implementations
Excel
Dirichlet moments for a three-destination row from named cells
With Alpha1, Alpha2 and Alpha3 named, the formulas return the parameter sum, the mean and variance of the second component, the variance of the first, their covariance and their correlation, held in AlphaSum, MeanP2, VarP2, VarP1, CovP12 and CorrP12.
=Alpha1+Alpha2+Alpha3; =Alpha2/AlphaSum; =Alpha2*(AlphaSum-Alpha2)/(AlphaSum^2*(AlphaSum+1)); =Alpha1*(AlphaSum-Alpha1)/(AlphaSum^2*(AlphaSum+1)); =-Alpha1*Alpha2/(AlphaSum^2*(AlphaSum+1)); =CovP12/SQRT(VarP1*VarP2)
Assumptions
Positive parameters and components that add to one
Every alpha_j is above zero and the components p_1, p_2 and p_3 are non-negative and add to one, so the row is a valid row of a transition matrix in every draw.
One precision parameter for the whole row
Once the means are fixed, every variance and covariance follows from alpha_0, so the row cannot carry a well-estimated death probability alongside a poorly estimated progression probability from a different source.
Worked examples
Row fitted to 70 stable, 20 progressed and 10 dead out of 100
With the zero prior the row is Dirichlet(70, 20, 10): the progression probability has mean 0.20 and variance 0.001584 (standard deviation about 0.0398), the covariance between staying stable and progressing is minus 0.001386, and their correlation is about minus 0.76, as in the article.
alpha_1 = 70; alpha_2 = 20; alpha_3 = 10; alpha_0 = 100; E_2 = 0.2; V_2 = 0.001584; V_1 = 0.002079; C_12 = -0.001386; R_12 = -0.7638
Same proportions observed in 10 patients
Dirichlet(7, 2, 1) has the same means but about nine times the variance, 0.014545 for progression, while the correlation is unchanged at about minus 0.76 because it depends only on the means (computed here for illustration).
alpha_1 = 7; alpha_2 = 2; alpha_3 = 1; alpha_0 = 10; E_2 = 0.2; V_2 = 0.014545; V_1 = 0.019091; C_12 = -0.012727; R_12 = -0.7638
Row after a uniform prior is added to the counts
Adding one to each count gives Dirichlet(71, 21, 11), with a progression mean of 0.204 as in the article and a slightly smaller variance of 0.001561 (variance and correlation computed here for illustration).
alpha_1 = 71; alpha_2 = 21; alpha_3 = 11; alpha_0 = 103; E_2 = 0.2039; V_2 = 0.001561; V_1 = 0.002059; C_12 = -0.001351; R_12 = -0.7538
Common errors
Sampling each exit from its own independent beta
Independent draws from Beta(70, 30), Beta(20, 80) and Beta(10, 90) are each correct on their own, but the row total then has variance 0.002079 + 0.001584 + 0.000891 = 0.004554, a standard deviation of about 0.067, and about 30 per cent of iterations in the article's illustration fall below 0.93 or above 1.07.
Rescaling independent beta draws to force a row total of one
Dividing each independent draw by the row total conserves the cohort but not the distribution: in the article's simulation of 400,000 iterations the rescaled progression probability had a central 95 per cent range of about 0.136 to 0.267, narrower than the 0.128 to 0.283 of the correct beta marginal, so uncertainty is understated.
Treating the components of a sampled row as independent in later analysis
The components are negatively correlated, so an expected value of partial perfect information for one component would need the others drawn from their conditional distribution given it; the row is usually treated as one group of parameters.
Sources
Dirichlet density and moments in Bayesian Data Analysis
Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB. Bayesian Data Analysis. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2013 (full text of the electronic edition read). Appendix A, Table A.1: the Dirichlet density Gamma(alpha_1 + ... + alpha_k) / (Gamma(alpha_1) ... Gamma(alpha_k)) times the product of theta_j to the power alpha_j minus 1, with theta_j non-negative and summing to one; parameters are prior sample sizes, alpha_j above zero and alpha_0 their sum; E(theta_j) = alpha_j / alpha_0, var(theta_j) = alpha_j (alpha_0 minus alpha_j) / (alpha_0 squared (alpha_0 + 1)) and cov(theta_i, theta_j) = minus alpha_i alpha_j / (alpha_0 squared (alpha_0 + 1)).
Briggs, Ades and Price on the Dirichlet for multi-branch probabilities
Briggs AH, Ades AE, Price MJ. Probabilistic sensitivity analysis for decision trees with multiple branches: use of the Dirichlet distribution in a Bayesian framework. Medical Decision Making. 2003;23(4):341-350. doi:10.1177/0272989X03255922 (abstract read). Abstract: the Dirichlet distribution, the multivariate equivalent of the beta distribution, is appropriate for giving probabilistic values to multiple branches while keeping them summing to one, illustrated by a fully probabilistic transition matrix for a Markov model.
NICE PMG36 on correlation between parameters in probabilistic analysis
National Institute for Health and Care Excellence. NICE technology appraisal and highly specialised technologies guidance: the manual (PMG36). London: NICE; published 31 January 2022, last updated 31 March 2026 (full text of chapter 4 read). Section 4.7.19: consider evidence about the extent of correlation between individual parameters and reflect this in the probabilistic analysis.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0