# Mean of gamma distribution.

So I was trying to prove the mean result of gamma distribution which is $\frac{\alpha}{\lambda}$.

My attempt,

$E(X)=\int_{0}^{\infty }x f(x)dx$

$=\int_{0}^{\infty } \frac{\lambda^{\alpha}}{\Gamma (\alpha)}x^{\alpha}e^{-\lambda x}dx$

After integrating it, I got the result $$\frac{\lambda^{\alpha}}{\Gamma (\alpha)} \cdot\frac{\alpha}{\lambda}(\int_{0}^{\infty } x^{\alpha-1}e^{-\lambda x}dx)$$. I'm stuck here. Could anyone continue it for me and explain? Thanks a lot.

• Use the substitution $\lambda x=t$ Then the definition of the Gamma function. – Zaid Alyafeai Mar 16 '17 at 12:23
• Note that $$\Gamma (\alpha)=\int ^\infty_0 e^{-t} t^{\alpha-1} dt$$ – Zaid Alyafeai Mar 16 '17 at 12:26
• So I got $\frac{\lambda^{\alpha}}{\Gamma (\alpha)}*\frac{\Gamma(\alpha +1)}{\alpha+1}$ How should I continue? – Mathxx Mar 16 '17 at 12:31
• I think Harry's answer should clear your doubts. – Zaid Alyafeai Mar 16 '17 at 12:38
• Very similar to this post. – EditPiAf Mar 20 '17 at 22:58

Let us consider a random variable with Gamma distribution $X\sim \text{Gamma}(\alpha,\lambda)$. Its expected value is $$E(X) = \frac{\lambda^\alpha}{\Gamma(\alpha)} \int_0^\infty x^{\alpha} \, e^{-\lambda x} \, dx \, .$$ Making the change of variable $y=\lambda x$ in the integral, one has \begin{aligned} E(X) &= \frac{\lambda^\alpha}{\Gamma(\alpha)} \int_0^\infty \left(\frac{y}{\lambda}\right)^{\alpha} \, e^{-y} \, \frac{dy}{\lambda} \\ &= \frac{1}{\lambda\Gamma(\alpha)} \int_0^\infty y^{\alpha} \, e^{-y} \, dy\\ &= \frac{\Gamma(\alpha+1)}{\lambda\Gamma(\alpha)} \, . \end{aligned} Due to the relationship $\Gamma(\alpha+1) = \alpha\Gamma(\alpha)$, one obtains $E(X) = \alpha/\lambda$.
• Am I correct in assuming that when you set $y=\lambda x$ that you implicitly set $dy=\lambda dx$ which means that $dx=dy / \lambda$? – Frank Shmrank Mar 20 '18 at 3:53