← Math & statistics

Sampling & Bootstrap — CLT Explorer (with steps)

Recreate uniform, normal, exponential, and Bernoulli samples with a deterministic LCG, inspect point estimates, percentile/t/normal confidence intervals, and explore CLT histograms with fully documented steps.

Designed for classrooms: shareable URLs, CSV export, and related tools for probability and inference in one browser-based workflow.

Other languages 日本語 | English | 简体中文 | 繁體中文 | 繁體中文(香港) | Español | Español (México) | Português (Brasil) | Português (Portugal) | Bahasa Indonesia | Tiếng Việt | 한국어 | Français | Deutsch | Italiano | Русский | हिन्दी | العربية | বাংলা | اردو | Türkçe | ไทย | Polski | Filipino | Bahasa Melayu | فارسی | Nederlands | Українська | עברית | Čeština

How to use Sampling & Bootstrap — CLT Explorer (with steps) effectively

What this calculator does

Simulate samples from common distributions, inspect the sampling distribution of the mean, and compare bootstrap percentile, t, and normal confidence intervals. The fixed seed makes each run reproducible for lessons and review.

Input meaning

Choose the population distribution first, then set sample size, number of bootstrap resamples, statistic, and seed. Larger samples and more resamples usually stabilize the display, but they also take more browser work and can hide the effect of small-sample variation.

Use-case sequence

Start with a small sample and a fixed seed so students can reproduce the same dots, histogram, and interval. Change only sample size or resample count next, then compare how the sampling distribution and interval width move.

Common mistakes to avoid

Interpretation guidance

Use bootstrap intervals to discuss resampling uncertainty and the CLT view to discuss how sample means become more regular. Keep the seed in shared URLs when you need classmates or reviewers to see the same simulated sample.

Controls

Distribution & statistic
Exponential parameter
Seeds & CLT
95% confidence intervals

Results summary

Point estimate
Sample mean
Sample median
Sample standard deviation
n / B
/
Theoretical mean / σ
/
  • Bootstrap percentile

  • t approximation (mean)

  • Normal approximation (proportion)

How it's calculated

  1. Initialise the LCG (a=1664525, c=1013904223, m = 2^32) with seed so the sampling stream is reproducible.
  2. Draw n= observations from and evaluate the selected statistic .
  3. Resample B= times, take Type-1 quantiles, and report the chosen intervals ().
  4. For the CLT explorer, use seed with K= standardised sample means, summarised as mean/variance ≈ .

Both the shareable URL and CSV encode the seeds and configuration for reproducible demonstrations.

Histograms

Bootstrap distribution

Shows the sampling distribution of the statistic across bootstrap replicates and highlights the CI span.

CLT standardised means

Overlaying N(0,1) reveals how quickly the empirical mean and variance approach 0 and 1 respectively.

FAQ

Why use the Type-1 percentile?

It uses floor((B−1)p) order statistics so the interval endpoints are transparent to students, mirroring textbook bootstrap explanations.

What benefits does the fixed LCG bring?

The same parameters as our probability simulator (a=1664525, c=1013904223, m = 2^32) guarantee identical samples for a given seed, which is ideal for lesson plans, handouts, and remote verification.

How many bootstrap resamples should I use?

Use a smaller B value while teaching or exploring, then increase B when you want smoother interval endpoints. More resamples reduce simulation noise but do not fix a poor sample or a mismatched model.

How is bootstrap different from the CLT view?

Bootstrap resamples the observed data to approximate uncertainty around a statistic. The CLT view shows how sample means behave across repeated samples from a population model as sample size grows.

Can I reproduce the same random sample later?

Yes. The fixed LCG and seed make the simulated draws repeatable. Keep the seed and settings in the shared URL when you need the same histogram, interval, and step list for a class or review.