I am using this formulation of the exponential family :
$$
\large f_{X}(x;\boldsymbol{\eta})=h(x) \exp \left(\boldsymbol{\eta} \cdot \mathbf{T}(x)-A(\boldsymbol{\eta})\right)
$$
The gamma distribution is given as :
$$
\large f _{X}(x\,;\alpha, \beta) = \frac{{\beta^{\alpha} x ^{\alpha - 1}\exp(-\beta x)}}{\Gamma(\alpha)}
$$
Doing some algebraic manipulations on this PDF, we can show that :
$$
\boldsymbol{\eta} = \begin{bmatrix} \eta _{1} \\ \eta _{2} \end{bmatrix} = \begin{bmatrix} \alpha - 1 \\ -\beta \end{bmatrix}
$$
Similarly for the log partition function :
$$
A(\boldsymbol{\eta}) = \ln(\Gamma(\eta _{1} + 1)) - (\eta _{1} + 1)\ln(-\eta _{2})
$$
Now the mean of the distribution should be calculated as follows :
$$
\boldsymbol{\mu} = \nabla _{\boldsymbol{\eta}} A(\boldsymbol{\eta})
$$
However, this implies that the mean of the gamma distribution will be a two dimensional vector which is blatantly not the case!
Further calculating, I find the "mean vector" to be :
$$
\boldsymbol{\mu} = \begin{bmatrix}\psi(\eta _{1} + 1) - \ln(-\eta _{2}) \\ \alpha / \beta \end{bmatrix}
$$
Where $\psi$ is the digamma function.
Can anyone point out what exactly am I doing wrong here?
Why is my derivation of the mean of the gamma distribution using the log-partition function incorrect?
Sagnik Taraphdar
- 115
- 6