Calculation of the confidence interval