# gamma distribution

• Oct 30th 2008, 03:57 AM
math_lete
gamma distribution
If X is a gamma(2,lambda) distribution

lambda(^2)xe^(-lambda x) x >0
fX(x)=
0 otherwise

How do i obtain the mean and variance of X?
thanks.
• Oct 30th 2008, 04:18 AM
mr fantastic
Quote:

Originally Posted by math_lete
If X is a gamma(2,lambda) distribution

lambda(^2)xe^(-lambda x) x >0
fX(x)=
0 otherwise

How do i obtain the mean and variance of X?
thanks.

$f(x) = \lambda^2 \, x \, e^{-\lambda x}$ for x > 0 and zero elsewhere.

$E(X) = \lambda^2 \int_{0}^{+\infty} x^2 \, e^{-\lambda x} \, dx$.

$Var(X) = E(X^2) - [E(X)]^2$.

$E(X^2) = \lambda^2 \int_{0}^{+\infty} x^3 \, e^{-\lambda x} \, dx$.

The integrals can be evaluated by repeated application of integration by parts.
• Oct 30th 2008, 08:28 AM
Chris L T521
Quote:

Originally Posted by mr fantastic
$f(x) = \lambda^2 \, x \, e^{-\lambda x}$ for x > 0 and zero elsewhere.

$E(X) = \lambda^2 \int_{0}^{+\infty} x^2 \, e^{-\lambda x} \, dx$.

$Var(X) = E(X^2) - [E(X)]^2$.

$E(X^2) = \lambda^2 \int_{0}^{+\infty} x^3 \, e^{-\lambda x} \, dx$.

The integrals can be evaluated by repeated application of integration by parts.

Or by doing it in a way where integration by parts is not required ;)

I'll quickly do $E(X^2)$. A similar thing can be done with $E(X)$.

Let $u=\lambda x\implies x=\frac{u}{\lambda}$. Thus, $\,dx=\frac{\,du}{\lambda}$

The integral transforms into $\lambda^2\int_0^{\infty}\frac{1}{\lambda}\left(\fr ac{u}{\lambda}\right)^3e^{-u}\,du\implies\frac{1}{\lambda^2}\int_0^{\infty}u^ 3e^{-u}\,du$.

But note that $\int_0^{\infty}e^{-u}u^3\,du=\Gamma(4)$.

So we have $\frac{1}{\lambda^2}\int_0^{\infty}u^3e^{-u}\,du=\frac{\Gamma(4)}{\lambda^2}$.

Since $\Gamma(4)=3!=6$, we now see that $\color{red}\boxed{E(X^2)=\frac{6}{\lambda^2}}$

--Chris