# The expected value of log Gamma function

Suppose $$X$$ is exponentially distributed with the rate parameter $$\lambda$$. If we have the expected value of $$\log X$$ as $$$$\langle \log X\rangle=-\gamma-\log\lambda$$$$ where $$\gamma$$ is the Euler–Mascheroni constant.

Now I am wondering how I can compute a lower bound for $$X\log X-\log \Gamma(X)$$ since this is a concave function?

I originally wanted to compute the following integral $$$$\langle \log \Gamma(X)\rangle=-\exp(-\lambda X)\log\Gamma(X)+\int \psi(X)\exp(-\lambda X)\mathrm{d}X$$$$ where $$\psi(X)= \frac{\mathrm{d}}{\mathrm{d}X}\log \Gamma(X)$$. I came across this paper which they are tackling more and less the same problem as mine and they suggested this bound: $$$$\label{eq:lb} \begin{split} x\log x-\log\Gamma(x)&\ge x^*\log x^*-x^*-\log x^*-\log\Gamma(x^*)\\ &+\Big(\log x^*-\frac{1}{x^*}-\psi(x^*)\Big)(x-x^*)+\log x+x \end{split}$$$$ It seems it works just for small $$x^*$$. I wonder whether there is a tighter bound or not? Any suggestion would be appreciate?

• I wouldn't expect Stirling's asymptotic series to be a good approximation because it's poor for small values of $X.$ That will make it especially bad for large $\lambda,$ which concentrate most of the probability around small $X.$ You could, however, break the original integral into several pieces using the relation $\Gamma(z) = \Gamma(z+k)/(z(z+1)\cdots(z+k-1))$ for positive integers $k$ and approximating $\Gamma(z+k)$ with Stirling's expansion. This could be extremely accurate.
– whuber
May 4 '21 at 16:15
• I took a closer look at that suggestion, hoping that perhaps a partial fractions expansion of $1/(z\cdots(z+k-1))$ might produce integrals one could evaluate. No such luck. Note that you can view this question as asking for the Laplace transform of $\log\Gamma$ (as defined on the positive reals), but no such transform is known. I think you will need to settle for approximations. Their form might vary depending on the magnitude of $\lambda.$
– whuber
May 5 '21 at 14:37
• @whuber I need to compute this term because I have a mixture of Gamma distribution model and I am using variational method for the inference and I must find a good approximation of this $\langle\alpha\rangle\big(\langle\log\alpha\rangle-\langle\log\beta\rangle\big)-\langle\log\Gamma(\alpha)\rangle-(\langle\alpha\rangle-1)\langle\log X\rangle-\langle\frac{\alpha}{\beta}\rangle\langle X\rangle$ where $\alpha$ based on similar model that I worked with, would vary between 0.1 to 2 or something. Do you think the approximation that I suggested would be sufficient for this range? May 5 '21 at 15:38
• The Stirling series is a poor approximation in that range. Why not use numerical integration?
– whuber
May 5 '21 at 18:14
• Is the question about approximating the distribution of $Y := g(X)$ when $g(x) := \log \Gamma(x) - x \log x$ and $X$ is exponential with rate $\lambda$ or simply approximating the expectation of $Y$? Is a numerical approximation wanted, or closed form inequalities? Anyway, approximation of $\log \Gamma(x)$ for large $x$ works pretty well for say $x >3$. For small $x$ another simple approximation can be used as well.
– Yves
May 25 '21 at 6:38