# $\sum_{m=0}^n (m-np)^2 {n \choose m} p^m q^{n-m} = npq$

How to show that:

$\sum_{m=0}^n (m-np)^2 {n \choose m} p^m q^{n-m} = npq$

-
do you really want to show it this way or can you use the binomial random variable? –  Jean-Sébastien Dec 8 '12 at 18:11

Here is a way to see it without having to expand anything in the sum. Consider a random variable $X$ following a binomial distribution with parameters $n,p$. By definition, it is the sum of $n$ i.i.d. Bernoulli$(p)$ random variable, who have expectation $p$ and variance $pq$. So since $$X=X_1+X_2+\cdots X_n,$$ it's expectation is the sum of the expectation of all $X_m$, so $E[X]=\sum_{m=0}^nE[X_m]=np$. Since the $X_m's$ are independant, the variance of their sum is the sum of their variance so $$Var[X]=npq,$$ $(q=1-p)$. By definition of the variance, you also have $$Var[X]=\sum_{k=0}^{n}(m-np)^2\binom{n}{m}p^{m}q^{n-m}.$$ thus, both are equal.
$(m-np)^2\binom n m=\{m(m-1)+(1-2np)m+n^2p^2\}\binom n m=n(n-1)\binom{n-2}{m-2}+(1-2np)n\binom {n-1}{m-1}+n^2p^2\binom n m$
as $m\binom n m=m\frac{n!}{m!(n-m)!}=mn\frac{(n-1)!}{m\cdot(m-1)!\{(n-1)-(m-1)\}!}=n\binom{n-1}{m-1}$ for $m\ge 1$
and $m(m-1)\binom n m=m(m-1)\frac{n!}{m!(n-m)!}$ $=m(m-1)n(n-1)\frac{(n-1)!}{m(m-1)\cdot(m-2)!\{(n-2)-(m-2)\}!}=n(n-1)\binom{n-2}{m-2}$ for $m\ge 2$