# 狄利克雷分布

参数 概率密度函數 ${\displaystyle K\geq 2}$ 分类数 (整数)${\displaystyle \alpha _{1},\ldots ,\alpha _{K}}$ concentration parameters，${\displaystyle \alpha _{i}>0}$ ${\displaystyle x_{1},\ldots ,x_{K}}$，${\displaystyle x_{i}\in (0,1)}$，${\displaystyle \sum _{i=1}^{K}x_{i}=1}$ ${\displaystyle {\frac {1}{\mathrm {B} ({\boldsymbol {\alpha }})}}\prod _{i=1}^{K}x_{i}^{\alpha _{i}-1}}$${\displaystyle \mathrm {B} ({\boldsymbol {\alpha }})={\frac {\prod _{i=1}^{K}\Gamma (\alpha _{i})}{\Gamma {\bigl (}\sum _{i=1}^{K}\alpha _{i}{\bigr )}}}}$ ${\displaystyle {\boldsymbol {\alpha }}=(\alpha _{1},\ldots ,\alpha _{K})}$ ${\displaystyle \operatorname {E} [X_{i}]={\frac {\alpha _{i}}{\sum _{k}\alpha _{k}}}}$${\displaystyle \operatorname {E} [\ln X_{i}]=\psi (\alpha _{i})-\psi (\textstyle \sum _{k}\alpha _{k})}$(试看 digamma function) ${\displaystyle x_{i}={\frac {\alpha _{i}-1}{\sum _{k=1}^{K}\alpha _{k}-K}},\quad \alpha _{i}>1.}$ ${\displaystyle \operatorname {Var} [X_{i}]={\frac {{\tilde {\alpha }}_{i}(1-{\tilde {\alpha }}_{i})}{{\bar {\alpha }}+1}},}$ 其中${\displaystyle {\tilde {\alpha }}_{i}={\frac {\alpha _{i}}{\sum _{i=1}^{K}\alpha _{i}}}}$ 而且${\displaystyle {\bar {\alpha }}=\sum _{i=1}^{K}\alpha _{i}}$${\displaystyle \operatorname {Cov} [X_{i},X_{j}]={\frac {-{\tilde {\alpha }}_{i}{\tilde {\alpha }}_{j}}{{\bar {\alpha }}+1}}~~(i\neq j)}$ ${\displaystyle H(X)=\log \mathrm {B} (\alpha )+(\alpha _{0}-K)\psi (\alpha _{0})-\sum _{j=1}^{K}(\alpha _{j}-1)\psi (\alpha _{j})}$

## 概率密度函数

${\displaystyle f(x_{1},\dots ,x_{K};\alpha _{1},\dots ,\alpha _{K})={\frac {1}{\mathrm {B} (\alpha )}}\prod _{i=1}^{K}x_{i}^{\alpha _{i}-1}}$

${\displaystyle \mathrm {B} (\alpha )={\frac {\prod _{i=1}^{K}\Gamma (\alpha _{i})}{\Gamma {\bigl (}\sum _{i=1}^{K}\alpha _{i}{\bigr )}}},\qquad \alpha =(\alpha _{1},\dots ,\alpha _{K}).}$