Apparently:

$$

E[X^2] = 1^2 cdot frac{1}{6} + 2^2 cdot frac{1}{6} + 3^2cdotfrac{1}{6}+4^2cdotfrac{1}{6}+5^2cdotfrac{1}{6}+6^2cdotfrac{1}{6}

$$

where $X$ is the result of a die roll.

How come this expansion?

**Contents**hide

#### Best Answer

There are various ways to justify it.

For example, it follows from the definition of expectation and the law of the unconscious statistician.

Or consider the case $Y=X^2$ and computing $E(Y)$.