Lab · c15.s04.L1

Bootstrap intervals

Resampling the one observed sample with replacement turns it into a stand-in population, and the middle of the resulting pile of means is the error bar.

Question: How can a single sample tell you how far its own mean might sit from the population mean, without a second sample and without a formula?

Bootstrap intervalsAn upper strip shows the observed task times as navy dots on a minutes axis, with their mean marked in russet. Below, a navy histogram piles up the means of two thousand resamples. A gold hatched band, labelled at both ends, marks the chosen interval: raising the confidence level widens the band, and raising the sample size narrows the pile while the dots keep their spread. The band stays centred on the observed mean, not on a truth.Bootstrap intervalsone sample, resampled with replacement2,000 resamplespercentile bootstrap interval for the meanthe one sampleresampled means20406080minutesThe pile is centred on the observed sample mean, not on the truth.A biased sample gives a confident interval around the wrong value.mean 22.36lo 16.08hi 29.35n = 20 observations, sample 1 of 4, confidence 95%: interval 16.08 to 29.35, width 13.27 minutes
Re-simulated Re-simulated: 16 observed samples are drawn once from the stated population (lognormal task times: median 20 minutes, log-scale standard deviation 0.55); each is then bootstrapped 2,000 times by data/scripts/c15.s04.L1.py with seed 20261108. The frames draw one stored case at a time on a shared minutes axis: the sample dots, the pile of resampled means and the percentile interval at 80, 90, 95 or 99%. At the default n = 20, sample 1, the mean is 22.36 minutes and the 95% interval runs from 16.08 to 29.35, width 13.27 minutes. The pile is centred on the sample mean, not on the population mean.
Lab controls
n = 20 observations

Left/Right: previous/next size; Page Up/Down: two positions; Home: 10; End: 80

confidence = 95%

Left/Right: previous/next level; Page Up/Down: two positions; Home: 80%; End: 99%

sample 1 of 4

Left/Right: previous/next sample; Page Up/Down: two samples; Home: 1; End: 4

Frame 1 of 1: n = 20, sample 1, 95%The 20 observed times average 22.36 minutes. Resampling that one sample with replacement 2,000 times piles up means around it; the middle 95% of the pile runs from 16.08 to 29.35, a width of 13.27 minutes. This is the usual default; only the far tails of the pile stay outside.

n = 20, sample 1, 95%. The 20 observed times average 22.36 minutes. Resampling that one sample with replacement 2,000 times piles up means around it; the middle 95% of the pile runs from 16.08 to 29.35, a width of 13.27 minutes. This is the usual default; only the far tails of the pile stay outside.

Keyboard: Space plays or pauses, Left and Right step, Home goes to the first frame, End goes to the last frame.

Text description of this lab

An upper strip shows the observed task times as navy dots on a minutes axis, with their mean marked in russet. Below, a navy histogram piles up the means of two thousand resamples. A gold hatched band, labelled at both ends, marks the chosen interval: raising the confidence level widens the band, and raising the sample size narrows the pile while the dots keep their spread. The band stays centred on the observed mean, not on a truth.

Return to the section that hosts this lab

Caption status: re-simulated. Every lab declares one of published, re-simulated, schematic, synthetic or interpolated.