Shortcut Method to Find Variance and Standard Deviation
13.5.4
Shortcut Method to Find Variance and Standard Deviation
Why a Shortcut Method is Needed
When the values of xi in a discrete distribution, or the mid-points of classes in a continuous distribution, are large numbers, the direct calculation of mean and variance becomes tedious and time-consuming. The step-deviation method simplifies this by shifting the origin to an assumed mean and reducing the scale by the class width.
The core idea is to transform the original variable x into a new variable y that has much smaller, simpler values. Once we compute the mean and variance for y, we can easily convert them back to the original scale.
Defining the Step-Deviation Variable
Let the assumed mean be A and let the class width (the size of each class interval) be h. For each observation xi (or each class mid-point in a continuous distribution), define the step-deviation yi as:
yi=hxi−A
This can be rearranged to express xi in terms of yi:
xi=A+hyi(1)
The variable yi is simply the number of steps (of width h) that xi is away from the assumed mean A. A negative yi means xi is below A, a positive yi means it is above A, and yi=0 when xi=A.
Deriving the Mean Using Step-Deviation
We know the formula for the mean of a grouped frequency distribution (where fi are the frequencies and N=∑fi):
xˉ=N1∑i=1nfixi(2)
Substitute xi=A+hyi from (1) into (2):
xˉ=N1∑i=1nfi(A+hyi)
xˉ=N1(∑i=1nfiA+∑i=1nfihyi)
Since A and h are constants, they can be taken out of the sums:
xˉ=N1(A∑i=1nfi+h∑i=1nfiyi)
We know that ∑i=1nfi=N. Therefore:
xˉ=N1(AN+h∑i=1nfiyi)
xˉ=A+h(N1∑i=1nfiyi)
The term in brackets is simply the mean of the y variable, which we denote as yˉ. So we arrive at the key result:
xˉ=A+hyˉ(3)
Important
The mean of the original variable x is the assumed mean A plus the product of the class width h and the mean of the step-deviation variable y.
Deriving the Variance Using Step-Deviation
The variance of x is defined as:
σx2=N1∑i=1nfi(xi−xˉ)2
Substitute xi=A+hyi from (1) and xˉ=A+hyˉ from (3):
σx2=N1∑i=1nfi[(A+hyi)−(A+hyˉ)]2
The A terms cancel:
σx2=N1∑i=1nfi(hyi−hyˉ)2
σx2=N1∑i=1nfi[h(yi−yˉ)]2
σx2=N1∑i=1nfih2(yi−yˉ)2
Since h2 is a constant, it can be taken out of the sum:
σx2=h2[N1∑i=1nfi(yi−yˉ)2]
The term in brackets is precisely the variance of the y variable, σy2. Therefore:
σx2=h2σy2(4)
Taking the square root gives the relationship for standard deviation:
σx=hσy(4)
Watch out
When converting variance back from the y scale to the x scale, you multiply by h2, not by h. The standard deviation is multiplied by h because it is the square root of the variance.
The Direct Formula for Standard Deviation
We can combine the results above into a single formula that does not require computing yˉ separately. Recall that the variance of y can be written as:
σy2=N1∑i=1nfiyi2−yˉ2
Substituting this into σx2=h2σy2:
σx2=h2(N1∑i=1nfiyi2−yˉ2)
Since yˉ=N1∑fiyi, we have:
σx2=h2(N1∑i=1nfiyi2−(N1∑i=1nfiyi)2)
Multiplying through by h2:
σx2=N2h2Ni=1∑nfiyi2−(i=1∑nfiyi)2(5)
And for standard deviation:
σx=NhNi=1∑nfiyi2−(i=1∑nfiyi)2(5)
Shortcut Method for Standard Deviation
σx=NhN∑fiyi2−(∑fiyi)2
where yi=hxi−A, A is the assumed mean, h is the class width, and N=∑fi.
Worked Example: Full Solution
Let us apply the shortcut method to the following distribution:
Classes
30-40
40-50
50-60
60-70
70-80
80-90
90-100
Frequency
3
7
12
15
8
3
2
Step 1: Choose the assumed mean and identify the class width.
Choose A=65 (a value near the centre of the distribution). The class width is h=10 (each interval spans 10 units).
Step 2: Compute the mid-points and step-deviations.
For each class, find the mid-point xi and then compute yi=10xi−65.
Class
Frequency fi
Mid-point xi
yi=10xi−65
yi2
fiyi
fiyi2
30-40
3
35
−3
9
−9
27
40-50
7
45
−2
4
−14
28
50-60
12
55
−1
1
−12
12
60-70
15
65
0
0
0
0
70-80
8
75
1
1
8
8
80-90
3
85
2
4
6
12
90-100
2
95
3
9
6
18
Total
N=50
∑fiyi=−15
∑fiyi2=105
Step 3: Compute the mean using xˉ=A+hyˉ. …
Table 13.11Mean, variance and standard deviation by the shortcut method