How to Calculate Standard Deviation
Step-by-step tutorial for computing the standard deviation of a set of numbers with an example.
The standard deviation is a statistic, a number that is calculated from another set of numbers. Other statistics include the mean and median, which tell you where the "center" is in a set of data. The standard deviation tells you how spread out the data is, how much it deviates from the center. People who crunch numbers for a living use statistical calculators and software to compute the standard deviation, but if you know the formula you can also compute it with a simple hand calculator.
The formula for the standard deviation of a set of numerical data is sqrt(∑(m-xi)2/n), where m is the mean of the set, the xi are the elements of the set, and n is the number of elements in the set. To be more accurate, this is the formula for population standard deviation. You use this formula when your data represents the entire sample space.
If your set of data is a merely a sample from a larger set, the formula for standard deviation is slightly different: sqrt(∑(m-xi)2/(n-1)). This is called, conveniently, the sample standard deviation. Notice that instead of dividing by n, you divide by n-1.This has the effect of slightly increasing the standard deviation. The larger the value of n, the less of a difference this makes.
Sample Exercise in Computing the Standard Deviation
Alice and Bob are thinking about selling their home. To come up with a reasonable selling price, they take a sample of other homes in their city that are for sale and are of a similar size and age. Here are the numbers they come up with:
The mean selling price of the 7 homes is $162,143. Since this is a sample of a larger set, they should use the second formula, sqrt(∑(162143-xi)2/6). The final answer is $41,217.
An anthropologist surveys all of the adult residents in a small village to find out how many different languages people can speak. Out of the 1000 adults, 681 speak only one language, 205 speak two languages, 109 speak three languages, 4 speak four languages, and 1 person can speak six languages.
The mean number of languages spoken by a person is [681*1 + 205*2 + 109*3 + 4*4 + 1*6]/1000 = 1440/1000 = 1.44.
The population standard deviation is sqrt(∑(1.44-xi)2/1000), or
sqrt[(681*(1.44-1)2 + 205*(1.44-2)2 + 109*(1.44-3)2 + 4*(1.44-4)2 + 1*(1.44-6)2)/1000]
= sqrt[(131.84 + 64.29 + 255.53 + 26.21 + 20.79)/1000]