How is $nq-1 = \sum_{m=0}^n (m-1){n \choose m} p^{n-m}q^m$

binomial theorembinomial-coefficientssummation

$$nq-1 = \sum_{m=0}^n (m-1){n \choose m} p^{n-m}q^m$$
I found this formula in my facility planning book. The math part of it I don't understand.
I tried taking it apart like this $\sum_{m=0}^n (m){n \choose m}p^{n-m}q^m-\sum_{m=0}^n {n \choose m}*p^{n-m}q^m$ and calculate each term of the summation and it doesn't work.
Btw we have $\ p+q=1$.

I appreciate it if anyone can help me.

Best Answer

$$\begin{align*} \sum_{m=0}^n(m-1)\binom{n}mp^{n-m}q^m&=\sum_{m=0}^nm\binom{n}mp^{n-m}q^m-\sum_{m=0}^n\binom{n}mp^{n-m}q^m\\ &\overset{*}=\sum_{m=0}^nn\binom{n-1}{m-1}p^{n-m}q^m-(p+q)^n\\ &=n\sum_{m=0}^{n-1}\binom{n-1}mp^{n-(m+1)}q^{m+1}-1\\ &=nq\sum_{m=0}^{n-1}\binom{n-1}mp^{(n-1)-m}q^m-1\\ &\overset{*}=nq(p+q)^{n-1}-1\\ &=nq-1 \end{align*}$$

The starred steps use the binomial theorem.

Related Question