Glossary

R: Bootstrap confidence interval for the median

A broad class of resampling methods that estimate the sampling distribution of a statistic by repeatedly drawing samples (with replacement) from the observed data. Bootstrapping is used to construct confidence intervals, estimate standard errors, and perform hypothesis tests, ...

title: Bootstrap

slug: bootstrap

Definition

A broad class of resampling methods that estimate the sampling distribution of a statistic by repeatedly drawing samples (with replacement) from the observed data. Bootstrapping is used to construct confidence intervals, estimate standard errors, and perform hypothesis tests, especially when the theoretical distribution of the statistic is unknown or difficult to derive. For independent data, the ordinary (i.i.d.) bootstrap applies; for dependent data, block or stationary bootstrap variants are required.

Why It Matters

Traditional inference relies on asymptotic theory that may be a poor approximation in small samples. The bootstrap provides a data-driven alternative that often yields more reliable confidence intervals and p-values without requiring distributional assumptions. It is especially valuable when working with complex estimators — such as indirect effects, ratio statistics, or median regression — where analytical standard errors are hard to derive.

Example

A researcher wants a 95% confidence interval for the median income in a survey of 200 households. Because the sampling distribution of the median is not straightforward analytically, the researcher draws 1,000 bootstrap samples, computes the median for each, and takes the 2.5th and 97.5th percentiles as the interval bounds.

```r

set.seed(42)

boot_medians <- replicate(1000,

median(sample(income, replace = TRUE)))

quantile(boot_medians, c(0.025, 0.975))

```

Related Terms

Software Notes

R: Use the boot package for flexible bootstrap implementations; tsbootstrap from the tseries package for time-series block bootstraps. Stata: Use the bootstrap prefix before estimation commands. Python: Use scipy.stats.bootstrap (SciPy 1.7+) or the arch package for bootstrap-based inference in financial econometrics.

Contact Us for Support → /contact/