The expression for the expected value just produced looks very similar to that which gave the mean of a set of data as
\overline{x}=\frac{\sum_{\ }^{\ }x}{n}
A similar formula for variance can also be derived. Note that the variance is given by this formula
s^2=\frac{\sum_{\ }^{\ }x^2}{n}-\overline{x}^2
In the example in the previous section, groups of 36 terms could be expected, on average, to give a variance of
\frac{1^2 × 12 + 2^2 × 18 + 4^2 × 6}{36} - 2^2
= 1^2\times\frac{12}{36}+2^2\times\frac{18}{36}+4^2\times\frac{6}{36}-2^2
= 1^2 P(M = 1) + 2^2 P(M = 2) + 4^2 P(M = 4) - 2^2
In general, the variance is defined by
and the standard deviation, σ, is as before defined by
σ^2 = V(X)
For the example above,
| V\left(M\right) | = E\left(M^2\right)-\left[E\left(M\right)\right]^2 |
| = \sum_{\ }^{\ }m^2P\left(M=m\right)-\left[\sum_{\ }^{\ }mP\left(M=m\right)\right]^2 |
giving
| V\left(M\right) | = 1^2\times\frac{1}{3}+2^2\times\frac{1}{2}+4^2\times\frac{1}{6}-2^2 |
| = \frac{1}{3}+2+\frac{8}{3}-4 | |
| = 1 |
As with data, the standard deviation gives a measure of the spread of the distribution.
Worked Examples
Find the variance and standard deviation of X, where
X = the square of the score shown on a die.
The possible values of X are
1, 4, 9, 16, 25 and 36
each one having a probability of . As you saw in Section 1, the mean value (expectation) is given by
E (X) = \frac{1}{6} (1 + 4 + 9 + 16 + 25 + 36) = 15\frac{1}{6}
whilst
| E(X^2) | = \frac{1}{6} × 1 + \frac{1}{6} × 16 + \frac{1}{6} × 81 + \frac{1}{6} × 256 + \frac{1}{6} × 625 + \frac{1}{6} × 1296 |
| = \frac{1}{6} × 2275 | |
| = 379\frac{1}{6} |
Thus
| V(X) | = \frac{2275}{6} - \left(\frac{91}{6}\right)^2 = \frac{13650-8281}{36} |
| = \frac{5369}{36} |
and
σ = \sqrt{\frac{5369}{36}} ≈ 12.2
