Finding the Moment Generating function of a Binomial Distribution
Solution 1:
The moment generating function for the binomial distribution $B_{n,p}$, whose discrete density is $\binom{n}{k}p^k(1-p)^{n-k}$, is defined as $$ \begin{align} M_{B_{n,p}}(t) &=\mathrm{E}(e^{tk})\\ &=\sum_{k=0}^n\binom{n}{k}p^k(1-p)^{n-k}e^{tk}\\ &=\sum_{k=0}^n\binom{n}{k}\left(pe^t\right)^k(1-p)^{n-k}\\ &=\left(pe^t+(1-p)\right)^n \end{align} $$ The last step is simply an application of the binomial theorem.