Let $X~\sim B(n,p)$ be a binomial random variable. Calculate $E[X(X-1)]$.
Do I need to use the Binomial theorem? If yes, how?
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this communityHint: It is $E(X(X-1))=E(X^2)-E(X)$.
And $Var(X)=E(X^2)- [E(X)]^2 \Rightarrow E(X^2)=Var(X)+[E(X)]^2$
$$E[X(X-1)]$$ $$=\sum_{x=0}^nx(x-1){n\choose x}p^xq^{n-x}$$ $$=\sum_{x=2}^nx(x-1)\frac{n!}{x!(n-x)!}p^xq^{n-x}$$ $$=n(n-1)p^2\sum_{x=2}^n\frac{(n-2)!}{(x-2)!(n-x)!}p^{x-2}q^{n-x}$$ $$=n(n-1)p^2(p+q)^{n-2}$$ $$=n(n-1)p^2$$ Note that $x(x-1)=0$ for both $x=0$ and $x=1$, so the range of summation an be taken as $x=2,3,\dots,n$; after factoring $n(n-1)p^2$ through the summation, the remaining sum is just $(p+q)^{n-2}$ from the binomial theorem.