# Use a probability function of X to prove the Moment Generating Function

Given the probability function of $X$ as follows: $f(x) = \frac{1}{2} \left(\frac{2}{3}\right)^x$ , $x=1, 2, 3, \dots$

(a) Use the definition $M_x(t)= E(e^{tx})$ to show that the moment generating function of $X$ is $$M_x(t) = \dfrac{e^t}{3 - 2e^t}$$ for all $t < \ln(3/2)$.

(b) Find the expected value of $X$.

I am aware that the answer to part a. is given, I just need to know what steps to take to prove the m.g.f. of $X$ is what is given somehow using the given probability function of $X$, is there anybody out there with the skills?

We have $$E(e^{tX})=\sum_k e^{tk}\Pr(X=k).$$ In our case we get $$E(e^{tX}=\sum_{k=1}^\infty e^{tk}\cdot\frac{1}{2}\cdot\left(\frac{2}{3}\right)^k =\sum_{k=1}^\infty \frac{1}{2} \cdot\left(\frac{2}{3}e^t\right)^k.\tag{1}$$ The sum on the right of (1) is an infinite geometric series, first term $\frac{1}{3}e^t$, common ratio $\frac{2}{3}e^t$. If $0\le \frac{2}{3}e^t\lt 1$, the sum is $$\frac{e^t/3}{1-(2/3)e^t}.$$ This simplifies to the expression of the OP. Note that the series only converges when the common ratio $\frac{2}{3}e^t$ is less than $1$.