# if multiple dice are thrown, how can I calculate their variance and mean?

from my calculation if 4 6-sided dice are thrown:

$$E[x] = 14.0$$ $$E[x^2] = 207.66666..$$ $$Var(x) = E[x^2]-(E[x])^2 = 11.666666666666657$$

would there be some general formula for a dice with each dice having n sides?

-
fair dice with $P(X=x)=\frac1n$? –  Bhavish Suarez Nov 21 '12 at 15:37
surely it has to fair dice... –  thkang Nov 21 '12 at 15:43

For a fair die with $n$ sides, we get $$E[x]=\sum_{i=1}^n \frac{1}{n} i =\frac{1}{n}\sum_{i=1}^n i=\frac{1+n}{2}$$ And $$E[x^2]=\sum_{i=1}^n \frac{1}{n} i^2 =\frac{1}{n}\sum_{i=1}^n i^2=\frac{1}{6} (1+n) (1+2 n)$$
And of course $$Var[x]= \frac{1}{6} (1+n) (1+2 n)- (\frac{1+n}{2})^2$$
By the way, since the dice are independent, $Var[X_1 + X_2 + X_3 + X_4 ] = 4 Var[X_1]$ no matter how many sides the dice have. So you only need to calculate for one die and multiply.