find the first moment using MGF

Q: Find the moment generating function of the following random variable:

X = outcome of a die toss p(x) = P(X=x) = 1/6 for x = 1,2,3...,6

So I know that the definition of the MGF is: $$MGF = M_X(t) = \sum_{1}^6\frac16e^{tx} =$$ $$\frac16 e^t\left(1 + e^t+e^{2t}+ e^{3t} +e^{4t}+e^{5t} \right) =$$

OK so now thinkin about an increasing geometric series (because I think that's what I have here): the common ratio here is : $$e^t$$

Now I'm trying to understand why the sum above is : $$\frac16e^t \left(\frac{e^{6t}-1}{e^t-1} \right)$$

Does it have something to do with the finite $\sum$? I don't really know any 'tricks' to simplify, and so the solution in the book(above) seems to be skipping some steps for me. Any help would be greatly appreciate :) thanks in advance!

• It's often the case that people remember the formula $$S=\sum_{j=0}^{\infty}r^j=\frac{1}{1-r}$$ for an infinite geometric series, but forget the formula for the finite version. Here's an easy way to recover it, if you know the formula above. The finite sum is the infinite series minus some tail: $$S_n=\sum_{j=0}^n r^j =S -r^{n+1}S=(1-r^{n+1})S =\frac{1-r^{n+1}}{1-r}$$ – MPW Sep 21 '14 at 22:36

Let $r = e^t$.

Then let $S = 1+r+r^2+...+r^5$. The expression inside the paranthesis is exactly $S$.

Now $rS = r+r^2+...+r^6$. So:

$$rS-S = (r+r^2+...+r^6)-(1+r+r^2+...+r^5) = r^6-1.$$

So $S = \frac{r^6-1}{r-1}$, which is exactly what you want!

This is a general trick to add finite geometric series. You can try this for another similar geometric series for practice.

• (+1) Nicely done. But I'd suggest you edit your answer to be in Mathjax form (e.g. put \$'s around your math). – Semiclassical Sep 21 '14 at 22:25 • Thanks! Makes perfect sense! Going to use this now :D – Adam Sep 21 '14 at 22:35 The sum: $$M_X(t) = \frac16 e^t\left(1 + e^t+e^{2t}+ e^{3t} +e^{4t}+e^{5t} \right),$$ is a geometric series. It is easy to show that the sum of the first$n\$ terms of a geometric series is:

$$\sum_{k=0}^{n-1} r^k = \frac{r^n-1}{r-1}.$$

I suggest you try to prove it yourself, and check your proof here. Now, applying this formula, you can easily obtain the result:

$$M_X(t) = \frac16 e^t\left(\frac{e^{6t}-1}{e^t-1}\right),$$

which is what you wanted.