Variance of Binomial Distribution/Proof 2

Theorem
Let $X$ be a discrete random variable with the binomial distribution with parameters $n$ and $p$.

Then the variance of $X$ is given by:
 * $\operatorname{var} \left({X}\right) = n p \left({1-p}\right)$

Proof
From Variance of Discrete Random Variable from PGF, we have:
 * $\operatorname{var} \left({X}\right) = \Pi''_X \left({1}\right) + \mu - \mu^2$

where $\mu = E \left({x}\right)$ is the expectation of $X$.

From the Probability Generating Function of Binomial Distribution, we have:
 * $\Pi_X \left({s}\right) = \left({q + ps}\right)^n$

where $q = 1 - p$.

From Expectation of Binomial Distribution, we have:
 * $\mu = n p$

From Derivatives of PGF of Binomial Distribution, we have:
 * $\Pi''_X \left({s}\right) = n \left({n-1}\right) p^2 \left({q + ps}\right)^{n-2}$

Putting $s = 1$ using the formula $\Pi''_X \left({1}\right) + \mu - \mu^2$:
 * $\operatorname{var} \left({X}\right) = n \left({n-1}\right) p^2 + np - n^2p^2$

and hence the result.