# Matrix variate Dirichlet distribution

In statistics, the matrix variate Dirichlet distribution is a generalization of the matrix variate beta distribution and of the Dirichlet distribution.
Suppose $U_{1},\ldots ,U_{r}$ are $p\times p$ positive definite matrices with $I_{p}-\sum _{i=1}^{r}U_{i}$ also positive-definite, where $I_{p}$ is the $p\times p$ identity matrix. Then we say that the $U_{i}$ have a matrix variate Dirichlet distribution, $\left(U_{1},\ldots ,U_{r}\right)\sim D_{p}\left(a_{1},\ldots ,a_{r};a_{r+1}\right)$, if their joint probability density function is
    $\left\{\beta _{p}\left(a_{1},\ldots ,a_{r},a_{r+1}\right)\right\}^{-1}\prod _{i=1}^{r}\det \left(U_{i}\right)^{a_{i}-(p+1)/2}\det \left(I_{p}-\sum _{i=1}^{r}U_{i}\right)^{a_{r+1}-(p+1)/2}$
where $a_{i}>(p-1)/2,i=1,\ldots ,r+1$ and $\beta _{p}\left(\cdots \right)$ is the multivariate beta function.
If we write $U_{r+1}=I_{p}-\sum _{i=1}^{r}U_{i}$ then the PDF takes the simpler form
    $\left\{\beta _{p}\left(a_{1},\ldots ,a_{r+1}\right)\right\}^{-1}\prod _{i=1}^{r+1}\det \left(U_{i}\right)^{a_{i}-(p+1)/2},$
on the understanding that $\sum _{i=1}^{r+1}U_{i}=I_{p}$.

## Theorems
### generalization of chi square-Dirichlet result

Suppose $S_{i}\sim W_{p}\left(n_{i},\Sigma \right),i=1,\ldots ,r+1$ are independently distributed Wishart $p\times p$ positive definite matrices. Then, defining $U_{i}=S^{-1/2}S_{i}\left(S^{-1/2}\right)^{T}$ (where $S=\sum _{i=1}^{r+1}S_{i}$ is the sum of the matrices and $S^{1/2}\left(S^{-1/2}\right)^{T}$ is any reasonable factorization of $S$), we have
    $\left(U_{1},\ldots ,U_{r}\right)\sim D_{p}\left(n_{1}/2,...,n_{r+1}/2\right).$

### Marginal distribution

If $\left(U_{1},\ldots ,U_{r}\right)\sim D_{p}\left(a_{1},\ldots ,a_{r+1}\right)$, and if $s\leq r$, then:
    $\left(U_{1},\ldots ,U_{s}\right)\sim D_{p}\left(a_{1},\ldots ,a_{s},\sum _{i=s+1}^{r+1}a_{i}\right)$

### Conditional distribution

Also, with the same notation as above, the density of $\left(U_{s+1},\ldots ,U_{r}\right)\left|\left(U_{1},\ldots ,U_{s}\right)\right.$ is given by
    ${\frac {\prod _{i=s+1}^{r+1}\det \left(U_{i}\right)^{a_{i}-(p+1)/2}}{\beta _{p}\left(a_{s+1},\ldots ,a_{r+1}\right)\det \left(I_{p}-\sum _{i=1}^{s}U_{i}\right)^{\sum _{i=s+1}^{r+1}a_{i}-(p+1)/2}}}$
where we write $U_{r+1}=I_{p}-\sum _{i=1}^{r}U_{i}$.

### partitioned distribution

Suppose $\left(U_{1},\ldots ,U_{r}\right)\sim D_{p}\left(a_{1},\ldots ,a_{r+1}\right)$ and suppose that $S_{1},\ldots ,S_{t}$ is a partition of $\left[r+1\right]=\left\{1,\ldots r+1\right\}$ (that is, $\cup _{i=1}^{t}S_{i}=\left[r+1\right]$ and $S_{i}\cap S_{j}=\emptyset$ if $i\neq j$). Then, writing $U_{(j)}=\sum _{i\in S_{j}}U_{i}$ and $a_{(j)}=\sum _{i\in S_{j}}a_{i}$ (with $U_{r+1}=I_{p}-\sum _{i=1}^{r}U_{r}$), we have:
    $\left(U_{(1)},\ldots U_{(t)}\right)\sim D_{p}\left(a_{(1)},\ldots ,a_{(t)}\right).$

### partitions

Suppose $\left(U_{1},\ldots ,U_{r}\right)\sim D_{p}\left(a_{1},\ldots ,a_{r+1}\right)$. Define
    $U_{i}=\left({\begin{array}{rr}U_{11(i)}&U_{12(i)}\\U_{21(i)}&U_{22(i)}\end{array}}\right)\qquad i=1,\ldots ,r$
where $U_{11(i)}$ is $p_{1}\times p_{1}$ and $U_{22(i)}$ is $p_{2}\times p_{2}$. Writing the Schur complement $U_{22\cdot 1(i)}=U_{21(i)}U_{11(i)}^{-1}U_{12(i)}$ we have
    $\left(U_{11(1)},\ldots ,U_{11(r)}\right)\sim D_{p_{1}}\left(a_{1},\ldots ,a_{r+1}\right)$
and
    $\left(U_{22.1(1)},\ldots ,U_{22.1(r)}\right)\sim D_{p_{2}}\left(a_{1}-p_{1}/2,\ldots ,a_{r}-p_{1}/2,a_{r+1}-p_{1}/2+p_{1}r/2\right).$