Math.do

Statistics worked example

Calculate sample standard deviation

Find the sample standard deviation of eight values by computing the mean, squared deviations, and sample variance.

Question

What is the sample standard deviation of 2, 4, 4, 4, 5, 5, 7, and 9?

Step-by-step solution

For a sample, divide the sum of squared deviations by n − 1 before taking the square root. The data are 2, 4, 4, 4, 5, 5, 7, 9.

Step 1: Find the mean

The eight values sum to 40, so the mean is 40/8 = 5.

Step 2: Square each deviation from the mean

Subtract 5 from each value and square: 9, 1, 1, 1, 0, 0, 4, 16. Their sum is 32.

Step 3: Calculate the sample variance and standard deviation

There are n = 8 values. The sample variance is s² = 32/(8 − 1) = 32/7 ≈ 4.5714.

The sample standard deviation is s = √(32/7) ≈ 2.14.

If these eight values make up the entire population instead, divide by n = 8. The population standard deviation would be √(32/8) = 2.