more cleanly separated stddev calc from sum_sq_diff; made square more efficient
changed the for loop to a more efficient list comp
resolved conflict in calc_stddev