# Thread:

1. ## 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!):

$<br /> 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)<br />$

I know that the even moments are:

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

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

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

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

2. The $E[x^{2n}]$ looks familiar to the expected value of the order statistics.

3. 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!):

$<br /> 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)<br />$

I know that the even moments are:

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

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

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

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

4. 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!):

$<br /> 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)<br />$

I know that the even moments are:

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

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

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

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.

5. 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: $<br /> 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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 25, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.92328941822052, "perplexity_flag": "middle"}