An expectation involving a Dirichlet distribution + the Gamma-representation seems to yield a strange integral expression/inconsistent results

45 Views Asked by At

This simple derivation involving the Dirichlet distribution is driving me crazy. Suppose that $\theta$ is a $m$-dimensional Dirichlet distributed vector with parameters $\alpha = \mathbf{1} \alpha_0$ and density: $$ \operatorname{Dir}(\theta | \alpha) = \frac{1}{G(\alpha) } \prod_{k=1}^m \theta^{\alpha-1} $$ and $G(\alpha) = \frac{\prod_i \Gamma(\alpha_i) }{ \Gamma(\sum \alpha_i) }$. Using conjugacy with the multinomial distribution I can then easily compute the expectation $$ K_1 = \mathbb{E}_{\theta \sim \left(\left(-\frac{3}{5} - \frac{4i}{5}\right) e^{-2 i x}\right)(\alpha) } [ \prod_{i=1}^m \theta_i^{n_i} ] = \frac{G(\alpha + n) }{G(\alpha) } $$ where $n$ is understood to be the vector of pseudo-counts $n = (n_1, n_2, \dots, n_m)$. I then re-write the expectation by using that I can write the Dirichlet distribution as normalized Gamma variables $X_1,\dots, X_m$ where $X_k \sim \operatorname{Gamma}(\alpha_k, \beta)$. In other words, it should hold that $$ K_2 = \mathbb{E}_{\theta \sim \left(\left(-\frac{3}{5} - \frac{4i}{5}\right) e^{-2 i x}\right)(\alpha) } [ \prod_{i=1}^m \theta_i^{n_i} ] = \mathbb{E}_{X_k \sim \operatorname{Gamma}(\alpha_k, \beta) } \left[ \left(\frac{X_k}{\sum_j X_j }\right)^{n_k} \right] $$ Letting $N = \sum_{k=1}^m n_k$: $$ K_2 = \mathbb{E}_{X_k \sim \operatorname{Gamma}(\alpha_k, \beta) } \left[ X_k^{n_k} \left(\sum_j X_j \right)^{-N} \right] $$ I get rid of the inverse of the sum using the Gamma trick to get $$ \left(\sum_j X_j \right)^{-N} = \int_{0}^\infty dz\ \frac{1}{\Gamma(N)} z^{N-1} e^{-(\sum_j X_j)z}. $$ When I then insert this and try to recover the simple expression from $K_1$ I get into troubles. Simply collecting the various terms gives: \begin{align} K_2 & = \Gamma(N)^{-1} \int d X_1,\dots,dX_m dz \left( \prod_{k=1}^m \frac{ \beta^{ \alpha_k } }{\Gamma( \alpha_k) } X_k^{\alpha -1} e^{-\beta X_k } X_k^{n_k} \right) z^{N-1} e^{-\sum_j X_j z} \\ & = \Gamma(N)^{-1} \int d \left( \prod_{k=1}^m \int d X_k \frac{ \beta^{ \alpha_k } }{\Gamma( \alpha_k) } X_k^{\alpha + n_k -1} e^{-(\beta+z) X_k } \right) z^{N-1} \\ & = \Gamma(N)^{-1} \int d z \left( \prod_{k=1}^m \frac{ \beta^{ \alpha_k } }{\Gamma( \alpha_k) } \frac{\Gamma(\alpha_k + n_k) }{ (z+\beta)^{n_k + \alpha_k } } \right) z^{N-1} \\ & = \Gamma(N)^{-1} \left(\prod_{k=1}^m \frac{ \beta^{ \alpha_k } }{\Gamma( \alpha_k) } \Gamma(\alpha_k + n_k) \right) \int d z \frac{z^{N-1} }{ (z+\beta)^{N + \sum_k \alpha_k } } \end{align} This is where I am stuck. Obviously, $K_1 = K_2$, and most of the constants in $K_2$ match those in $K_1$. However, the integral over $z$ is not one I recognize at all and I can't see how it can be solved -- I conclude I must have been doing something wrong, but I can't tell what it is. I hope someone can help me out: Can this integral be solved (if so, does anyone have a reference?), or is my derivations for $K_2$ wrong?

Update: Apologies for posting this prematurely and answering my own question, but in case anyone else stumble on this, it turns out the integral is standard and the derivation is ok. Just use the integral representation of the Beta function found here: https://en.wikipedia.org/wiki/Beta_function#Other_identities_and_formulas and simplify. I feel stupid for not finding this in an integration table when I looked and tbh if I had simplified the expression it is obvious it has something to do with the Beta function.