Bernoulli, the mean#
Recall from Section 3.4, we calculate the expected value of a discrete random variable with the following formula:
\[ E(X) = \sum\_{i=1}^k x_i P(X=x_i)\]
Part 1#
Use this probability rule to derive the mean of a Bernoulli random variable, i.e. a random variable $\(X\)\( that takes value \)\(1\)\( with probability \)\(p\)\( and value \)\(0\)\( with probability \)\(1 - p\)$. That is, compute the expected value of a generic Bernoulli random variable.
Attribution#
Problem is from the OpenIntro Statistics textbook, licensed under the CC-BY 4.0 license.