# 4.5 Expectation

## Expectation of a Uniform Distribution

Let $$X$$ be a random variable with uniform distribution over the integers from $$-n$$ to $$n$$. Let $$Y := X^2$$.

Which of the following are true?

Exercise 1

1. Since $$PDF_X(x)$$ is symmetric around 0, we know the mean has to be 0.
2. All values of $$Y$$ are nonnegative and most of them are actually positive with non-zero probability. There is no way for the mean to be 0. It has to be some positive value.
3. Obvious, since $$E[X]=0$$ and $$E[Y]>0$$.
4. True by linearity of expectation, no matter what $$X$$ and $$Y$$ are.
5. This is tricky. The equation does not hold in general for non-independent $$X$$ and $$Y$$. However, in this particular case, it happens to hold. To see this, note that the right hand side is 0, since $$E[X]=0$$. At the same time, the random variable $$XY=X^3$$. Its PDF is symmetric around 0, so its mean must be 0 as well.
6. $$X$$ and $$Y$$ are obviously not independent.
7. $$E[Y]=\sum_{i=0}^n 2i^2\frac{1}{2n+1} < \sum_{i=0}^n 2i^4\frac{1}{2n+1} = E[Y^2]$$.