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!
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.