# Exp-gamma probability density

I'm trying to compute the probability density of a random variable $\log(X)$, where $X \sim \textrm{Gamma}(k, \Theta)$, in Mathematica 11. One way to do this is by:

F[x_] = PDF[TransformedDistribution[Log[X], X \[Distributed] GammaDistribution[k, \[CapitalTheta]]], x]


The answer corresponds to what I can prove by hand:

$$\frac{\Theta ^{-k} e^{k x-\frac{e^x}{\Theta }}}{\Gamma (k)}$$

According to the documentation, "The exp-gamma distribution is mathematically defined to be the distribution that models Y==log(X) whenever X ~ GammaDistribution". Therefore, it seems I should get the same result with

G[x_] = PDF[ExpGammaDistribution[k, \[CapitalTheta], 0], x]


$$\frac{e^{\frac{k x}{\Theta }-e^{x/\Theta }}}{\Theta \Gamma (k)}$$

This is a different function, which can be seen by plotting:

Plot[{F[x], G[x]} /. {k -> 3, \[CapitalTheta] -> 2}, {x, 0, 5}]


What am I missing?

• The relation is shown in Properties & Relations in the documentation for ExpGammaDistribution – Simon Woods Feb 15 '17 at 13:49
• @Kaba would you consider expanding your comment into a self-answer? I think it could be beneficial for future reference. – MarcoB Feb 16 '17 at 4:43
• @MarcoB I added an answer. – kaba Feb 16 '17 at 10:11

Later in the documentation examples, it is seen that $\mathrm{ExpGamma}[k,\Theta]$ is the distribution of $\Theta \log(X)$, where $X \sim \mathrm{Gamma}[k, 1]$. The $\Theta$ in the $\mathrm{ExpGamma}$ distribution is not related to the $\Theta$ in the $\mathrm{Gamma}$ distribution.