When the statistic is not a simple mean, such as a median, a ratio, or the minimum of several scores, a formula may not exist.
The bootstrap gives a general method (Efron, 1979). Resample the units with replacement to form many pseudo-datasets, compute the statistic on each, and use the spread of the results as the sampling distribution. The simplest version, the percentile bootstrap, reports the 2.5th and 97.5th percentiles of the resampled statistic as a 95% interval.
The rule that matters most is to resample the unit that is exchangeable, which here is the task, not the attempt. Resampling attempts independently repeats the pooled-interval mistake. The library function bootstrap_ci resamples whatever units you pass in; pass it task-level values.
The bootstrap has its own failure modes. It performs poorly with very few units, for extreme statistics such as a maximum, and for strongly skewed quantities in small samples. Treat it as a flexible default, not a guarantee, and prefer a formula when one exists.
Continue with the book
Explore the full treatment, worked examples, and exercises in Next-Generation AI, Explained and Evaluated.
Companion article for Next-Generation AI, Explained and Evaluated, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
