Nested resampling uses each outer bootstrap sample as the inner sampling pool. An exact median example separates this mechanism from bias refinement and confidence-interval calibration.
Double bootstrap
The double bootstrap is a nested resampling procedure: draw bootstrap samples from the observed data, then draw further bootstrap samples from each first-level sample. A quant can use the second layer to investigate errors in a first bootstrap approximation—for example, to refine a bias estimate or calibrate a confidence interval. The extra computation supplies no new market observations. McCarthy et al., §2.2.
The inner sample has a parent
In the ordinary nonparametric bootstrap, the observed sample defines an empirical distribution, F^n. An outer sample Xb∗ consists of n draws with replacement from that distribution. It defines its own empirical distribution, F^n,b∗. The inner samples belong to that particular outer sample:
Xb∗∼F^n⊗n,Xb,c∗∗∣Xb∗∼(F^n,b∗)⊗n.
Here ⊗n means n independent draws from the indicated empirical law, conditional on its data. Recompute the statistic on both levels. The nesting follows Chang and Hall, §2.2. Drawing both levels directly from the original pool instead would repeat the first bootstrap experiment; it would lose the changing inner law.
An exact three-observation example
Take fictional observations (0,1,4) and use the sample median, initially 1. Each outer sample has three ordered draws. There are 33=27 equally likely outer index sequences.
One possible outer sample is (0,0,4), with median 0. Its inner empirical distribution places mass 2/3 at 0 and 1/3 at 4. Repeated observations retain their multiplicity: sampling uniformly from the two distinct values would be a different procedure. The value 1 has disappeared from this branch.
The inner median is 4 exactly when at least two of the three inner draws equal 4:
P(θ^∗∗=4∣X∗=(0,0,4))=3(31)232+(31)3=277.
Otherwise the inner median is 0. Its conditional expectation is therefore
E[θ^∗∗∣X∗=(0,0,4)]=02720+4277=2728.
Exact toy data 0, 1, 4 produce one outer sample 0, 0, 4. Inner draws from that outer sample have mass 2/3 at 0 and 1/3 at 4; the inner median is 0 on 20 of 27 index paths and 4 on 7 of 27, giving conditional mean 28/27.
The second layer resamples the chosen outer sample, including its repeated values. Value 1 cannot reappear on this branch.
Enumerating every outer sample and then all 27 inner index sequences for each gives 27×27=729 nested paths. Some paths produce the same values; they still count separately because they correspond to different position draws.
Median value
Outer paths, out of 27
Nested paths, out of 729
0
7
231
1
13
267
4
7
231
Thus, conditional on the original observed sample,
E[θ^∗]=2741≈1.5185,E[θ^∗∗]=243397≈1.6337.
The second expectation averages the inner expectations over all outer samples; it is different from the branch-specific 28/27. Neither number is a corrected estimate by itself. No population distribution has been specified, so this arithmetic cannot establish the median estimator's true bias or an interval's coverage. The tiny, discrete example demonstrates nesting, not an asymptotic refinement guarantee.
What the second layer is used to adjust
The resampling structure does not dictate a universal correction formula. Two uses have different targets:
Bias refinement: use the inner layer to estimate the bias of a bootstrap bias estimate. Chang and Hall treat this separately from interval construction, under a smooth-function model. Their results cannot simply be transferred to this three-point median example. Chang and Hall, §§2–3.
Interval calibration: one calibrated-percentile construction treats the original estimate as the bootstrap world's target. Across outer samples, it checks how often inner percentile intervals contain that target, chooses the percentile levels to achieve the desired bootstrap coverage, and applies those levels to the outer statistic distribution. Studentized constructions instead use a statistic scaled by an estimated standard error. These choices need their own calibration rules; pooling all inner statistics and taking ordinary percentiles does not implement them. McCarthy et al., §2.2.
Higher coverage accuracy depends on the chosen construction and its regularity conditions. Even a formally valid large-sample refinement need not improve a particular small-sample interval. Degenerate inner samples can also make estimated standard errors zero, obstructing studentization. McCarthy et al., §§2.1–2.2.
With B outer and C inner samples per outer sample, the straightforward implementation computes B outer statistics and BC inner statistics. Increasing those counts reduces simulation noise in the resampling calculation; it does not enlarge the original dataset or fix its selection bias. For serially dependent returns, observation-by-observation resampling can destroy the relevant dependence at either level. A dependence-aware design, such as an appropriate block bootstrap, needs justification at both levels.
For the first-level workflow, Simulation and Resampling develops bootstrap standard errors and percentile intervals, and separates simulation noise from sample uncertainty. The preview is public; the full lesson requires membership.