Expected Entropy Based on Dirichlet Distribution

So as it turns out, the general closed-form solution is

$$\text{Exp}(H(P))=H_A-\frac{1}{A}\sum _{i=1}^m \alpha _i H_{\alpha _i}$$

Where $m$ is the number of different states, $H(P)$ is the entropy of probability distribution $P$ where each state $s_i$ occors with probability $p_i$, the $\alpha _i$ are the distribution parameters of the dirichlet distribution $P$ is drawn from, and $A=\sum_{i=1}^m \alpha _i$. Each $\alpha_i = k_i+1$.

I believe the derivation is obvious.

JK the derivation isn't obvious. I found a closed-form solution when $n=2$, when $n=3$, and when $n=4$, and then I fiddled with those until I came up with a general formula that looks elegant (see above), and then tested the formula against a monte-carlo estimation of the expected value. It works but I can't prove it.


Here is a formal proof for general Dirichlet distributions $(\alpha_1, \dots, \alpha_m)$. I use capital $P_i$ to indicate that we are working with random variables.

$$-E(\sum_i P_i \log P_i)=-\sum_i E(P_i \log P_i)$$ then $P_i \sim Beta (\alpha_i, A -\alpha_i)$ and working with the normalizing constant you can write

$$ -E_{\alpha_i, A-\alpha_i}(P_i \log P_i)= \frac{\alpha_i}{A}E_{\alpha_i+1, A-\alpha_i}(\log P_i) = \frac{\alpha_i}{A} [\psi_0 (A+1)-\psi_0(\alpha_i+1)] $$

where the last step arises by a known result (see Wikipedia page on Beta distributions): if $X \sim Beta(\alpha, \beta)$ then $-E(\log P_i)= \psi_0(\alpha+\beta)-\psi_0(\alpha)$.

Summing over $i$ provides your general formula.