Revision on calculating the average and standard deviation