Observe that for a random variable Y
that takes on values 0 and 1, the expected value of Y
is defined as follows:
E(Y) = 0 × Pr(Y=0) + 1 × Pr(Y=1)
Now, suppose that x
is a Bernouli random variable with succes probability Pr(X=1) = p. Use the information above to answer the following question show that E(x²) = p