Note: This forms part of an assignment I'm on the hook for, so I'm really looking for pointers on where I'm going wrong as opposed to just a 'here's your answer' reply

The Problem: we have a random variable with a known probability density function:

f(x) = c*x^2, for (0 <= x <= 1), f(x) is 0 otherwise.

I can find c, and subsequently determine the Expected Value (E(X)) of the r.v. using moments approach (ie: integrating for (x*f(x)) to find E(X) in this case). *BUT* to verify my result, I'm trying to determine the Moment Generating Function (MGF) for the given distribution & then solve for the 1st moment. I'm expecting to get the same result for E(X) as obtained above but instead I'm getting a mess.

I'm doing this by hand at the moment so it could be I've just borked my arithmetic.

Questions:
1) I'm assuming I can, in this particular case, determine the MGF and that it'll derive the moments I need for me. Is that sane?
2) The MGF I get (through an iterative process of integrating by parts on the back of a piece of paper): (Mx(t)= 6*(e^t - 1)/t^3 - 6*e^t/t^2 + 3*e^t/t )

I'm sure my result for (2) is incorrect, or I'm completely missing something, since obviously the first moment isn't solvable (dM/dt for t=0 blows up), thus I can't verify the mean is the same value as I calculated originally above.

Expert help gratefully appreciated

Apr 16th 2012, 07:29 PM

harish21

Re: Find the MGF of a random variable given its pdf

your mgf is incorrect.. try calculating it again..

after you find the value of c, integrate to find your mgf..

Apr 16th 2012, 09:07 PM

MathCrash

Re: Find the MGF of a random variable given its pdf

Thanks for the quick reply harish21.

Yep so that's the integral I've solved to produce my original answer in (2). Here's a breakdown of my approach. Can you identify specifically where I've gone wrong with my simple calculus?:

My value for c is 3, achieved purely through integrating f(x) over the interval 0 to 1, knowing that integral's value is 1.

sorry for making you work again.. actually the mgf you had mentioned first was corrrect indeed.. the non-latex notation confused me..
so you have your mgf.. now to find the expected value.. find out the first derivative of your mgf at t=0.. that should give you your expected value.

Apr 17th 2012, 12:55 AM

MathCrash

Re: Find the MGF of a random variable given its pdf

no dramas, it's all helping to test my rusty understanding of this.

"find out the first derivative of your mgf at t=0"
...& that's where I come undone :) - if I try to derive the 1st moment of my mgf (ie: http://latex.codecogs.com/gif.latex?...7C_%7Bt%3D0%7D) I'm sunk on account of the t in the denominator of the derivative forcing a divide-by-zero exception.

Here's my attempt at the 1st derivative, again just simple calc. exploiting the product rule. Looks sane to you?

If I now try to take the value of that function at t=0, thus to obtain to the 1st moment, I can't.

Assuming the approach is valid, I'm overlooking or misunderstanding something as I can't see a way around my prob. ie: why I can get E(x) using the http://latex.codecogs.com/gif.latex?...20x.f%28x%29dx approach (per my original post), but cannot verify it using the MGF above.