# Thread: Moment generating function-- help on the algebra.

1. ## Moment generating function-- help on the algebra.

I understand the question and what moments mean, and the difference in continuous vs. discrete case but, how do they get that answer, which I marked in red;

I understand the (1/6)(e^t) part, as that should be the first term in this geometric progression. I do not understand the inside part, which I circled.

2. ## Re: Moment generating function-- help on the algebra.

Obviously they have first factored out $\displaystyle \frac{1}{6}e^t$. That leaves $\displaystyle 1+ e^t+ e^{2t}+ e^{3t}+ e^{4t}+ e^{5t}$. That is a finite geometric sum: $\displaystyle \sum_{i=0}^n r^i$ with $\displaystyle r= e^t$.

Such a sum has a simple formula. Let S= $\displaystyle 1+ r+ r^2+ \cdot\cdot\cdot+ r^n$. Factor an r out on the right: $\displaystyle S=1+ r(1+ r+ \cdot\cdot\cdot+ r^{n-1})$. In the parentheses on the right we almost have S again. Add and subtract $\displaystyle r^n$ inside the parentheses: $\displaystyle S= 1+ r(1+ r+ \cdot\cdot\cdot+ r^{n-1}+ r^n- r^n)= 1+ r(1+ r+ \cdot\cdot\cdot+ r^n)- r^{n+1}=1+ rS- r^{n+1}$.
Subtract rS from both sides: $\displaystyle S- rS= (1- r)S= 1- r^{n+1}$ so, finally, $\displaystyle \frac{1- r^{n+1}}{1- r}$.

Replacing that r with $\displaystyle e^t$ gives $\displaystyle S= \frac{1- e^{(n+1)t}}{1- e^t}$ or, with n= 5, $\displaystyle \frac{1- e^{6t}}{1- e^t}$.

3. ## Re: Moment generating function-- help on the algebra.

Forgot all about finite geometric series... Most of the problems I have been doing have been infinite geometric series.