Formula for calculating standard deviation in statistics