Calculating the margin of error