Dirichlet Distribution

Basic Concepts

The Dirichlet distribution is a generalization of the beta distribution in the same way as the multinomial distribution is a generalization of the binomial distribution. First, note that

Beta function

The multivariate version of the beta function for α = (α1, …, αk) where αi > 0 for each i, is

Multivariate beta function

The pdf of the beta distribution is

Beta distribution pdf

The pdf of the Dirichlet distribution at P = (p1, …, pk), where \sum_{i=1}^{k} {p_i} and pi > 0 for all i, is

Dirichlet distribution pdf

Properties

Figure 1 shows key properties of this distribution where γ = \sum_{i=1}^{k} {p_i} and μi = αi/γ for each i

Dirichlet properties

Figure 1 – Dirichlet distribution properties

Note too that the marginal distribution at pi is pi ∼ Bet(αi, 1–αi).

To draw a random vector (p1,…, pk) from the Dirichlet distribution, follow the following steps using the gamma distribution:

  1. For each i = 1, …, k, draw a random value ziGamma(αi, 1) using the formula =GAMMA.INV(RAND(), αi, 1)
  2. For each i, set pi = zi / \sum_{i=1}^{k} {z_i}

Worksheet Functions

Real Statistics Functions: The Real Statistics Resource Pack supports the following functions. Here, R1 is a row or column array containing non-negative pi values that sum up to 1 and R2 is a row or column array containing positive values.

DIRICHLET_DIST(R1, R2) = value of the pdf of the Dirichlet distribution at R1 using the alpha values in R2 where R1 and R2 have the same shape and size.

DIRICHLET_RAND(R2): array function that outputs a random row or column array from the Dirichlet distribution with alpha values in R2: the array that is output has the same size and shape as R2.

MBETA(R2) = multivariate version of the beta function on the alpha values in R2

References

Wikipedia (2020) Dirichlet distribution
https://en.wikipedia.org/wiki/Dirichlet_distribution

Frigyik, B. A., Kapila, A., Gupta, M. R. (2010) Introduction to the Dirichlet distribution and related processes
https://vannevar.ece.uw.edu/techsite/papers/refer/UWEETR-2010-0006.html

Leave a Comment