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 one fewer than the number of values, 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 one fewer than the number of values, 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 one fewer than the number of values?+
The sample mean is estimated from the same data, so the sample standard deviation formula divides by one fewer than the number of values
Can a standard deviation be negative?+
No. The squared deviations have a non-negative sum, and the standard deviation is the non-negative square root of that value. It is zero only when all values are equal
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
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, Mathematical Methods, chapter 14: Statistical inference