Estimates standard deviation based on a sample