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
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "Bootstrap resampling explorer" | Title bar text. |
| mode | string | "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). |
| modes | string[] | all (coverage only with a population) | Views the learner can switch between; a single entry hides the switch. |
| population | string | {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. |
| data | number[] | none (a sample of size n is drawn from population) | The observed sample to resample (at least 2 numbers). Fixes n. |
| n | number | 20 | Size 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. |
| m | number | n | Resample size; m < n is the m-out-of-n bootstrap. |
| mRange | [min, max] | false | false | Show an m slider over this range (capped at n), e.g. to watch the point mass at the maximum shrink as m/n falls. |
| statistic | string | "median" | Statistic T computed on each resample (see enums; aliases such as maximum, sample-mean, standard-deviation work). |
| statisticOptions | string[] | [] | 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. |
| B | number | 1000 | Bootstrap replicates drawn on load (0 or 1 lets the learner build the distribution by hand). |
| maxB | number | 10000 | Cap on the number of replicates (at most 50,000). |
| intervals | string[] | ["percentile", "basic", "normal", "bca"] | Interval methods shown in the intervals and coverage views: percentile, basic, normal, bca. |
| level | number | 0.95 | Confidence level of the intervals. |
| compareWithSampling | boolean | true | Overlay the true sampling distribution of T (simulated from the population with the same n) and show the true SE and theta. Needs a population. |
| scaling | string | "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). |
| showMultiplicities | boolean | true | In the resample view, badge each data value with how many times the latest resample drew it. |
| showDiagnostics | boolean | false | Show the reliability checklist (sample size, discreteness of the replicates, point mass at an edge parameter, bias relative to SE, skewness). |
| showJackknife | boolean | false | Add the jackknife SE of the statistic to the readouts. |
| coverageRuns | number | 0 | Simulated data sets already run in the coverage view on load. |
| coverageB | number | 400 | Bootstrap replicates per simulated data set in the coverage view. |
| maxRuns | number | 2000 | Cap on the number of coverage runs. |
| bins | number | 30 | Number of histogram bins (replicates with at most 40 distinct values are drawn as bars at those values when no overlay is shown). |
| seed | number | string | 1 | Seed of the random streams (data, resamples, truth, coverage); the same seed reproduces the same picture. |
| controls | string[] | all controls shown | Registry 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. |
PreviousNext