Bernoulli distribution mean and variance formulas