# Moment generating function and expectation

1. Jul 31, 2009

### BookMark440

1. The problem statement, all variables and given/known data
Let X denote a random variable with the following probability mass function:
P(j)= 2^(-j), j=1,2,3,.....
(a) Compute the moment generating function of X.
(b) Use your answer to part (a) to compute the expectation of X.

2. Relevant equations
m.g.f of X is M (t) = E[e^tX]

3. The attempt at a solution

I computed the MGF (X) to be: e^t/(2-e^t). I need a suggestion about the next step. I'm confused about the relationship between the MGF and expectation of X.

Thanks!

2. Aug 1, 2009

3. Aug 1, 2009

### BookMark440

That link was very helpful. I completed the problem but I am a little uncertain about my strategy of finding the derivative by parts and the answer:

X has p.d.f : p(j) = 2^(-j), j=1,2,3,....

I computed the MGF for X = e^t/(2-e^t)

Then E[X] = d/dt (e^t/(2-e^t)) [evaluated for t= 0] =

numerator = (2-e^t)d/dt(e^t) - (e^t)d/dt(2-e^t)
denominator = (2-e^t)^2

Evaluating for t=0, the final answer is:
E[X] = 2

Is this the correct strategy and answer?

Thanks!

4. Aug 1, 2009

### tiny-tim

Hi BookMark440!

(try using the X2 tag just above the Reply box )
Looks good!