Calculate the mean of the Binomial distribution

48 Views Asked by At

According to Wikipedia, the mean of the Binomial distribution is calculated as folllows:

Set $\ell:=k-1$, $m:=n-1$, we get

\begin{align} \mu &=\sum_{k=0}^nk\binom{n}{k}p^k(1-p)^{n-k}\\ &=np\sum_{\ell=0}^m\binom{m}{\ell}p^\ell(1-p)^{m-\ell}\tag{1}\\ &=np(p+(1-p))^m\tag{2}\\ &=np \end{align}

What confused me was that how we could get (2) from (1)? i.e. Why $\sum_{\ell=0}^m\binom{m}{\ell}p^l(1-p)^{m-\ell}=(p+(1-p))^m$?