Simple Calculation of
Variance: MOSSOM
For a series of number i = 1,2,...,n
the arithmetic mean is calculated as
=
(xi) / n
And the variance
(the mean squared
deviation of each number from the sample mean) is calculated as
2 =
[
- xi]2 / n
Modern PCs, hand-held calculators, or spreadsheets can calculate mean and variance directly from the input series of
numbers xi.
Mechanical
desk calculators in use through the early 1970s required
(1) entry and summation of xi, (2)
calculation of
, (3) re-entry of each xi and
calculation of the difference from
, and (4) running
summation of the square of the difference, a tedious calculation
involving repeated re-entry of
.
A more straightforward calculation
recognizes that the variance is equal to the mean of squares, minus the square of means (mnemonic: MOSSOM), that is
2 = ((
xi2 ) / n )
-
2
In this form, the variance is
calculated with two passes of the numerical series, one a
summation of x to obtain
the mean, and the second a summation of x2.
In a simple example, the mean and
variance of a series of four numbers 3, 1, 5, & 1 are
(3 + 1 +
5 + 1)
/ 4 = 2.5
[ (2.5 - 3)2
+ (2.5 - 1)2
+ (2.5 - 5)2
+ (2.5 - 1)2 ]
/ 4 = 2.75
alternatively by the MOSSOM formula,
(32 + 12 + 52 + 12) / 4 -
(2.5)2 = (36 / 4) -
6.25 = 2.75
Homework: Prove that
[
- xi]2 / n = ((
xi2 ) / n )
-
2
All text material ©2017 by Steven M.
Carr