Save resource to class

Loading your classrooms…

Sign in to save

Bookmark this page so you can find it later.

LivePhysics staff accounts use their usual sign-in provider below.

Sign in to save

Bookmark this page so you can find it later.

LivePhysics staff accounts use their usual sign-in provider below.

Report an Error

Reported page · Lab

Bootstrap & Confidence Interval Lab

/labs/bootstrap-lab/

This helps us reproduce what you saw. Clear the link to leave it out.

or drop them here

Up to 3 images or PDFs, 5 MB per file. 0 of 3 attached.

Bootstrap & Confidence Interval Lab

Explore the bootstrap resampling method for constructing confidence intervals. Draw thousands of bootstrap samples, visualize the sampling distribution, compare percentile, normal, and BCa interval methods, and verify coverage through simulation.

Guided ExperimentUnderstanding Confidence Level Through Coverage

If you construct 95% bootstrap confidence intervals from many different random samples, what fraction do you predict will contain the true population mean?

Write your hypothesis in the Lab Report panel, then click Next.

Original Sample Summary

n
20
Mean
24.44
Median
24.60
SD
2.61
Min
19.80
Max
28.70

Controls

Data Table

(0 rows)
#TrialConfidence LevelLower BoundUpper BoundWidthContains μ?
0 / 500
0 / 500
0 / 500

Reference Guide

Bootstrap Resampling

A bootstrap sample is drawn by randomly selecting n observations with replacement from the original dataset. Each bootstrap sample has the same size as the original.

X1∗,X2∗,…,Xn∗∼F^nX^*_1, X^*_2, \ldots, X^*_n \sim \hat{F}_n

The bootstrap statistic (mean, median, etc.) is computed for each resample. Repeating B times builds the bootstrap distribution of the statistic.

Percentile Method CI

The percentile method takes the quantiles of the bootstrap distribution directly as the confidence interval bounds.

CI=[θ(α/2)∗,  θ(1−α/2)∗]\mathrm{CI} = \left[\theta^*_{(\alpha/2)},\; \theta^*_{(1-\alpha/2)}\right]

For a 95% CI, the 2.5th and 97.5th percentiles of the B bootstrap statistics form the interval. This method is simple and makes no distributional assumptions.

Coverage Probability

Coverage probability is the long-run proportion of confidence intervals that contain the true parameter value.

Coverage=#{CIi∋μ}Nsim\mathrm{Coverage} = \frac{\#\{\mathrm{CI}_i \ni \mu\}}{N_{\text{sim}}}

A well-calibrated 95% CI should contain the true parameter in about 95 out of 100 repeated experiments. The coverage simulation lets you verify this empirically.

Bootstrap vs Traditional CI

Traditional CIs rely on known sampling distributions (e.g., t-distribution for means). Bootstrap CIs estimate the sampling distribution empirically.

θ^±z∗×SEboot\hat{\theta} \pm z^* \times \mathrm{SE}_{\text{boot}}

The normal bootstrap CI uses the bootstrap SE in a Wald-type interval. The BCa method adds bias and skewness corrections for better accuracy with asymmetric distributions or small samples.

Related Content