# 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.

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

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

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

$\displaystyle 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
$\displaystyle f(x) = \lambda^2 \, x \, e^{-\lambda x}$ for x > 0 and zero elsewhere.

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

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

$\displaystyle 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 $\displaystyle E(X^2)$. A similar thing can be done with $\displaystyle E(X)$.

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

The integral transforms into $\displaystyle \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 $\displaystyle \int_0^{\infty}e^{-u}u^3\,du=\Gamma(4)$.

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

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

--Chris