How does $\sum_{k=0}^n (pe^t)^k{n\choose k}(1-p)^{n-k} = (pe^t+1-p)^n$? How does $\sum_{k=0}^n (pe^t)^k{n\choose k}(1-p)^{n-k} = (pe^t+1-p)^n$?
Where $e$ is Euler's number and $p,n$ are constants. ${n\choose k}$ is the binomial coefficient.
If context helps, I'm currently trying to show that the moment generating function of a binomial random variable $X$ with parameters $n$ and $p$ is given by $(pe^t+1-p)^n$. I'm stuck on this very last bit. My notes just simply state that $\sum_{k=0}^n (pe^t)^k{n\choose k}(1-p)^{n-k} = (pe^t+1-p)^n$, but I don't understand why this is so.
Many thanks in advance.

The binomial theorem, or binomial identity or binomial formula, states that:
$$(x+y)^n=\sum\limits_{k=0}^n{n\choose k}x^{n-k}y^k$$ where $n\in\mathbb{N}$ and $(x,y)\in\mathbb{R}$ (or $\mathbb{C}$).
Then for $x=(1-p)$ and $y=pe^t$ you get your formula.
