Wikipedia says the pdf for the gamma function is:

\[ X \sim \operatorname{Gamma}(\alpha,\beta) \implies \Pr(X=x) \propto x^{\alpha-1}e^{-\beta x} \]

If $Y = 1/X$, then

\[ \Pr(Y=y) = \Pr(X=1/y) \propto (1\mathbin/y)^{\alpha-1}e^{-\beta/y} = y^{-(\alpha-1)}e^{-\beta\mathbin/y} = y^{-\alpha+1}e^{-\beta\mathbin/y} \]

However, wikipedia says of the inverse gamma distribution that

\[ \Pr(Y=y) \propto y^{-\alpha\mathbf{-1}}e^{-\beta/y} \]

Eg, -1, not +1.

Is this just a parameterization difference, or a mistake in wikipedia, or a mistake in my derivation?


2 Answers 2


You have made a mistake assuming that you can derive the pdf of $1/X$ the way you would do it for the discrete case. But remember this is the continuous case so solving for the variable and substituting back is not enough. You still have to multiplty by the Jacobian. And also some people might take issue with the equality sign within the probability as in the continuous setting the probability of any value is zero. But you can say something like

$$P\left( y<Y <y +\Delta y\right) = f_Y(y)$$

for sufficiently small $\Delta y$.

  • 2
    $\begingroup$ Ah, of course. Should have been obvious had I started with $\Pr(Y \le y) = \Pr(X \ge 1\mathbin/y)$. $\endgroup$
    – alecbz
    Commented Dec 28, 2015 at 23:36

To obtain the density for a transformed continuous random variable, you need to take account of the rate of change of the original random variable with respect to the new random variable. Since $y = 1/x$ we also have $x = 1/y$ so the absolute value of the Jacobian of the transformation is:

$$\Bigg| \frac{dx}{dy} (y) \Bigg| = \Bigg| \frac{d}{dy} \frac{1}{y} \Bigg| = \Bigg| - \frac{1}{y^2} \Bigg| = \frac{1}{y^2}.$$

Thus, using the rules densities of transformed random variables you should then have:

$$\begin{aligned} p_Y(y) &= p_X(1/y) \cdot \Bigg| \frac{dx}{dy} (y) \Bigg| \\[6pt] &\propto (1/y)^{\alpha-1} e^{-\beta /y} \cdot \frac{1}{y^2} \\[6pt] &= y^{-\alpha+1} e^{-\beta /y} \cdot y^{-2} \\[6pt] &= y^{-\alpha-1} e^{-\beta /y} \\[6pt] &\propto \text{InvGamma}(y|\alpha, \beta). \\[6pt] \end{aligned}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.