Generalized Dirichlet distribution

From HandWiki

In statistics, the generalized Dirichlet distribution (GD) is a generalization of the Dirichlet distribution with a more general covariance structure and almost twice the number of parameters. Random vectors with a GD distribution are completely neutral.[1] The density function of [math]\displaystyle{ p_1,\ldots,p_{k-1} }[/math] is

[math]\displaystyle{ \left[ \prod_{i=1}^{k-1}B(a_i,b_i)\right]^{-1} p_k^{b_{k-1}-1} \prod_{i=1}^{k-1}\left[ p_i^{a_i-1}\left(\sum_{j=i}^kp_j\right)^{b_{i-1}-(a_i+b_i)}\right] }[/math]

where we define [math]\displaystyle{ p_k= 1- \sum_{i=1}^{k-1}p_i }[/math]. Here [math]\displaystyle{ B(x,y) }[/math] denotes the Beta function. This reduces to the standard Dirichlet distribution if [math]\displaystyle{ b_{i-1}=a_i+b_i }[/math] for [math]\displaystyle{ 2\leqslant i\leqslant k-1 }[/math] ([math]\displaystyle{ b_0 }[/math] is arbitrary).

For example, if k=4, then the density function of [math]\displaystyle{ p_1,p_2,p_3 }[/math] is

[math]\displaystyle{ \left[\prod_{i=1}^{3}B(a_i,b_i)\right]^{-1} p_1^{a_1-1}p_2^{a_2-1}p_3^{a_3-1}p_4^{b_3-1}\left(p_2+p_3+p_4\right)^{b_1-\left(a_2+b_2\right)}\left(p_3+p_4\right)^{b_2-\left(a_3+b_3\right)} }[/math]

where [math]\displaystyle{ p_1+p_2+p_3\lt 1 }[/math] and [math]\displaystyle{ p_4=1-p_1-p_2-p_3 }[/math].

Connor and Mosimann define the PDF as they did for the following reason. Define random variables [math]\displaystyle{ z_1,\ldots,z_{k-1} }[/math] with [math]\displaystyle{ z_1=p_1, z_2=p_2/\left(1-p_1\right), z_3=p_3/\left(1-(p_1+p_2)\right),\ldots,z_i = p_i/\left(1-\left(p_1+\cdots+p_{i-1}\right)\right) }[/math]. Then [math]\displaystyle{ p_1,\ldots,p_k }[/math] have the generalized Dirichlet distribution as parametrized above, if the [math]\displaystyle{ z_i }[/math] are independent beta with parameters [math]\displaystyle{ a_i,b_i }[/math], [math]\displaystyle{ i=1,\ldots,k-1 }[/math].

Alternative form given by Wong

Wong[2] gives the slightly more concise form for [math]\displaystyle{ x_1+\cdots +x_k \leq 1 }[/math]

[math]\displaystyle{ \prod_{i=1}^k\frac{x_i^{\alpha_i-1}\left(1-x_1-\cdots-x_i\right)^{\gamma_i}}{B(\alpha_i,\beta_i)} }[/math]

where [math]\displaystyle{ \gamma_j=\beta_j-\alpha_{j+1}-\beta_{j+1} }[/math] for [math]\displaystyle{ 1 \leq j \leq k-1 }[/math] and [math]\displaystyle{ \gamma_k=\beta_k-1 }[/math]. Note that Wong defines a distribution over a [math]\displaystyle{ k }[/math] dimensional space (implicitly defining [math]\displaystyle{ x_{k+1} = 1 - \sum_{i=1}^k x_i }[/math]) while Connor and Mosiman use a [math]\displaystyle{ k-1 }[/math] dimensional space with [math]\displaystyle{ x_k = 1 - \sum_{i=1}^{k-1} x_i }[/math].

General moment function

If [math]\displaystyle{ X=\left(X_1,\ldots,X_k\right)\sim GD_k\left(\alpha_1,\ldots,\alpha_k;\beta_1,\ldots,\beta_k\right) }[/math], then

[math]\displaystyle{ E\left[X_1^{r_1}X_2^{r_2}\cdots X_k^{r_k}\right]= \prod_{j=1}^k \frac{ \Gamma\left(\alpha_j+\beta_j\right) \Gamma\left(\alpha_j+r_j\right) \Gamma\left(\beta_j+\delta_j\right) }{ \Gamma\left(\alpha_j\right) \Gamma\left(\beta_j\right) \Gamma\left(\alpha_j+\beta_j+r_j+\delta_j\right) } }[/math]

where [math]\displaystyle{ \delta_j=r_{j+1}+r_{j+2}+\cdots +r_k }[/math] for [math]\displaystyle{ j=1,2,\cdots,k-1 }[/math] and [math]\displaystyle{ \delta_k=0 }[/math]. Thus

[math]\displaystyle{ E\left(X_j\right)=\frac{\alpha_j}{\alpha_j+\beta_j}\prod_{m=1}^{j-1}\frac{\beta_m}{\alpha_m+\beta_m}. }[/math]

Reduction to standard Dirichlet distribution

As stated above, if [math]\displaystyle{ b_{i-1}=a_i+b_i }[/math] for [math]\displaystyle{ 2 \leq i \leq k }[/math] then the distribution reduces to a standard Dirichlet. This condition is different from the usual case, in which setting the additional parameters of the generalized distribution to zero results in the original distribution. However, in the case of the GDD, this results in a very complicated density function.

