Calculation of standard deviations from the mean