step deviation method to find mean