Calculating standard deviation
Standard deviation measures how far data values typically lie from their mean. For the sample formula used here, calculate signed deviations, square them, divide their sum by n - 1, and take the non-negative square root
- Find the mean Add all values and divide by the number of values \(\displaystyle \bar{x}=\frac{4+6+8+10+12}{5}=8\)
- Use signed deviations Subtract the mean from each value; values below the mean have negative deviations \(\displaystyle \left(4-8,6-8,8-8,10-8,12-8\right)=\left(-4,-2,0,2,4\right)\)
- Square before adding Square every deviation so negative and positive deviations cannot cancel \(\displaystyle \left(-4\right)^{2}+\left(-2\right)^{2}+0^{2}+2^{2}+4^{2}=40\)
- Divide and take the root Divide the sum of the squared deviations by n - 1, then take the non-negative square root \(\displaystyle s=\sqrt{\frac{40}{5-1}}=\sqrt{10}\approx3.2\)
Worked example
The distances travelled to work by five employees are 8 km, 10 km, 12 km, 14 km and 16 km. Calculate the sample standard deviation, correct to 1 decimal place
- \(\displaystyle \bar{x}=\frac{8+10+12+14+16}{5}=\frac{60}{5}=12\)The five distances total 60 km, so the mean is 12 km
- \(\displaystyle \left(8-12,10-12,12-12,14-12,16-12\right)=\left(-4,-2,0,2,4\right)\)Subtract 12 from each distance in the order given to find the signed deviations
- \(\displaystyle \left(-4\right)^{2}+\left(-2\right)^{2}+0^{2}+2^{2}+4^{2}=40\)Square the deviations before adding them, so the negative and positive deviations do not cancel
- \(\displaystyle s=\sqrt{\frac{40}{5-1}}=\sqrt{10}\approx3.2\text{ km}\)Divide by one fewer than the five values, take the positive square root and round to 1 decimal place
Common mistakes
Difficulty levels
Questions about this topic
Why does the sample formula divide by n - 1?+
The sample mean is estimated from the same data, so the sample standard deviation formula uses n - 1 rather than n as its divisor
Can a standard deviation be negative?+
No. It is the non-negative square root of a non-negative variance. For a sample with at least two values it is zero exactly when all values agree
Why are the deviations squared?+
Without squaring, negative and positive deviations would cancel to zero. Squaring also gives larger distances a larger contribution to the spread measure
Which calculator standard deviation should I use?+
Use the one matching the task: sample s divides squared deviations by n−1; population standard deviation divides by n. Verify the function or setting
Does the sample formula work for one observation?+
No. Its divisor would be zero, so sample standard deviation is undefined
Can I use a calculator?+
A calculator is allowed unless a question is marked no calculator
Which year level and chapter is this?+
Year 12, VCE Units 3 & 4, General Mathematics, chapter 1: Data distributions