<s>[INST] expected value rule of Uniform random variable Let  be a uniform random variable on the range $\{−1,0,1,2\}$. Let $=^4$. Use the expected value rule to calculate $\mathbb{E}[Y]$.
Why isn’t the answer $1/4 \cdot(-1)^4 +1/4\cdot (0)^4+ 1/4 \cdot(1)^4 + 1/4 \cdot(2)^4$
 [/INST] The rv X is the following
$$X =
\begin{cases}
\frac{1}{4},  & \text{if $x=-1$} \\
\frac{1}{4},  & \text{if $x=0$} \\
\frac{1}{4},  & \text{if $x=1$} \\
\frac{1}{4},  & \text{if $x=2$} 
\end{cases}$$
If you transform $Y=X^4$ when $X=\pm1$ you get that $Y=1$ in both cases, so you have
$$Y =
\begin{cases}
\frac{1}{4},  & \text{if $y=0$} \\
\frac{1}{2},  & \text{if $y=1$} \\
\frac{1}{4},  & \text{if $y=16$} 
\end{cases}$$
Thus
$$\mathbb{E}[Y]=\frac{1}{2}+4=\frac{9}{2}$$
Next time, please use MathJax to format your formulas; it is easy and your message is more readeable
In any case, your answer is correct...
$$\mathbb{E}[Y]=(-1)^4\times\frac{1}{4}+(0)^4\times\frac{1}{4}+(1)^4\times\frac{1}{4}+(2)^4\times\frac{1}{4}=\frac{9}{2}$$
</s>