## Variance of a random Variable

The expected value or mean of a probability function of a random variable gives a measure of the average or central tendency, but no indication of how spread the values are likely to be.

The standard deviation or variance of a probability distribution is measure of the spread of likely values of a random variable.

The variance of the discrete random variable X with E(X) = μ is given by:

 VAR(X) = E(X − μ)2 = Σ(x − μ)2 .P(x)

Example

The probability distribution table for the random variable X is shown below.

 x 3 4 5 6 7 P(X = x) 0.1 0.2 0.4 0.2 0.1

The expected value E(X) = 5 (because the distribution is symmetrical)

The variance VAR(X) = Σ(x − μ)2 .P(x)

 x 3 4 5 6 7 x − 5 3 − 5 = -2 4 − 5 = -1 5 − 5 = 0 6 − 5 = 1 7 − 5 = 2 (x − 5)2 (-2)2 = 4 (-1)2 = 1 02 = 0 12 = 1 22 = 4 P(X = x) 0.1 0.2 0.4 0.2 0.1

VAR(X) = 4 x 0.1 + 1 x 0.2 + 0 x 0.4 + 1 x 0.2 + 4 x 0.1

= 1.2

VAR(X) = 1.2

### Alternative Formula for the Variance of a Random Variable

The formula used above requires quite a lot of calculation for each value of the variable.
The following formula is quicker to use:

 VAR(X) = E(X2) – [E(X)]2

Proof

 VAR(X) = E(X − μ)2 = E(X2 − 2μX + μ2) = E(X2) − 2μE(X) +E(μ2) = E(X2) − 2μ2 + μ2 = E(X2) − μ2 = E(X2) − [E(X)]2

Example

The probability distribution table for the random variable X is shown below.

 x 3 4 5 6 7 P(X = x) 0.1 0.2 0.4 0.2 0.1

The expected value E(X) = 5 (because the distribution is symmetrical)

E(X2) = 9 x 0.1 + 16 x 0.2 + 25 x 0.4 + 36 x 0.2 + 49 x 0.1

= 26.2

VAR(X) = E(X2) − [E(X)]2

= 26.2 − 52

= 1.2

VAR(X) = 1.2

### Summary

The following notation is usually used in statistics and probability:

 Mean Standard deviation Variance Random variables E(X) SD(X) VAR(X) Sample s s2 Population μ σ σ2