# Moment generating function and $E(2^X)$

A moment-generating function of $X$ is given by$$M(t) = 0.3e^t + 0.4e^{2t} + 0.2e^{3t} + 0.1e^{5t}.$$ Find the pmf of $X$.

My solution $$x-f(x)\\ 1-0.3\\ 2-0.4\\ 3-0.2\\ 5-0.1\\$$ (correct?) The next question asks to calculate $E(2^X)$, which I am tottally unsure about. I calculated the mean as $0.22$ and variance as $5.28$.

Anyone understand what to do?

You are given the value of $M(t)=E[\mathrm e^{tX}]$ for every $t$ and you are looking for the value of $E[2^X]$. Well, note that $E[2^X]=M(t)$ for $t=$ $____$.

Sanity check: As it happens, $E[2^X]$ is an integer.

hint: $E[g(X)] = \sum g(x)P (X = x)$ Can you solve now?

• yes it definitely does. thanks So does that make it = 2^1 * 1 + 2^2 * 2 ....so on – harold Apr 12 '13 at 3:27
• or have i got taken the formula wrong – harold Apr 12 '13 at 3:37
• You have got it wrong. – jay-sun Apr 12 '13 at 3:39