Bayesian analysis

Suppose [math]\displaystyle{ X=\left(X_1,\ldots,X_k\right)\sim GD_k\left(\alpha_1,\ldots,\alpha_k;\beta_1,\ldots,\beta_k\right) }[/math] is generalized Dirichlet, and that [math]\displaystyle{ Y\mid X }[/math] is multinomial with [math]\displaystyle{ n }[/math] trials (here [math]\displaystyle{ Y=\left(Y_1,\ldots,Y_k\right) }[/math]). Writing [math]\displaystyle{ Y_j=y_j }[/math] for [math]\displaystyle{ 1 \leq j \leq k }[/math] and [math]\displaystyle{ y_{k+1}=n-\sum_{i=1}^ky_i }[/math] the joint posterior of [math]\displaystyle{ X|Y }[/math] is a generalized Dirichlet distribution with

[math]\displaystyle{ X\mid Y\sim GD_k\left( {\alpha'}_1,\ldots,{\alpha'}_k; {\beta'}_1,\ldots,{\beta'}_k \right) }[/math]

where [math]\displaystyle{ {\alpha'}_j=\alpha_j+y_j }[/math] and [math]\displaystyle{ {\beta'}_j=\beta_j+\sum_{i=j+1}^{k+1}y_i }[/math] for [math]\displaystyle{ 1\leqslant j\leqslant k. }[/math]

Sampling experiment

Wong gives the following system as an example of how the Dirichlet and generalized Dirichlet distributions differ. He posits that a large urn contains balls of [math]\displaystyle{ k+1 }[/math] different colours. The proportion of each colour is unknown. Write [math]\displaystyle{ X=(X_1,\ldots,X_k) }[/math] for the proportion of the balls with colour [math]\displaystyle{ j }[/math] in the urn.

Experiment 1. Analyst 1 believes that [math]\displaystyle{ X\sim D(\alpha_1,\ldots,\alpha_k,\alpha_{k+1}) }[/math] (ie, [math]\displaystyle{ X }[/math] is Dirichlet with parameters [math]\displaystyle{ \alpha_i }[/math]). The analyst then makes [math]\displaystyle{ k+1 }[/math] glass boxes and puts [math]\displaystyle{ \alpha_i }[/math] marbles of colour [math]\displaystyle{ i }[/math] in box [math]\displaystyle{ i }[/math] (it is assumed that the [math]\displaystyle{ \alpha_i }[/math] are integers [math]\displaystyle{ \geq 1 }[/math]). Then analyst 1 draws a ball from the urn, observes its colour (say colour [math]\displaystyle{ j }[/math]) and puts it in box [math]\displaystyle{ j }[/math]. He can identify the correct box because they are transparent and the colours of the marbles within are visible. The process continues until [math]\displaystyle{ n }[/math] balls have been drawn. The posterior distribution is then Dirichlet with parameters being the number of marbles in each box.

Experiment 2. Analyst 2 believes that [math]\displaystyle{ X }[/math] follows a generalized Dirichlet distribution: [math]\displaystyle{ X\sim GD(\alpha_1,\ldots,\alpha_k;\beta_1,\ldots,\beta_k) }[/math]. All parameters are again assumed to be positive integers. The analyst makes [math]\displaystyle{ k+1 }[/math] wooden boxes. The boxes have two areas: one for balls and one for marbles. The balls are coloured but the marbles are not coloured. Then for [math]\displaystyle{ j=1,\ldots,k }[/math], he puts [math]\displaystyle{ \alpha_j }[/math] balls of colour [math]\displaystyle{ j }[/math], and [math]\displaystyle{ \beta_j }[/math] marbles, in to box [math]\displaystyle{ j }[/math]. He then puts a ball of colour [math]\displaystyle{ k+1 }[/math] in box [math]\displaystyle{ k+1 }[/math]. The analyst then draws a ball from the urn. Because the boxes are wood, the analyst cannot tell which box to put the ball in (as he could in experiment 1 above); he also has a poor memory and cannot remember which box contains which colour balls. He has to discover which box is the correct one to put the ball in. He does this by opening box 1 and comparing the balls in it to the drawn ball. If the colours differ, the box is the wrong one. The analyst places a marble in box 1 and proceeds to box 2. He repeats the process until the balls in the box match the drawn ball, at which point he places the ball in the box with the other balls of matching colour. The analyst then draws another ball from the urn and repeats until [math]\displaystyle{ n }[/math] balls are drawn. The posterior is then generalized Dirichlet with parameters [math]\displaystyle{ \alpha }[/math] being the number of balls, and [math]\displaystyle{ \beta }[/math] the number of marbles, in each box.

Note that in experiment 2, changing the order of the boxes has a non-trivial effect, unlike experiment 1.

See also


  1. R. J. Connor and J. E. Mosiman 1969. Concepts of independence for proportions with a generalization of the Dirichlet distribution. Journal of the American Statistical Association, volume 64, pp. 194–206
  2. T.-T. Wong 1998. Generalized Dirichlet distribution in Bayesian analysis. Applied Mathematics and Computation, volume 97, pp. 165–181