Bootstrap Resampling Explorer

The learner resamples a data set with replacement (one resample at a time or in batches) and grows the bootstrap distribution of a statistic, comparing the bootstrap SE and shape with the true sampling distribution, reading percentile/basic/normal/BCa interval endpoints, racing their coverage over many fresh samples, and seeing failures such as the point mass at the sample maximum and its m-out-of-n repair.

Used in: Introduction to Statistics

Props

PropTypeDefaultDescription
titlestring"Bootstrap resampling explorer"Title bar text.
modestring"distribution"Initial view: resample (one resample with each data value's multiplicity), distribution (histogram of the replicates T* against the true sampling distribution), intervals (bootstrap interval endpoints by method), coverage (coverage race over many fresh samples from the population).
modesstring[]all (coverage only with a population)Views the learner can switch between; a single entry hides the switch.
populationstring | {family, params} | null{family: "exponential", params: {rate: 1}}True population, any form the sampling core parses ("N(0,1)", "uniform", {family: "exponential", params: {rate: 1}}). Used to draw the observed sample when data is not given, for the true sampling distribution, for theta and for the coverage race. null with data = no comparison.
datanumber[]none (a sample of size n is drawn from population)The observed sample to resample (at least 2 numbers). Fixes n.
nnumber20Size of the observed sample drawn from the population (ignored when data is given).
nRange[min, max] | false[5, max(100, n)]Range of the n slider (draws a new data set); false hides it. Never shown when data is given.
mnumbernResample size; m < n is the m-out-of-n bootstrap.
mRange[min, max] | falsefalseShow an m slider over this range (capped at n), e.g. to watch the point mass at the maximum shrink as m/n falls.
statisticstring"median"Statistic T computed on each resample (see enums; aliases such as maximum, sample-mean, standard-deviation work).
statisticOptionsstring[][]Statistics the learner can switch between with a dropdown.
presets{label?, population?, data?, statistic?, n?}[][]Settings the learner switches between with a dropdown (each overrides population, data, statistic and n); e.g. a well-behaved mean next to a sample maximum and a small-n median.
Bnumber1000Bootstrap replicates drawn on load (0 or 1 lets the learner build the distribution by hand).
maxBnumber10000Cap on the number of replicates (at most 50,000).
intervalsstring[]["percentile", "basic", "normal", "bca"]Interval methods shown in the intervals and coverage views: percentile, basic, normal, bca.
levelnumber0.95Confidence level of the intervals.
compareWithSamplingbooleantrueOverlay the true sampling distribution of T (simulated from the population with the same n) and show the true SE and theta. Needs a population.
scalingstring"raw"Display axis in the resample and distribution views: raw T*, centered T* - theta-hat (against T - theta), root-n sqrt(m)(T* - theta-hat) (against sqrt(n)(T - theta)), or n m(T* - theta-hat) (against n(T - theta), the norming for a maximum).
showMultiplicitiesbooleantrueIn the resample view, badge each data value with how many times the latest resample drew it.
showDiagnosticsbooleanfalseShow the reliability checklist (sample size, discreteness of the replicates, point mass at an edge parameter, bias relative to SE, skewness).
showJackknifebooleanfalseAdd the jackknife SE of the statistic to the readouts.
coverageRunsnumber0Simulated data sets already run in the coverage view on load.
coverageBnumber400Bootstrap replicates per simulated data set in the coverage view.
maxRunsnumber2000Cap on the number of coverage runs.
binsnumber30Number of histogram bins (replicates with at most 40 distinct values are drawn as bars at those values when no overlay is shown).
seednumber | string1Seed of the random streams (data, resamples, truth, coverage); the same seed reproduces the same picture.
controlsstring[]all controls shownRegistry ids of the views, interval methods, readouts and panels to show (core ones always show), e.g. mode.intervals, interval.percentile, overlay.sampling-distribution, readout.bias, panel.diagnostics; omit to show everything. Fitted per node from the props and what the course has taught. The starting view's tab always stays, and one interval method always stays.