How To Calculate Standard Deviation
First, you need to determine the mean. The mean of a list of numbers is the sum of those numbers divided by the quantity of items in the list (read: add all the numbers up and divide by how many there are).
Then, subtract the mean from every number to get the list of deviations. Create a list of these numbers. It’s OK to get negative numbers here. Next, square the resulting list of numbers (read: multiply them with themselves).
Add up all of the resulting squares to get their total sum. Divide your result by one less than the number of items in the list.
To get the standard deviation, just take the square root of the resulting number
I know this sounds confusing, but just check out this example:
your list of numbers: 1, 3, 4, 6, 9, 19
mean: (1+3+4+6+9+19) / 6 = 42 / 6 = 7
list of deviations: -6, -4, -3, -1, 2, 12
squares of deviations: 36, 16, 9, 1, 4, 144
sum of deviations: 36+16+9+1+4+144 = 210
divided by one less than the number of items in the list: 210 / 5 = 42
square root of this number: square root (42) = about 6.48
Cách tính standard deviation sử dụng R languague: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/sd.html