Expectation of Bernoulli Distribution/Proof 4

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


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

where $q = 1 - p$.

By Moment in terms of Moment Generating Function:


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

We have:

Setting $t = 0$ gives: