Compute confidence intervals