Expectation of Bernoulli Distribution/Proof 1

Proof
From the definition of expectation:


 * $\displaystyle E \left({X}\right) = \sum_{x \mathop \in \operatorname{Im} \left({X}\right)} x \Pr \left({X = x}\right)$

By definition of Bernoulli distribution:


 * $E \left({X}\right) = 1 \times p + 0 \times \left({1-p}\right)$

Hence the result.