Skip to main content
edited title
Link

Why is mythis derivation of the mean of the gamma distribution using the log-partition function incorrect?

Became Hot Network Question
added 8 characters in body
Source Link

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}) $$ HoweverFurther calculating, the "mean vector" can be found to be : $$ \boldsymbol{\mu} = \begin{bmatrix}\psi(\alpha) - \ln(\beta) \\ \alpha / \beta \end{bmatrix} $$ Where $\psi$ is the digamma function.

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(\alpha) - \ln(\beta) \\ \alpha / \beta \end{bmatrix} $$ Where $\psi$ is the digamma function.
Can anyone point out what exactly am I doing wrong here?

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(\alpha) - \ln(\beta) \\ \alpha / \beta \end{bmatrix} $$ Where $\psi$ is the digamma function.
Can anyone point out what exactly am I doing wrong here?

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}) $$ Further calculating, the "mean vector" can be found to be : $$ \boldsymbol{\mu} = \begin{bmatrix}\psi(\alpha) - \ln(\beta) \\ \alpha / \beta \end{bmatrix} $$ Where $\psi$ is the digamma function.

However, this implies that the mean of the gamma distribution will be a two dimensional vector which is blatantly not the case!
Can anyone point out what exactly am I doing wrong here?

deleted 12 characters in body
Source Link

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} $$$$ \boldsymbol{\mu} = \begin{bmatrix}\psi(\alpha) - \ln(\beta) \\ \alpha / \beta \end{bmatrix} $$ Where $\psi$ is the digamma function.
Can anyone point out what exactly am I doing wrong here?

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?

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(\alpha) - \ln(\beta) \\ \alpha / \beta \end{bmatrix} $$ Where $\psi$ is the digamma function.
Can anyone point out what exactly am I doing wrong here?

Source Link
Loading