I've been reading about the Dirichlet distribution and have become somewhat confused as to how to evaluate its normalisation term.
Specifically, I'm quite happy with the relationship between the beta and gamma functions:
$\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}=B(x,y)$, but wikipedia then claims that more generally: $\frac{\prod_{i}\Gamma(x_{i})}{\Gamma(\sum_{i}x_{i})}=B(x_{1},x_{2},\ldots, x_{n})$
Sticking with three variables for simplicity, how is $B(x_{1},x_{2},x_{3})$ defined?
Using the above relation for 2 parameters:
$\Gamma(x)\Gamma(y)=\Gamma(x+y)B(x,y)$, hence
$\Gamma(x)\Gamma(y)\Gamma(z)=\Gamma(x+y)B(x,y)\Gamma(z)$, which, with repeated application of the above becomes:
$\Gamma(x)\Gamma(y)\Gamma(z)=B(x,y)B(x+y,z)\Gamma(x+y+z)$
This suggests, using formula on wikipedia for three variables, that:
$B(x,y,z)=B(x,y)B(x+y,z)$
I wrote the RHS of this out and played about with some substitutions, but couldn't show it to equal what I would expect, which is something of the form:
$\int_{0}^{1}dq \cdot q^{x-1}\int_{0}^{1-q}dp \cdot p^{y-1}(1-p-q)^{z-1}$
I expected something of the above form, because it seems like that would normalise the Dirichlet distribution.
More generally, is there a nice trick for evaluating nested normalisation terms of the form:
$\int_{0}^{1}p_{1}^{\alpha _{1}}dp_{1}\int_{0}^{1-p_{1}}p_{2}^{\alpha _{2}}dp _{2}\int_{0}^{1-p_{1}-p_{2}}p_{3}^{\alpha_{3}}dp_{3}\ldots \int_{0}^{1-\sum _{i=1}^{n-2}p_{i}}p_{n-1}^{\alpha _{n-1}}dp_{n-1}(1-\sum _{i=1}^{n-1}p_{i})^{\alpha _{n}}$
I'm hoping that the way to solve this for n=3 generalises in some fairly simple way?
Or, alternatively, is the above integral not the correct normalisation term for an N variable Dirichlet Distribution?