# Prior Distribution in Bioinformatics

Multinominal distribution on $[0,\ldots,n-1]$ whose probability of $i$ is $p_i$. The logarithm of probability distribution can be written as:
$\begin{eqnarray} \log p(x) &=& \log \left( \sum_{i=0}^{n-1} \delta(i,x) p_x \right)\\ &=& \sum_{i=0}^{n-1} \delta(i,x) \log p_x\\ &=& \left(1 -\sum_{i=1}^{n-1}\delta(i,x)\right)\log p_0 +\sum_{i=1}^{n-1} \delta(i,x) \log p_x\\ &=& \sum_{i=1}^{n-1} \delta(i,x) \log \frac{p_i}{p_0} + \log p_0 \end{eqnarray}$
Therefore, by defining
$\phi(x) = \delta(i,x),\\ \theta_i = \log \frac{p_i}{p_0},\\ \psi(\theta) = -\log p_0 = \log \left[1+\sum_{i=1}^{n-1}\exp(\theta_i) \right].$
the distribution is of exponentail family:
$p(x) = \exp \{ \theta \cdot \phi(x) – \psi(\theta) \}$