Fix confidence interval calculation