# Mean of binary random variable with probability $.75$ of getting $1$

Given random variable $X$ that takes on $0$ or $1$ with probability of $0.25$ and $0.75$ respectively.
What is the mean of $X$?

The answer sheet says $0.5\cdot1+0.5\cdot0=0.5$ which I do not understand, shouldn't it be $0.25\cdot 0+0.75\cdot 1$?

• You're right. The answer sheet is wrong. – bartgol Apr 14 '16 at 15:36

We have that $P(X = 1) = .75=p$, and $$E[X] = \sum_{k = 0}^1 kP(X = k) = 0(.25)+1(.75) = .75 = p$$ So, you are correct. The expected value of this random variable should be $p$.
If you need the variance, then you will need to find the second moment, $$E[X^2] = \sum_{k = 0}^1 k^2P(X=k) = 0^2(.25) +1^2(.75) = .75$$ Hence, $$\text{Var}(X) = E[X^2]-\{E[X]\}^2 = .75-(.75)^2 = .75(1-.75) = p(1-p)= 0.1875.$$