The Warwick Mathematics Society Website

User login

Upcoming events

  • No upcoming events available

There are 553 members of the Warwick Mathematics Society, of which 0 are new today!
We're 110% of the way toward our target of 500 members.
You can join up on the UWSU website.

Who's new

  • ccocoo
  • xiaoxiao0522
  • vadim
  • jamesowen
  • ghost

Computing the MGF of the Gamma Distribution

Matthew
Post Icon Posted: Submitted by Matthew on 15 December 2008 - 5:22pm.

Joined: 2007-11-03
Posts: 12

I'm having trouble computing the MGF of the Gamma($ \alpha $, $ \beta $) distribution from first principles. I can do it by repeated integration by parts if $ \alpha $ is an integer like so:
Take $ t<1/\beta $

\[M_X(t) = \int_{0}^{\infty}\frac{x^{\alpha-1}e^{-x/\beta}e^{tx}}{\Gamma(\alpha)\beta^{\alpha}}dx\]
\[ = \int_{0}^{\infty}\frac{x^{\alpha-1}e^{x(t-1/\beta)}}{(\alpha-1)!\beta^{\alpha}}dx\]
\[ = \sum_{n=1}^{\alpha-1}(-1)^{n-1}\left[\frac{x^{\alpha-n}e^{x(t-1/\beta)}}{(\alpha-n)!\beta^{\alpha-n}(\beta t - 1)^n}\right]_0^{\infty} + (-1)^{\alpha}\int_{0}^{\infty}\frac{e^{x(t-1/\beta)}}{\beta(\beta t - 1)^{\alpha - 1}}dx\]
\[=\left[\frac{e^{x(t-1/\beta)}}{(1 - \beta t)^{\alpha}}\right]_0^{\infty}\]
\[=\frac{1}{(1-\beta t)^{\alpha}}\]

but I can't see what to do for general $ \alpha>0 $. Can anyone help me with this?

dsmccormick
Post Icon Posted: 16 December 2008 - 7:08pm

Joined: 2006-10-06
Posts: 75
There's a trick or two to be had, which to be fair I had to get off Mathworld, but once you do it, it falls out relatively easily. So, we have
\[
M_X (t) = \int_0^\infty \frac{x^{\alpha-1} e^{-x/\beta} e^{tx}}{\Gamma(\alpha) \beta^\alpha} \, \mathrm{d}x.
\]
Suppose $ t < 1/\beta $. Let $ y = (1/\beta - t)x $, so $ \mathrm{d}y = (1/\beta - t) \mathrm{d}x $. Using this substitution, we obtain:
\[
M_X (t) = \int_0^\infty \left( \frac{y}{1/\beta - t} \right)^{\alpha-1} \frac{ e^{-y}}{\Gamma(\alpha) \beta^\alpha} \, \frac{\mathrm{d}y}{(1/\beta - t)}
\]
\[
= \int_0^\infty \left( \frac{1}{\beta ( 1/\beta - t)} \right)^{\alpha} \frac{1}{\Gamma(\alpha)} y^{\alpha - 1} e^{-y} \, \mathrm{d}y
\]
Since the first two terms do not depend on $ y $ we can take them out of the integral to obtain
\[
M_X (t) = \left( \frac{1}{\beta ( 1/\beta - t)} \right)^{\alpha} \frac{1}{\Gamma(\alpha)} \int_0^\infty y^{\alpha - 1} e^{-y} \, \mathrm{d}y
\]
Now, by definition $ \Gamma(\alpha) = \int_0^\infty s^{\alpha - 1} e^{-s} \, \mathrm{d}s $, so the integral on the right cancels with the $ \Gamma(\alpha) $ on the bottom line and the fraction reduces to
\[
M_X(t) = \left( \frac{1}{1 - \beta t} \right)^{\alpha}
\]
as required. Hope that helps!

(Wow, that's the first time having done my second year essay on the gamma function has actually paid off...)

Dave McCormick

Matthew
Post Icon Posted: 16 December 2008 - 10:59pm

Joined: 2007-11-03
Posts: 12

Thanks.

Ramildinho
Post Icon Posted: 30 December 2008 - 10:37pm

Joined: 2008-01-26
Posts: 6

thanks

jonloton0098
Post Icon Posted: 15 February 2010 - 9:39am

Joined: 2010-02-13
Posts: 1

Oh no, I am very afraid of math. I am very weak in math. But I have tried to solve the problem. But sorry.

You shouldn't have moved into check.

Colin Mkz
Post Icon Posted: 26 May 2010 - 9:56am

Joined: 2010-05-26
Posts: 1

I wish I had seen this before my stats exam... sigh..

mzingdolow
Post Icon Posted: 24 April 2012 - 5:48am

Joined: 2012-04-24
Posts: 4

I have been assigned to do a report for our school newspaper on this subject, and your post has been beneficial. Can you please add more reference to this topic, Raspberry ketone