# Math Help - Sum of independent gamma samples

1. ## Sum of independent gamma samples ~Solved

Y has gamma distribution with parameters α, λ > 0.

pdf is f(y)= {(λ^α)(y^(α-1))(e^(-λy))}/Γ(α)

If Y1, Y2, ..., Yn are independent random samples from such a gamma distribution, show that their sum also has a gamma distribution and give the parameters.

I can find E(ΣYi) and Var(ΣYi) and this leads me to believe the parameters of ΣYi are nα, λ, but I don't understand how to write down a more thorough arguement than just my first guesses.

2. Originally Posted by Thomas154321
Y has gamma distribution with parameters α, λ > 0.

pdf is f(y)= {(λ^α)(y^(α-1))(e^(-λy))}/Γ(α)

If Y1, Y2, ..., Yn are independent random samples from such a gamma distribution, show that their sum also has a gamma distribution and give the parameters.

I can find E(ΣYi) and Var(ΣYi) and this leads me to believe the parameters of ΣYi are nα, λ, but I don't understand how to write down a more thorough arguement than just my first guesses.
By induction, it suffices to prove it for two random variables $X$ of parameters $(a,\lambda)$ and $Y$ of parameters $(b,\lambda)$.

The probability density function of the sum of two independent random variables (with densities) is the convolution of their density functions: in your case, this is:
$f_{X+Y}(z)=\int_0^z f_X(z-y)f_Y(y)dy = \int_0^z \lambda^a (z-y)^{a-1}e^{-\lambda (z-y)}\frac{1}{\Gamma(a)}\lambda^b y^{b-1}e^{-\lambda y}\frac{1}{\Gamma(b)}dy$.
There are a few simplifications, and you get:
$f_{X+Y}(z)=\frac{\lambda^{a+b}}{\Gamma(a)\Gamma(b) }e^{-\lambda z} \int_0^z (z-y)^{a-1} y^{b-1}dy$ $=\frac{\lambda^{a+b}}{\Gamma(a)\Gamma(b)}e^{-\lambda z}z^{a+b-1}\int_0^1 (1-u)^{a-1}u^{b-1}du$
(after the change of variable $y=zu$). Call the last integral $B(a,b)$. Then we have found that the density function of $X+Y$ is $\frac{\lambda^{a+b}B(a,b)}{\Gamma(a)\Gamma(b)}z^{a +b-1}e^{-\lambda z}$. This is a multiple of the density function of a Gamma distribution with parameters $(a+b,\lambda)$, and this is a density function, hence this is the density function of a Gamma distribution with parameters $(a+b,\lambda)$.
As a consequence this shows as well that $B(a,b)=\frac{\Gamma(a)\Gamma(b)}{\Gamma(a+b)}$, which you already knew, perhaps.

Why is the convolution involved? This is because, for every positive measurable function $f$, we have, using Fubini:
$E[f(X+Y)]=\int_0^\infty \left(\int_0^\infty f(x+y)f_Y(y)dy \right)f_X(x)dx$ $=\int_0^\infty \left(\int_x^\infty f(z)f_Y(z-x)dz\right)dx$ $=\int_0^\infty f(z)\left(\int_0^z f_X(x)f_Y(z-x)dx\right) dz=\int_0^\infty f(z)f_{X+Y}(z)dz$,
and because these integrals characterize the distribution of $X+Y$.

3. Fascinating! Really enjoyed reading that. But I haven't done anything on convolution yet... Do you think there is a way of deducing the distribution using Moment-Generating functions of Y, using that all Yi have the same gamma(α,λ) distribution?

4. Originally Posted by Thomas154321
Fascinating! Really enjoyed reading that. But I haven't done anything on convolution yet... Do you think there is a way of deducing the distribution using Moment-Generating functions of Y, using that all Yi have the same gamma(α,λ) distribution?
That's exactly what I was going to suggest:

1. Read this: PlanetMath: moment generating function of the sum of independent random variables

2. Now get the moment generating function of Y (find it at Gamma distribution - Wikipedia, the free encyclopedia)

3. Now put it all together and get the moment generating function of the sum.

4. Now recognise the result as being the moment generating function of a gamma distribution with the given parameters (note that when a moment generating function exists there is a unique distribution corresponding to that moment generating function).

Can you do these four things?

5. Yes thanks, all straight forward using that. Since each integral is identical, it is just the moment generating function of Y to the power n, and nα obviously pops out.

Cheers.