# Moment generating functions help

Tags:
1. Apr 9, 2017

### Mark53

1. The problem statement, all variables and given/known data

Let X be a random variable with support on the positive integers (1, 2, 3, . . .) and PMF f(x) = C2 ^(-x) .

(a) For what value(s) of C is f a valid PMF?
(b) Show that the moment generating function of X is m(t) = Ce^t/(2− e^t) , and determine the interval for t for which it is valid. (You may use your value for C calculated in question 1, if you would like).
(c) Using the MGF, calculate the expected value and the variance of X.

3. The attempt at a solution

a)

sum from -∞ to ∞ of C/(2^x)=1

C(1/2+1/4.....)=1
C=1 as it converges

b)

m(t)=E[e^tx]=integral from -∞ to ∞ of ((e^tx)*(2^(-x)))
=integral from -∞ to ∞ of (e^tx)/(2^x)

is this the right way to go about calculating it?

2. Apr 10, 2017

### Ray Vickson

No. For a discrete random variable we have
$$E f(X) = \sum_x p(x) f(x),$$
so involves summation, not integration.

3. Apr 10, 2017

### Mark53

when calculating the sum I get:

the sum of x=0 to ∞ of (e^tx)/(2^x)=e^t/2

which is wrong am I still missing something?

4. Apr 10, 2017

### Ray Vickson

Yes: you are basically saying that $\sum_{k=0}^{\infty} r^k = r,$ which is wrong.

5. Apr 10, 2017

### Mark53

Do I need to see if the series converges or find the partial sum?

not sure how to start solving it