Bootstrap Simulation — Empirical Resampling for Statistical Inference

Simulation
Introduced by
Bradley Efron
Year
1979
Type
Simulation-based nonparametric inference

What does it do?

Bootstrap simulation is a simulation-based inference method that approximates the sampling distribution of a statistic by repeatedly resampling, with replacement, from the observed data.

Because it does not require a parametric distributional model, it offers an alternative to analytical confidence intervals and parametric tests when their assumptions are doubtful. The page lists continuous, ordinal, binary and count variables as suitable inputs.

The intuition behind the method

Normally, to understand how variable a statistic like the mean or median is, you would collect many independent samples from the population — but you only have one sample. Bootstrap resampling solves this by treating your one sample as if it were the population and drawing thousands of new samples from it with replacement. Each new draw is slightly different, and together they build an empirical picture of how the statistic would behave across repeated studies — no distributional formula required.

History

The method is attributed to Bradley Efron, but the originating paper is not among this page's citations, so its original publication year is not verified here. Efron and Tibshirani's textbook, An Introduction to the Bootstrap, presents bootstrap inference for scientists, engineers and statisticians, with a focus on ideas rather than mathematical justification. The citation on this page gives 1993 as its year, while a bibliographic match gives 1994, so the publication year should be checked against the publisher record. Davison and Hinkley's 1997 monograph extended bootstrap methods to regression, time series, censored and missing data, stratified data and spatial problems.

When to use it

Choose the bootstrap when the sampling distribution of a statistic has no convenient analytical form, or when parametric assumptions such as normality cannot be justified for the data at hand. The nonparametric bootstrap described here applies to continuous, ordinal, binary and count variables and to estimators of different kinds, including regression coefficients and correlation differences. If instead a fitted parametric model is used to generate resamples (a parametric bootstrap, for example drawing from an exponential distribution whose rate is estimated from the data), the inference depends on that model being adequate. Do not rely on the method when the sample is very small: as a rough heuristic, around 20 observations or more are often needed, because below that the observed data may not represent the population well enough. Do not use the standard i.i.d. version for time-series or clustered data; use a block bootstrap instead.

Limitations and considerations

  • Computational cost grows with B; the large numbers of resamples needed for reported intervals can be expensive when each evaluation of the statistic is slow.
  • Cannot correct a biased or unrepresentative original sample, because the resamples only reproduce the variation already present in the data.
  • With small original samples (below roughly 20 observations, as a rough heuristic), the empirical distribution may be unreliable even with many resamples.
  • The i.i.d. version is invalid for dependent data, and the block bootstrap requires choosing a block size, which adds a tuning decision.
  • The standard bootstrap is unreliable for extreme-value statistics such as the maximum or minimum, and for some other non-smooth estimators.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The nonparametric form makes no parametric distributional assumption, so it can be used where normality-based formulas are doubtful.
  • Applies to a wide range of estimators, including regression coefficients, correlation differences and model performance metrics, without a separate analytical derivation for each.
  • Yields standard errors, confidence intervals and hypothesis tests from one resampling procedure.
  • Extends to dependent data through block resampling and to asymmetric sampling distributions through BCa intervals.

Applications

  • Confidence intervals for estimators with no convenient closed-form standard error, such as medians and trimmed means.
  • Hypothesis tests when normality or equal-variance assumptions cannot be verified, for example comparing two groups on a skewed continuous outcome.
  • Inference for regression models, including the variability of coefficients and model-based estimates, as discussed by Davison and Hinkley.
  • Analyses of censored, missing or stratified data, which Davison and Hinkley cover as bootstrap applications.
  • Comparing correlations or other summary measures in applied research when closed-form variance formulas are unavailable.

How it works

How it works

1

Start with the observed dataset of n observations. Verify that the sample is representative of the target population, because the bootstrap can only reproduce variation that is present in the data; a biased or unrepresentative sample will produce biased bootstrap estimates.

2

Draw B random samples of size n from the original data, each time sampling with replacement. Around 1,000 or more resamples usually give stable standard errors and interval endpoints; check stability by repeating the run with the same B, and use more resamples for confidence intervals that will be reported. For dependent data such as time series or clustered observations, a block bootstrap is appropriate, so that the dependence structure is preserved rather than broken by resampling individual observations. The block length must be chosen to match the dependence structure.

3

Calculate the statistic of interest, such as a mean, median, regression coefficient, correlation or other estimator, on each of the B bootstrap samples. This produces B bootstrap values of that statistic, forming the bootstrap distribution.

4

Summarise the B bootstrap values as an empirical sampling distribution, reporting the bootstrap standard error and a bootstrap confidence interval. Where the distribution is skewed or the estimator is biased, the bias-corrected accelerated (BCa) interval is generally preferred; the percentile interval is the simpler alternative but can be inaccurate in those cases.

5

Use the bootstrap distribution to report a confidence interval for the parameter. For estimation, the bootstrap distribution of the centred statistic (each bootstrap value minus the observed estimate) describes the sampling variability. A hypothesis test requires the null hypothesis to be built into the resampling: the data must be shifted or constrained to satisfy H0 (for example by a recentred bootstrap or a permutation scheme) before the p-value is computed. Comparing the observed statistic with a distribution centred on the observed value does not give a valid p-value. The validity of these inferences depends on the original sample being a fair representation of the population and on the resampling scheme (i.i.d. or block) matching the structure of the data.

Common pitfalls

  • Using too few resamples gives unstable intervals; check stability by repeating the run, and use more resamples for reported confidence intervals.
  • Applying the i.i.d. bootstrap to time-series or clustered data breaks the independence assumption; use a block bootstrap for dependent observations.
  • Reporting a percentile interval for a skewed or biased statistic can give misleading limits; BCa is generally preferred in those cases.
  • Reading the bootstrap standard error as the standard deviation of the raw data: it estimates the variability of the statistic, not of the individual observations.
  • Ties in binary or count data can make resampled values cluster on a few points, especially in small samples, which distorts the bootstrap distribution.

Frequently asked questions

How many bootstrap resamples do I need?

Around 1,000 or more resamples usually give stable standard errors and rough confidence intervals. For confidence intervals that will be reported, use more, and check stability by repeating the run with the same number of resamples. Results that change noticeably between repeated runs should not be relied on for reporting.

Which confidence interval should I use: percentile or BCa?

The BCa (bias-corrected accelerated) interval is generally preferred when the statistic's sampling distribution is skewed or the estimator is biased, because it adjusts for both. The percentile interval is simpler but can be inaccurate in those situations. This page does not cover other interval types, so they are not discussed here.

Can bootstrap be used with time-series or panel data?

Yes, but the standard i.i.d. bootstrap, which resamples individual observations, is invalid for dependent data because it breaks the dependence structure. Block bootstrap methods, which resample contiguous blocks of observations, preserve serial dependence and are appropriate when data are correlated over time or within clusters.

Does bootstrap work with small samples?

As a rough heuristic, bootstrap inference tends to be more reliable when n is around 20 or more; this threshold is not drawn from the cited sources, and reliability depends on the statistic and the shape of the data. With smaller samples the observed data may not adequately represent the population, and the bootstrap distribution inherits this limitation; additional resampling does not compensate for a sample too small to capture the population's shape. In such cases, consider exact permutation tests or Bayesian methods.

Related methods

Sources

  1. Efron, B. & Tibshirani, R.J. (1993). An Introduction to the Bootstrap. Chapman & Hall/CRC.

    Open DOI reference
  2. Davison, A.C. & Hinkley, D.V. (1997). Bootstrap Methods and their Application. Cambridge University Press.

    Open DOI reference