SOP: Computation of Mean, Variance, Standard Deviation, Standard Error and Coefficient of Variation
GIFSQ — Global Institute for Food Safety & Quality
Principle
A sample drawn from a lot is measured, and the quantities computed from the sample data — the statistics — are used to describe the lot. The arithmetic mean locates the centre of the data, the variance and its square root, the standard deviation, measure the scatter about the mean, the standard error of the mean measures how far the sample mean is likely to differ from the true lot mean, and the coefficient of variation allows sets of data with widely differing means to be compared.
Materials
- The set of individual observations (scores) x₁, x₂, …, xₙ
- For comparing two sets, the statistics of both sets
Procedure
Add all the individual observations to obtain the sum Σx
↓
Divide the sum by the number of observations n to obtain the arithmetic mean x̄
↓
Square each observation and add the squares to obtain Σx²
↓
Compute the sample variance s² from Σx², (Σx)² and n using the expression below
↓
Take the square root of the variance to obtain the standard deviation s
↓
Divide the standard deviation by the square root of n to obtain the standard error of the mean
↓
Divide the standard deviation by the mean (and multiply by 100 for per cent variability) to obtain the coefficient of variation
↓
For two independent sets of data, combine their standard errors to obtain the standard error of the difference between the two means
Calculation
Arithmetic mean:
x̄ = Σx / n
Variance (computational form):
s² = [Σx² − (Σx)²/n] / (n − 1)
Standard deviation:
s = √s²
Standard error of the mean:
S.E.(x̄) = s / √n
Coefficient of variation and per cent variability:
C.V. = s / x̄
% Variability = C.V. × 100
Standard error of the difference between two independent means:
S.E.(A − B) = √(SE_A² + SE_B²)
Where,
- x̄ = arithmetic mean
- Σx = sum of the individual observations
- n = number of observations
- s² = sample variance
- Σx² = sum of the squares of the individual observations
- s = standard deviation
- S.E.(x̄) = standard error of the mean
- C.V. = coefficient of variation
- SE_A, SE_B = standard errors of the two means
Worked example
Two sets of ten scores each:
Set A: 5, 7, 6, 5, 6, 4, 3, 7, 5, 5 — Σx = 53, x̄ = 5.3, Σx² = 295
Set B: 3, 2, 3, 6, 5, 4, 5, 6, 4, 2 — Σx = 40, x̄ = 4.0, Σx² = 180
Set A: s² = (295 − 53²/10)/9 = 1.5667; s = 1.25; S.E.(x̄) = 1.25/√10 = 0.396; % Variability = (1.25/5.3) × 100 = 23.6%
Set B: s² = (180 − 40²/10)/9 = 2.2222; s = 1.49; S.E.(x̄) = 1.49/√10 = 0.471; % Variability = (1.49/4.0) × 100 = 37.3%
Standard error of the difference between the means: S.E.(A − B) = √(0.396² + 0.471²) = 0.616
Note: the book’s computation table for this example is illegible in the available copy; the figures above are recomputed from the book’s own data. The fragmentary printed values that can be read (0.396, 0.47, 0.616) agree with the recomputation.
Precautions
- Standard deviations should not be compared directly when two or more sets of data have widely differing means; use the coefficient of variation instead.
- As n becomes larger, the sample mean approaches the true mean of the population ever more closely; small samples need the allowance for chance described above.
References
Ranganna, S., Handbook of Analysis and Quality Control for Fruit and Vegetable Products, 2nd edition.