Moment generating function

Printable View

• Feb 1st 2008, 10:50 AM
paolopiace
Moment generating function
Ok, let's use the brute approach. This is a continuation of my previuos post:
http://www.mathhelpforum.com/math-he...ble-check.html

which is meant to analytically calculate the moments of the following pdf (this is my problem!):

$
p(x;\lambda) =\left\{\begin{array}{cc}2 \lambda x\ e^{-\lambda{x^2}}&\mbox{ if } x\geq 0\\0 & \mbox{ if } x<0\end{array}\right. (\lambda>0)
$

I know that the even moments are:

$
E[x^{2n}]=\frac{n!}{\lambda^n}\ (n=0,1,2, ...)
$

In that previous post I'm using (unsuccesfully) the moment generating function:

$
M_X(t)=\int_0^\infty 2 \lambda x\ e^{-\lambda{x^2}+tx} dx\
$

You can see there why it does not take me to the expecetd results.

How can I get to the expected results?? Perhaps developing with Taylor??

I am required NOT to use higher level tools, like Laplace/Fourier, etc...
• Feb 1st 2008, 10:56 AM
shilz222
The $E[x^{2n}]$ looks familiar to the expected value of the order statistics.
• Feb 1st 2008, 11:08 AM
CaptainBlack
Quote:

Originally Posted by paolopiace
Ok, let's use the brute approach. This is a continuation of my previuos post:
http://www.mathhelpforum.com/math-he...ble-check.html

which is meant to analytically calculate the moments of the following pdf (this is my problem!):

$
p(x;\lambda) =\left\{\begin{array}{cc}2 \lambda x\ e^{-\lambda{x^2}}&\mbox{ if } x\geq 0\\0 & \mbox{ if } x<0\end{array}\right. (\lambda>0)
$

I know that the even moments are:

$
E[x^{2n}]=\frac{n!}{\lambda^n}\ (n=0,1,2, ...)
$

In that previous post I'm using (unsuccesfully) the moment generating function:

$
M_X(t)=\int_0^\infty 2 \lambda x\ e^{-\lambda{x^2}+tx} dx\
$

You can see there why it does not take me to the expecetd results.

How can I get to the expected results??

This is a 1-sided Laplace transform, and can be done with a table of Laplace transforms and a bit of knowlege of LT properties.

It looks to me as though (up to a scale factor) it's the derivative of the complementary error function.

RonL
• Feb 2nd 2008, 12:52 AM
mr fantastic
Quote:

Originally Posted by paolopiace
Ok, let's use the brute approach. This is a continuation of my previuos post:
http://www.mathhelpforum.com/math-he...ble-check.html

which is meant to analytically calculate the moments of the following pdf (this is my problem!):

$
p(x;\lambda) =\left\{\begin{array}{cc}2 \lambda x\ e^{-\lambda{x^2}}&\mbox{ if } x\geq 0\\0 & \mbox{ if } x<0\end{array}\right. (\lambda>0)
$

I know that the even moments are:

$
E[x^{2n}]=\frac{n!}{\lambda^n}\ (n=0,1,2, ...)
$

In that previous post I'm using (unsuccesfully) the moment generating function:

$
M_X(t)=\int_0^\infty 2 \lambda x\ e^{-\lambda{x^2}+tx} dx\
$

You can see there why it does not take me to the expecetd results.

How can I get to the expected results?? Perhaps developing with Taylor??

I am required NOT to use higher level tools, like Laplace/Fourier, etc...

I was going to ask that you post the original question that triggered your other posts. I should have guessed - you (more-or-less) have a Weibull distribution and you want its moments. But why get them from the moment generating function? - you're on a hiding to nothing there unless you want to work with the Error Function.

Just use the definition of the nth moment and do the (simple but tedious) integral, which I'll post if I have time.
• Feb 2nd 2008, 02:27 AM
mr fantastic
Quote:

Originally Posted by mr fantastic
I was going to ask that you post the original question that triggered your other posts. I should have guessed - you (more-or-less) have a Weibull distribution and you want its moments. But why get them from the moment generating function? - you're on a hiding to nothing there unless you want to work with the Error Function.

Just use the definition of the nth moment and do the (simple but tedious) integral, which I'll post if I have time.

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

First tidy things up by making the substitution $u = \sqrt{\lambda} \, x \Rightarrow dx = \frac{du}{\sqrt{\lambda}}$:

$E(X^n) = \frac{2}{\lambda^{n/2}} \int_0^\infty u^{n+1} e^{- u^2} \, du$.

Now make the substitution $u = t^2 \Rightarrow dt = \frac{du}{2t}: \,$ $\, E(X^n) = \frac{1}{\lambda^{n/2}} \int_0^\infty t^{n/2} e^{-t} \, dt$.

n is even:

Let n = 2m say. Then you have: $\, E(X^{2m}) = \frac{1}{\lambda^{m}} \int_0^\infty t^{m} e^{-t} \, dt$.

Repeated integration by parts (or spotting something interesting after the first application) gives the result you know: $
E[x^{2m}]=\frac{m!}{\lambda^m},\ (m = 0, 1 , 2, ...).$

When n is odd life is not so ...... elementary. You need another new function - the Gamma Function.

In terms of the Gamma Function, $\int_0^\infty t^{n/2} e^{-t} \, dt = \Gamma \left( \frac{n}{2} + 1 \right). \,$ Therefore $E(X^n) = \frac{1}{\lambda^{n/2}} \Gamma \left( \frac{n}{2} + 1 \right)$.

Having clicked the above link and done the reading, you now know a well known property of the Gamma Function, namely $\Gamma (p + 1) = p \Gamma (p)$ and that $\Gamma (m + 1) = m!$.

It follows that you can substitute n = 2m into the above general result for $E(X^n)$ and get the result you know for even moments.

When n is odd, the well known property $\Gamma (p + 1) = p \Gamma (p)$ together with the well known (and easily proved) result $\Gamma \left( \frac{1}{2} \right) = \sqrt{\pi}$ can be used to generate a general formula for the odd moments. I leave this as a fairly simple exercise for you.

Hint: You first might like to prove (by induction, perhaps) that $(1)(3)(5)(7) .......(2m - 3)(2m-1) = \frac{(2m)!}{m! 2^m}$.

PS: Krizalid and TPH, I know that both the above substitutions could be done at once.