Bootstrap Confidence Intervals: Percentile vs BCa (with Examples)
The percentile interval reads the 2.5th and 97.5th percentiles of the bootstrap replicates. The BCa (bias-corrected and accelerated) interval reads different percentiles, shifted by a bias correction from the share of replicates below your estimate and an acceleration from the jackknife. The two agree when both corrections are near zero, as for a mean of roughly symmetric data. For skewed or biased statistics such as a standard deviation they can differ a lot, and BCa is usually the more accurate.
Last updated · by the simstat.com editorial team · How we write
Two ways to read the same replicates
A bootstrap confidence interval starts from the bootstrap distribution: you resample your data with replacement many times, compute the statistic on each resample, and look at the spread of the results. If that idea is new, read our plain-English guide to bootstrapping first; this page assumes it and compares the two intervals most software offers.
The percentile interval is the obvious one. For a 95% interval, sort the replicates and read off the 2.5th and 97.5th percentiles. It quietly assumes that the bootstrap distribution is centred on your estimate and that its spread would be the same whatever the true value is.
The BCa interval (bias-corrected and accelerated) uses the same replicates but reads different percentiles. It was introduced by Efron in 1987, and Efron and Narasimhan (2020) describe its two adjustments: a bias corrector that “allows for a bias” in the estimate, and an acceleration that “allows for non-constant variance”.
The intuition behind ẑ₀ and â
The bias correction ẑ₀ asks: what share of the replicates fall below the estimate from your sample? If the bootstrap distribution were centred on your estimate, about half would. Efron and Narasimhan (2020) turn that share into a normal score, so a share of one half gives ẑ₀ = 0. If clearly more than half fall below, the statistic tends to come out too low, and BCa moves the interval up; if fewer than half fall below, it moves the interval down. Hesterberg (2014) notes that this share is related to median bias and is “not sensitive to transformations” of the statistic.
The acceleration â asks: does the standard error of the statistic change with the value of the thing being estimated? For a standard deviation it does: multiply every value in a population by two and both the standard deviation and the standard error of its estimate double. Hesterberg (2014) calls this kind of mean–variance relationship acceleration. When the standard error grows with the parameter, a good interval should reach further on the side where the parameter is larger. Hesterberg (2015) puts it this way: where the bootstrap spread depends on the statistic, a good interval “needs to be asymmetric in the same direction as the data”. Efron and Narasimhan (2020) note that the acceleration cannot in general be read from the bootstrap histogram, so it is estimated with the jackknife: recompute the statistic leaving out one observation at a time, and measure how lopsided those leave-one-out values are.
When ẑ₀ and â are both zero, BCa gives back the percentile interval exactly: Efron and Narasimhan (2020) describe the percentile method as BCa with both set to zero.
The formulas
Write θ̂ for the statistic in your sample and for the B bootstrap replicates, and for the p-th quantile of the replicates. Φ is the standard normal cumulative distribution function and its p-th quantile. The confidence level is 1 − α; for a 95% interval, = 1.96. The percentile interval is
BCa reads the replicates at adjusted levels α₁ and α₂ instead (Efron and Narasimhan, 2020):
where
The bias correction is the normal score of the proportion of replicates below θ̂:
For the acceleration, let θ̂₍ᵢ₎ be the statistic computed with observation i left out, θ̂₍·₎ the average of those n values, and dᵢ = θ̂₍·₎ − θ̂₍ᵢ₎. Then
This is the jackknife estimate of the acceleration, one-sixth of a scaled skewness of the dᵢ. Mind the sign: Efron and Narasimhan (2020) print the differences the other way round, as θ̂₍ᵢ₎ − θ̂₍·₎, which would flip the sign of â, but their own bcaboot R package computes them as above, and so does R’s boot package. With this sign convention, â is positive when leaving out one observation pulls the statistic down much further than leaving out any other pushes it up. Our calculator uses exactly these formulas, and interpolates between replicates the way R’s boot package does.
Worked example: the standard deviation
Take the seven survival times, in days, of the treatment group in Efron and Tibshirani’s (1993) mouse experiment: 94, 197, 16, 38, 99, 141, 23. Our guide to bootstrapping builds intervals for their mean. Here the target is their standard deviation, a statistic whose percentile and BCa intervals part company.
Worked example: percentile vs BCa for the standard deviation
Settings. The calculator’s defaults: B = 10,000 resamples and a 95% level, statistic “Standard deviation”, seed 1987. The sample standard deviation is θ̂ = 66.77 days.
Replicates. The 10,000 bootstrap standard deviations average 60.05 days, below θ̂, and their standard deviation (the bootstrap standard error) is 14.13. Resamples repeat some values and miss others, which tends to shrink their spread.
Bias correction. 6,459 of the 10,000 replicates, or 64.6%, are below 66.77. So ẑ₀ = Φ⁻¹ of that share = 0.374.
Acceleration. Leaving out the largest survival time, 197 days, drops the standard deviation to 50.19; leaving out any other value gives between 64.64 and 73.06. That one lopsided value makes the leave-one-out values skewed, and the formula gives â = 0.087.
Adjusted levels. Instead of the 2.5th and 97.5th percentiles, BCa reads the 15.42th and 99.95th percentiles of the same replicates.
| 95% interval | Percentiles read | Lower (days) | Upper (days) |
|---|---|---|---|
| Percentile | 2.5, 97.5 | 32.3 | 84.1 |
| BCa | 15.42, 99.95 | 45.0 | 94.9 |
For contrast, the mean of the same data with the same settings and seed gives ẑ₀ = 0.002 and â = 0.029. BCa then reads the 3.21th and 98.13th percentiles, and the two intervals for the mean are close: 43.1 to 134.7 days (percentile) and 45.1 to 137.6 days (BCa).
To reproduce this, open the calculator (the mouse data are already filled in), choose “Standard deviation”, leave 10,000 resamples and 95%, and type 1987 in the seed box. The tool prints the adjusted levels as 15.4 and 99.95 (to two decimals when a level is below 1 or above 99) and, because the upper level is above 99.5, warns that this end of the interval rests on very few resamples. Our test suite also feeds these same replicates, with the same jackknife acceleration, to the boot package in R, and its BCa and percentile intervals agree with ours.
Why BCa moved the interval up
Both corrections push in the same direction here. The replicates sit mostly below θ̂, and a sample standard deviation is itself biased: Hesterberg (2014) notes that the sample variance is unbiased but “s is not”. A percentile interval inherits that downward lean. A positive ẑ₀ tells BCa that the statistic tends to come out low, so it slides both percentiles up. On its own (â = 0) it would read the 11.29th and 99.66th percentiles, giving 40.5 to 90.3 days, an interval that still reaches further below θ̂ than above it.
The positive acceleration says that larger true standard deviations come with larger standard errors. If the true value were near the top of the plausible range, samples would vary more, so the interval has to reach further above θ̂ than below it. Adding â moves the levels on to 15.42 and 99.95. The result, 45.0 to 94.9 days, sits higher than the percentile interval and, unlike it, is longer above θ̂ than below.
Efron and Narasimhan (2020) note that BCa intervals are transformation invariant and, under reasonably general conditions, second-order accurate. Hesterberg (2015) describes the percentile interval as only first-order accurate. “Usually the more accurate” is still the honest summary; with 7 observations neither interval is reliable, as the next sections show.
How many resamples?
Random resampling adds its own noise: a different seed gives slightly different endpoints. Hesterberg (2015) works out that about 15,000 resamples are needed for a percentile endpoint’s tail probability to be within 10% of its target with 95% probability, and recommends 10,000 for routine use, and more if results are borderline. He also notes that Efron and Tibshirani (1993) had suggested 1,000 for confidence intervals. Efron and Narasimhan (2020) use 2,000 in most of their examples and warn that “Bca endpoints are limited to the range of the observed” replicates, so they cannot be trusted when the formula calls for extreme percentiles.
Our example shows why BCa is the more demanding of the two. The upper BCa level is the 99.95th percentile, so with 10,000 resamples the tool reads the upper endpoint between the 5th-largest and the 4th-largest replicate. With 1,000 resamples only about 0.5 of a replicate is expected beyond that level, so the tool has to use the largest one and warns that you need more resamples. Here is how far the endpoints moved over 5 seeds (1987 to 1991) at three values of B:
| Resamples | Percentile lower | Percentile upper | BCa lower | BCa upper | Runs with a warning |
|---|---|---|---|---|---|
| 1,000 | 30.5 to 34.3 | 83.3 to 85.3 | 42.6 to 47.3 | 93.2 to 95.8 | 5 |
| 5,000 | 31.0 to 33.3 | 83.8 to 84.1 | 43.4 to 45.2 | 93.7 to 95.8 | 0 |
| 10,000 | 31.8 to 32.3 | 83.8 to 84.1 | 44.1 to 45.0 | 94.1 to 96.3 | 0 |
At 1,000 resamples every endpoint wobbles. By 10,000 the percentile endpoints have settled to within a fraction of a day, but the BCa upper endpoint, which lives in the far tail, still moves by more than the BCa lower one. A practical rule, in the spirit of Hesterberg’s (2015) advice: use at least 10,000 resamples, our calculator’s default, for a BCa interval you intend to report, and rerun with a second seed to see how far resampling noise alone moves the endpoints. If an endpoint moves in the digits you plan to report, increase B.
Small samples: what neither interval fixes
A sample of 7 is very small. Hesterberg (2015) shows that for a mean the bootstrap standard error is too small by a factor √((n − 1)/n), here 0.926, and that percentile intervals “tend to be too narrow and under-cover in small samples”. BCa does not cure this: Hesterberg (2014) notes that it adjusts for skewness and median bias but “has no adjustment for narrowness or variation in SE”. Our calculator shows a small-sample warning below 15 values for this reason. Treat both intervals from seven mice as optimistic, and the gap between them as a sign of how much the shape of the bootstrap distribution matters. Our guide to bootstrapping shows how unstable small-sample intervals for a median can be.
How to report it
The standard deviation of survival in the treatment group was 66.77 days (95% BCa bootstrap confidence interval 45.0 to 94.9 days; 10,000 resamples, seed 1987; jackknife acceleration; percentile interval 32.3 to 84.1 days).
A reader needs:
- the statistic and its value in the sample;
- the interval method (BCa or percentile) and the confidence level;
- the number of resamples and the seed, so the run can be repeated;
- the software, and for BCa how the acceleration was estimated;
- the sample size, especially when it is small.
Common mistakes
Reporting “a bootstrap interval” without naming the method. As the example shows, percentile and BCa can give clearly different answers from the same replicates. Say which one you used.
Using too few resamples for BCa. BCa often reads percentiles far into the tails, where a few replicates decide the endpoint. If the adjusted levels are close to 0 or 100, or the tool warns that an endpoint used the most extreme replicate, increase B.
Expecting identical BCa results from different software. The acceleration can be estimated in more than one way. Our calculator uses the jackknife formula above; a program that estimates it differently can give a slightly different BCa interval for a median or standard deviation from the same replicates. Report how â was estimated.
Reading BCa as a fix for small samples. It corrects for bias and skewness, not for the narrowness that comes from having few observations.
Choosing the interval, or the seed, after looking at the results. Decide on the method and B in advance. If two seeds give different conclusions, that is Monte Carlo noise (randomness from the resampling itself, not from your data): increase B instead of picking the run you like.
Reaching for an interval when the question is a test. A bootstrap interval describes how precisely one group’s statistic is estimated. If the question is whether treatment and control differ, a permutation test answers it directly: our guide to permutation tests explains how, and the permutation test calculator runs one.
Where next
Our calculator’s note on when the two intervals differ summarises this page next to the tool. The resampling hub collects the other guides and tools on simulation-based methods, and the bootstrapping guide covers the basics and the bootstrap standard error.
References
- Efron, B. & Narasimhan, B. (2020). The Automatic Construction of Bootstrap Confidence Intervals. Journal of Computational and Graphical Statistics, 29(3), 608–619 (doi:10.1080/10618600.2020.1714633; free author manuscript at PubMed Central).
- Efron, B. & Narasimhan, B. (2021). bcaboot: Bias Corrected Bootstrap Confidence Intervals (R package version 0.2-3). CRAN.
- Hesterberg, T. C. (2015). What Teachers Should Know About the Bootstrap: Resampling in the Undergraduate Statistics Curriculum. The American Statistician, 69(4), 371–386 (doi:10.1080/00031305.2015.1089789; open access at PubMed Central).
- Hesterberg, T. (2014). What Teachers Should Know about the Bootstrap: Resampling in the Undergraduate Statistics Curriculum (preprint, longer version). arXiv preprint arXiv:1411.5279.
- Efron, B. & Tibshirani, R. J. (1993). An Introduction to the Bootstrap. Chapman & Hall/CRC.
Try it
- Bootstrap confidence interval: Resample your data to get percentile and BCa confidence intervals for a mean, median or standard deviation.
- Permutation test: Test a difference in means or medians between two groups by shuffling group labels, exactly or by simulation.