there will be very little difference in calculation of the standard deviation from either
definition. To convert the standard deviation S, calculated using equation (11.13)
one need only multiply Sby
√
n
n− 1
to obtain the value sas specified by equation
(11.12).
The sample variance given by equation (11.12) requires that one first calculate
X, then one must calculate all the terms Xj−X. All this preliminary calculation
introduces roundoff errors into the final result. The sample variance can be cal-
culated using a short cut method of computing without having to do preliminary
calculations. The short cut method is derived using the expansion
(Xj−X)^2 =Xj^2 − 2 XjX+X^2
and substituting it into equation (11.12). A summation of terms gives
∑n
j=1
(Xj−X)^2 =
∑n
j=1
Xj^2 − 2 X
∑n
j=1
Xj+X^2
∑n
j=1
(1)
The substitution X=^1
n
∑n
j=1
Xjand using
∑n
j=1
(1) = n, gives the result
∑n
j=1
(Xj−X)^2 =
∑n
j=1
Xj^2 − 21
n
∑n
j=1
Xj
∑n
j=1
Xj+
^1
n
∑n
j=1
Xj
2
n
=
∑n
j=1
Xj^2 −^2
n
∑n
j=1
Xj
2
+^1
n
∑n
j=1
Xn
2
=
∑n
j=1
Xj^2 −^1
n
∑n
j=1
Xj
2
This produces the shortcut formula for the sample variance
s^2 =n−^11
∑n
j=1
Xj^2 −n^1
∑n
j=1
Xj
2
(11 .14)
If X 1 ,... , X mare msample values occurring with frequencies f ̃ 1 ,... , f ̃m, the equa-
tion (11.14) can be expressed in the form
s^2 =n−^11
∑m
j=1
Xjf ̃j−^1 n
∑m
j=1
Xjf ̃j
2
(11 .15)