# Binomial Distribution and the Moment Generating Function

Please consider the problem and the answer below. The problem is from a text book on statistics. I believe that my answer is correct but it seems to easy so I am concerned that it is wrong. Is it wrong?
Thanks,
Bob
Problem:
If $Y$ has a binomial distribution with $n$ trials and the probability of success $p$, show that the moment generating function for $Y$ is: \begin{eqnarray} m(t) &=& (pe^t+q)^n \end{eqnarray} where $q = 1 - p$.
The moment generating function is defined to be $m(t) = E(e^{ty})$. This gives us the following: \begin{eqnarray*} m(t) &=& E(e^{ty}) \\ m(t) &=& \sum_{i = 0}^{n} { {n \choose i} p^i q^{n-i} e^{ti} } \\ \end{eqnarray*} Now, I apply the binomial theorem to equation 1 and get: \begin{eqnarray*} m(t) &=& \sum_{i = 0}^{n} { {n \choose i} p^i q^{n-i} e^{ti} } \\ \end{eqnarray*} Q.E.D.
\begin{align}M_X(t) &= \mathsf E(e^{tX}) &&\text{by definition of mgf}\\[1ex] & = \sum_{k} e^{tk}\mathsf P(X=k) && \text{by definition of expectation for discrete random variables} \\[1ex] & = \sum_{k=0}^n e^{tk}\binom{n}{k} p^k q^{n-k} & & \text{using the pmf for Binomial Distribution} \\[1ex] & = \sum_{k=0}^n \binom{n}{k} (pe^t)^k q^{n-k} & & \text{Algebra} \\[1ex] & = (pe^t+q)^n && \text{via the Binomial Theorem}\end{align}