Calculate confidence intervals for percentiles