The expected value of a random variable is calculated by summing the product of each outcome and its probability.
For $X$, we have:
$$E[X] = \sum xP(X=x) = -1 \cdot \frac{1}{4} + 0 \cdot \frac{1}{4} + 0 \cdot \frac{1}{4} + 1 \cdot \frac{1}{4} = 0$$
For $X^2$,
Show more…