Getting a negative variance for the sum of dice rolling

diceprobabilityvariance

I'm trying to find what I did wrong. If $X$ signifies the sum of what you get from rolling a regular die (1-6), 100 times and $X_i$ for a single roll. Then:

$$E\left[X\right]=\sum_{i=1}^{100}\frac{7}{2}=100\frac{7}{2}=350$$
and:
$$E\left[X^{2}\right]=E\left[\sum_{i=1}^{100}X_{i}^{2}\right]=\sum_{i=1}^{100}E\left[X_{i}^{2}\right]=100\cdot\frac{91}{6}=\frac{4550}{3}$$
Then the variance is negative:
$$Var\left(X\right)=E\left[X^{2}\right]-E\left[X\right]^{2}=\frac{-362950}{3}$$
In this way, however, I recieve a positive number:
$$100Var\left(X_{i}\right)=100\left(E\left[X_{i}^{2}\right]-E\left[X_{i}\right]^{2}\right)=100\left(\frac{91}{6}-\left(\frac{7}{2}\right)^{2}\right)$$

I suppose the latter is correct, but why is the first way false?

Best Answer

$$E\left[X^{2}\right]=E\left[\left(\sum_{i=1}^{100}X_{i}\right)^{2}\right] \ne E\left[\sum_{i=1}^{100}X_{i}^{2}\right]$$