Bootstrap vs. Analytic CIs: When and Why They Diverge
Statistics & ExperimentsModel answerLast updated
Diagnose when a standard analytic confidence interval breaks down and construct a bootstrap CI from first principles, explaining the assumptions and trade-offs of each approach.
Context
You are a data scientist at a streaming platform. A product team ran a 4-week A/B test on a new recommendation algorithm. The primary metric is revenue per user per week, which is highly right-skewed: most users generate $0, a small fraction generate large amounts, and a handful of "whale" users generate very large amounts.
After the experiment, an analyst on the team computes a 95% confidence interval for the difference in means (treatment minus control) using the standard formula:
CI = (x̄_T - x̄_C) ± 1.96 * sqrt(s_T²/n_T + s_C²/n_C)
The analyst reports: CI = [$0.02, $0.18], n_T = n_C = 800, and concludes the treatment is significantly better.
You are skeptical.
What You Are Expected to Do
-
Identify at least three concrete reasons why the standard analytic CI may be unreliable here, referencing the statistical assumptions it rests on.
-
Describe, step by step, how you would construct a percentile bootstrap CI and a bias-corrected and accelerated (BCa) bootstrap CI for the same quantity. Be precise about what you resample, what statistic you compute each iteration, and how you extract the interval.
-
Explain what the bootstrap is actually doing — what theoretical guarantee does it invoke, and what are its own failure modes in this setting?
-
If the bootstrap CI turns out to be [$0.04, $0.31] — wider and shifted right compared to the analytic CI — walk through the most likely statistical explanations for why this happened.
-
Recommend a final reporting strategy, including any additional robustness checks you would run before presenting results to the product team.
There is no single numerical answer to compute — you are assessed on your reasoning, statistical depth, and practical judgment.
Hints
Hint 1
Think carefully about what the Central Limit Theorem requires in terms of sample size *relative to the skewness* of the distribution — 800 users may not be enough when variance is dominated by a few whales.
Hint 2
For the bootstrap, be precise: you resample *with replacement* from the observed sample, not from a fitted parametric distribution. The percentile method and BCa method differ in how they handle bias and skewness of the bootstrap sampling distribution of the statistic.
Hint 3
A shift in the CI (not just widening) is a signal of bias in the analytic estimator's sampling distribution — think about what BCa corrects for and how the jackknife acceleration factor is related to the influence of individual observations.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
1. Why the Analytic CI May Be Unreliable
The formula x̄ ± 1.96 * SE rests on several assumptions that are likely violated here.
a) CLT Convergence Is Slow Under Heavy Skew
The Central Limit Theorem guarantees that sqrt(n)(x̄ - mu) converges to Normal eventually, but the rate depends on the third and fourth moments. For a heavy-tailed revenue distribution the skewness coefficient gamma_1 = mu_3 / sigma^3 can easily exceed 3–5. By the Berry-Esseen theorem, the approximation error in the CDF is bounded by C * gamma_1 / sqrt(n). With n = 800 and gamma_1 = 4, this bound is roughly 0.15, meaning the tails of the sampling distribution may still be meaningfully non-Normal. A 95% interval that assumes Normality could be miscovering at 91–92%.
b) Variance Estimation Is Unstable
The sample variance s² is estimated from the same skewed data. When a distribution has heavy tails, s² is itself a high-variance estimator — its sampling distribution depends on the fourth moment. Underestimating s² (which is common when your sample doesn't catch the whale observations) directly narrows the CI.
c) The Welch/Satterthwaite Approximation Is for Means, Not Differences of Skewed Means
The formula implicitly treats the difference in sample means as symmetrically distributed around the true difference. With skewed distributions the sampling distribution of x̄_T - x̄_C can itself be asymmetric, so a symmetric interval centered on the observed difference is misspecified — it may systematically miss the upper tail.
d) Outlier Sensitivity
With ~800 users, even one or two "whale" users in one arm can shift x̄ substantially. The analytic CI has no resistance to this; it will fluctuate wildly across hypothetical reruns of the experiment.
2. Constructing Bootstrap CIs Step by Step
Percentile Bootstrap
- From the treatment sample of n_T = 800 observations, draw a resample of size 800 with replacement. Do the same independently from the control sample.
- Compute
delta* = x̄*_T - x̄*_Cfor this bootstrap replication. - Repeat B = 10,000 times, storing all
delta*_b. - Sort the B values. The 95% percentile CI is
[delta*_(0.025*B), delta*_(0.975*B)], i.e., the 2.5th and 97.5th empirical percentiles.
This is straightforward but assumes the bootstrap sampling distribution is symmetric around the observed statistic — which it may not be for skewed data.
Bias-Corrected and Accelerated (BCa) Bootstrap
BCa corrects for two things: median bias (the bootstrap distribution median differs from the observed statistic) and non-constant variance (the SE of the statistic changes with the parameter value).
Bias-correction factor z_0:
Count the fraction of bootstrap replicates where delta*_b < delta_hat (the observed difference). Call this proportion p_0. Then z_0 = Phi^{-1}(p_0), where Phi is the standard Normal CDF. If the bootstrap distribution is centered on delta_hat, then p_0 = 0.5 and z_0 = 0.
Acceleration factor a:
Compute the jackknife estimates: leave out one observation at a time (from both arms combined, or from each arm), recompute delta_hat_(-i). Then:
a = sum_i (delta_hat_(.) - delta_hat_(-i))^3 /
(6 * [sum_i (delta_hat_(.) - delta_hat_(-i))^2]^{3/2})
This measures how quickly the SE of the estimator changes — essentially the skewness of the influence function.
Adjusted percentiles:
alpha_1 = Phi(z_0 + (z_0 + z_alpha/2) / (1 - a*(z_0 + z_alpha/2)))
alpha_2 = Phi(z_0 + (z_0 + z_{1-alpha/2}) / (1 - a*(z_0 + z_{1-alpha/2})))
Use delta*_(alpha_1 * B) and delta*_(alpha_2 * B) as the CI endpoints.
BCa is second-order accurate (error O(1/n) vs O(1/sqrt(n)) for the percentile method) and handles both skewness and bias.
3. What the Bootstrap Is Doing and Its Failure Modes
The bootstrap invokes the plug-in principle: the empirical distribution F_hat is a consistent estimator of the true distribution F, so the sampling distribution of a statistic under F_hat approximates that under F. As n grows, this approximation becomes exact for smooth statistics.
Failure modes in this setting:
- Extreme tails / heavy-tailed distributions: if the true distribution has infinite variance (e.g., Pareto with tail index < 2), the bootstrap is inconsistent for the mean. Revenue distributions are rarely this extreme, but it's worth checking.
- Small n with high leverage observations: if one whale user accounts for, say, 30% of total revenue in a sample of 800, many bootstrap resamples will contain 0 or 2+ copies of that user, creating a multimodal bootstrap distribution. The CI endpoints will jump discontinuously.
- Resampling unit mismatch: if users have multiple sessions, resampling individual sessions instead of users violates independence. Always resample at the randomization unit.
4. Why the Bootstrap CI Is Wider and Shifted Right
Wider: The analytic SE underestimated true variability, likely because s² is dominated by a few whale observations and the sample variance itself has high variance. The bootstrap captures the actual spread of delta* across resamples without assuming Normality.
Shifted right: This is the more interesting finding. It signals that the sampling distribution of x̄_T - x̄_C is right-skewed — extreme positive values of the difference are more likely than extreme negative ones. The bias-correction in BCa detects that z_0 > 0, meaning the bootstrap distribution median exceeds the observed delta_hat, and adjusts both endpoints upward. Practically, this means: when the treatment effect is positive and the metric is skewed, the analytic CI is too conservative about the upper bound and too optimistic about the lower bound simultaneously.
5. Final Reporting Strategy
Robustness checks before presenting:
- Winsorize at the 99th percentile and recompute the analytic CI. If results change substantially, whale sensitivity is the culprit.
- Plot the bootstrap distribution — is it unimodal and roughly symmetric, or bimodal? Bimodality signals a discrete leverage problem.
- Run a permutation test for the null of no difference as a nonparametric complement; confirm the p-value is consistent with the CI.
- Check the distribution of the metric: compute skewness and kurtosis; if skewness > 2, flag this explicitly.
- Consider alternative metrics: median difference or a quantile regression approach may be more stable than mean difference for heavily skewed revenue.
Recommendation: Report the BCa bootstrap CI as the primary result, noting it is [$0.04, $0.31]. State that the standard analytic CI was unreliable due to skewness and small-to-moderate n relative to distributional complexity. The treatment effect is positive and statistically significant under both methods, but the magnitude and precision estimates differ — the product team should factor in the wider uncertainty when making launch decisions.
Common mistakes to avoid:
- Conflating "bootstrap always works" with "bootstrap is assumption-free" — it has its own regularity conditions.
- Reporting only the percentile bootstrap without considering BCa when there is visible skewness.
- Forgetting that the resampling unit must match the randomization unit.
- Ignoring practical significance: even if [$0.04, $0.31] is statistically significant, is a minimum of $0.04 per user per week meaningful at this product's scale?