The variance of a random variable can be computed using the definition of variance:where denotes the expected value operator.

When the random variable is discrete the above formula becomeswhere is the set of all possible realizations of and is the probability mass function of . In other words, we need to compute a weighted average of the squared deviations of from its mean.

To see how to apply this formula, read some Solved exercises.

When is continuous, the formula iswhere is the probability density function of .

To see how to apply this formula, read some Solved exercises.

Instead of computing variance using these formulae, it is often easier to use
the following equivalent **variance
formula**:

For example, when we know the moment generating function of , we can use it to compute the two moments and and then plug their values in this formula.

More details about this formula - as well as a **proof** of it
and some solved **exercises** - can be found in the lecture
entitled Variance.

Previous entry: Unbiased estimator

The book

Most of the learning materials found on this website are now available in a traditional textbook format.