Hello,

There is an easier formula for the variance, derived from the one you have.

Recall two properties of the expectancy :

(where a is a real number)

(again, where a is a real number)

By (1), we have

Note that is a value, a number. It is not a variable anymore.

By (2), we have

Note that

(here, f(x)=x² and is the set of all possible values for X)