Summary
The bootstrap recomputes a statistic after drawing observed sampling units with replacement. Its empirical resampling distribution can approximate sampling uncertainty under appropriate sampling, dependence, and estimator conditions. Choose the target population and independent unit first; more simulated replicates cannot repair missing population information.
Choose the resampling unit
The independent unit may be larger than one row.
| Data structure | Resampling unit |
|---|---|
| Independent examples | example |
| Many events per user | user |
| Documents split into passages | document |
| Queries with many candidates | query |
| Time series | time block |
| Multi-seed training study | seed or complete run |
For a mechanics fixture, independent users U1, U2, and U3 have paired model differences respectively. Each user has two perfectly correlated events with that same difference; the target is the equal-user mean, zero. Draw U3, U1, U3 and carry both events and both model outcomes whenever a user is selected. The replicate user mean is .
Resampling unit
Valid user-level bootstrap compared with invalid event-row bootstrap
Reference drawing
Resampling unit
Resample users with all their paired events, not isolated rows
Derivation
Nonparametric bootstrap
With independent units and statistic , draw unit indices with replacement and recompute . Repeat times while preserving the same estimand and within-unit structure. An original unit is omitted with probability , approaching . The familiar inclusion figure is an asymptotic expectation, not an exact count in each replicate.
The three-user fixture has equally likely ordered draws. Replicate sums have counts ; divide each sum by three. Their probability-weighted mean is zero and variance is , giving standard deviation . Equivalently, the empirical user variance is divided by three independent empirical draws. This exact conditional distribution illustrates mechanics; three users do not establish reliable interval coverage.
Standard error and confidence intervals
For randomly simulated replicates, estimate bootstrap standard error by their sample standard deviation. Exact enumeration instead uses the probability-weighted variance over all possible draws, as above. A percentile interval uses empirical quantiles, conventionally and for a nominal interval. Nominal coverage is not guaranteed; bias, skewness, dependence, and estimator irregularity matter. Increasing reduces simulation error, not the original sampling uncertainty.
Paired model comparison
For models scored on the same units, retain within every resampled unit. Breaking pairing changes the resampling distribution; it need not always widen the interval. For the fixture, incorrectly drawing six detached events gives mean variance , half the user-bootstrap variance. Decide whether prompts, raters, users, or training runs supply the independence relevant to the desired uncertainty.
Change Cluster Sizes
New task: Give U1 and U2 one event each, but U3 eight events.
Picture and change: Retain user means for equal-user performance. For event-weighted performance, divide summed event differences by selected event count.
Check: Equal-user effect remains zero; observed event-weighted effect is . For draw U3, U1, U3, those estimators give versus .
Use when: Unequal exposure changes whether the target represents a random user or a random event.
Preserve Time Dependence
New task: Resample [0,0,1,1] with dependence inside length-two blocks.
Picture and change: Draw whole blocks [0,0] and [1,1], retaining paired outcomes.
Check: Drawing both blocks gives mean ; drawing the first twice gives zero.
Use when: Relevant local dependence fits the declared block length and stationarity assumptions.
Block and cluster bootstrap
A cluster bootstrap samples whole groups. It preserves dependence within each group and assumes groups are approximately independent.
A block bootstrap samples contiguous time windows. It preserves short-range temporal dependence. The block length must be long enough to retain relevant correlation, but short enough to provide enough distinct blocks.
For hierarchical data, a multi-stage bootstrap can sample users first and events within selected users second. State the population that each stage represents.
Worked example
As a separate hypothetical decision illustration, two fixed classifiers differ by positive accuracy percentage points on one thousand examples. Suppose a suitable paired analysis reports interval points. These illustrative endpoints are not computed from the three-user fixture or unspecified per-example outcomes. The result includes possible losses; a launch still needs decision thresholds, guardrails, and an appropriate uncertainty argument.
When the bootstrap fails
The ordinary bootstrap can fail when:
- observations are dependent but rows are resampled independently;
- the sample is too small to represent rare outcomes;
- the estimator changes discontinuously near a boundary;
- extreme values dominate a heavy-tailed statistic;
- classes or slices absent from the sample matter in deployment;
- the data was selected by a policy that hides unobserved outcomes.
Resampling cannot create population coverage that the original sample lacks. It only reuses observed information.
In an interview
Use this order:
- Name the statistic and target population.
- Choose the independent resampling unit.
- Preserve model pairing.
- Describe the resample-and-recompute loop.
- Report the effect and interval.
- Discuss dependence, rare events, and sample coverage.
Choose replicate count from the required simulation accuracy, particularly for tail quantiles, after establishing a defensible sampling unit. Fixed-model example resampling does not by itself capture variation from retraining with different seeds or datasets.
Common mistakes
- Resampling rows when users or documents are the independent units.
- Breaking paired comparisons.
- Calling the bootstrap distribution a posterior distribution.
- Reporting an interval without the effect estimate.
- Treating resampling as a fix for biased data.
- Ignoring seed variation in model training.
Practice next
Apply paired resampling in hypothesis testing and confidence intervals, reproducible model comparison, and paper critique.