If the bias of a statistic has the form a/n + b/n² + … (equation (3.2)), then recomputing it on the n data sets with one observation left out, T(−i), and setting bjack = (n − 1)(T̄ − Tn) estimates the bias up to O(1/n²), so the corrected Tjack = Tn − bjack has bias of order 1/n² only. Panel (a) shows the two biases over R simulated data sets for five sample sizes, with the exact curves where they are known; panel (b) shows the leave-one-out values and the pseudo-values Ti = nTn − (n − 1)T(−i) of one data set.
Data set r (r = 0, 1, …) of each size comes from its own seeded generator (seed + 7919 r); panel (b) shows data set 0. Exponential draws are −log U; Normal draws use the Box–Muller method; the correlated pairs are (Z1, ρZ1 + √(1 − ρ²) Z2) with ρ = 0.5. The error bars are ±2 Monte Carlo standard errors. Exact biases: E(1/X̄m) = m/(m − 1) for exponential data and E exp(X̄m) = exp(1/(2m)) for standard Normal data, applied with m = n and m = n − 1.
code/ch03_bootstrap_jackknife.py (jackknife, jb_true, jb_demo).