Variance of Bernoulli Distribution/Proof 5

Proof
From Moment Generating Function of Bernoulli Distribution, the moment generating function of $X$, $M_X$, is given by:


 * $\displaystyle \map {M_X} t = q + p e^t$

From Variance as Expectation of Square minus Square of Expectation, we have:


 * $\displaystyle \var X = \expect {X^2} - \paren {\expect X}^2$

From Moment in terms of Moment Generating Function:


 * $\displaystyle \expect {X^2} = \map {M_X''} 0$

We have:

Setting $t = 0$ gives:

In Expectation of Bernoulli Distribution, it is shown that:


 * $\displaystyle \expect X = p$

So: