Compute the expectation and variance of a Bernoulli(p) random variable

Compute the expectation and variance of a Bernoulli(p) random variable