Chip Foundry Services Request Assessment

Confidence Interval Bootstrap

A bootstrap confidence interval gives a range of plausible values for a statistic using only resampling, with no formula for its standard error. The bootstrap supplies a distribution of the statistic from repeated resampling of the data; the interval methods below differ in how they turn that distribution into a range. The choice matters most when the data are skewed or the sample is small.

From resamples to a range:

Bootstrap distribution of the statistic
10,000 resampled means
Choose how to turn it into an intervalsame resamples, different corrections
Percentile
take the 2.5th and 97.5th percentiles
BCa
shift the percentiles for bias and skew
Studentized
resample a t-like ratio; often best for means
Check small-sample coverage
with few observations all bootstrap intervals run narrow

Percentile interval. The simplest method takes the middle $95\%$ of the bootstrap statistics. If $\hat{\theta}^{(b)}$ is the statistic from resample $b$, the interval is the $2.5\%$ and $97.5\%$ quantiles:

$$\left[\hat{\theta}^{(0.025)},\ \hat{\theta}^{(0.975)}\right]$$

It is easy to explain and invariant to monotone transformations, but it inherits any bias or skew in the bootstrap distribution.

BCa interval. The bias-corrected and accelerated interval reads off shifted percentiles. Writing $\Phi$ for the standard normal distribution function, $z_\alpha$ for its quantile, $z_0$ for the bias correction and $a$ for the acceleration, the adjusted level for each end is:

$$\alpha'=\Phi\!\left(z_0+\frac{z_0+z_\alpha}{1-a\,(z_0+z_\alpha)}\right),\qquad z_0=\Phi^{-1}\!\left(\frac{\#\{\hat{\theta}^{(b)}<\hat{\theta}\}}{B}\right),\qquad a=\frac{\sum_i d_i^3}{6\left(\sum_i d_i^2\right)^{3/2}}$$

Here $z_0$ measures how far the bootstrap median sits from the observed statistic, and $d_i$ is the leave-one-out jackknife deviation, so $a$ measures how the statistic's variability changes with its value. With $z_0=a=0$ this reduces to the percentile interval.

Worked example. The same ten chamber cleans as in the bootstrap entry, $4.1,\,4.4,\,4.6,\,4.9,\,5.0,\,5.3,\,5.8,\,6.5,\,8.2,\,11.9$ minutes, give a mean of $6.07$ and a sample skewness of $1.96$. Using $10{,}000$ resamples with seed $2026$, the three intervals for the mean are:

Method95% intervalWidth
Percentile bootstrap$[4.88,\ 7.62]$$2.74$
BCa bootstrap$[5.06,\ 8.23]$$3.17$
Classical t interval$[4.37,\ 7.77]$$3.40$

For this sample $z_0=0.092$ and $a=0.087$, so BCa reads the percentiles at $6.5\%$ and $99.5\%$ instead of $2.5\%$ and $97.5\%$. That moves the interval to the right, where the long tail of large values says the true mean could plausibly lie. The by-hand calculation matches scipy.

Same 10 cleaning times, three 95% intervals for the mean left: the intervals (observed mean 6.07 min); right: how often each method really covers the truth Intervals for the mean 4 5 6 7 8 9 mean cleaning time (minutes) t interval: 4.37 to 7.77 Percentile bootstrap: 4.88 to 7.62 BCa bootstrap: 5.06 to 8.23 Actual coverage, n = 10 (nominal 95%) 95% 92.7% t 88.3% percentile 88.7% BCa 600 simulated samples, skewed population with 10 skewed observations every method falls short of 95%; the bootstrap is not a cure for a small sample

A reality check on coverage. A $95\%$ interval should contain the true value in $95\%$ of repeated experiments. To test that, I simulated $600$ samples of $10$ cleaning times from a right-skewed lognormal population whose true mean is $5.93$, and checked each method. The classical t interval covered the truth $92.7\%$ of the time, the percentile bootstrap only $88.3\%$ and BCa $88.7\%$, with Monte Carlo error of about $\pm1.3$ points. The bootstrap intervals are narrower, on average $4.06$ and $4.35$ minutes against $5.03$ for the t interval, because resamples of ten values cannot reproduce the rare large values in the population.

Practical guidance.

  • Small samples: with fewer than about $30$ observations, bootstrap intervals tend to be too narrow, especially for skewed data. Do not treat the bootstrap as a way around having little data.
  • Prefer BCa or studentized: for means, medians and other smooth statistics, BCa is usually better than the plain percentile, and the bootstrap-$t$ often performs best.
  • Known failures: the bootstrap is unreliable for the minimum, the maximum and other extremes, and for heavy-tailed data where the mean barely exists.
  • Resample the right unit: for grouped or paired data, resample whole groups or pairs, otherwise the intervals will be too narrow.
  • Report the details: give the method, the number of resamples, and the seed. At least $5{,}000$ resamples are advisable for interval endpoints.
  • Compare methods: when the percentile, BCa and classical intervals disagree strongly, as here, that disagreement is itself information about how skewed the data are.

Read a bootstrap interval as the spread of answers you would get from your own data re-collected many times, adjusted for bias and skew, and remember that small, skewed samples can still make it too optimistic.