b2KIT

Sampling Distribution Explorer

Draw samples from populations and build sampling distributions for means, proportions, and variances with live animation.

Tested tool guide Tested browser tools Checked August 16, 2026

What Sampling Distribution Explorer does, with a checked example

One sample mean is a single noisy number; a thousand of them tell a full story. This tool lets you define a population (distribution shape and parameters), then repeatedly draws samples of a chosen size, computes the mean, proportion, or variance of each, and animates the growing histogram of those statistics: the sampling distribution. A theoretical curve is overlaid for comparison. The most common confusion: the spread of this histogram depends on the sample size, not on how many samples you draw.

Worked example

A concrete input and expected output from the current implementation.

Input

Skewed population, mean 50, SD 10; statistic: sample mean; sample size 25; draw 1,000 samples

Expected output

A histogram of 1,000 sample means that is already roughly bell-shaped even though the population is skewed. It centers near 50, and its spread runs close to 2, matching the standard error 10/sqrt(25) = 10/5 = 2; the normal overlay with mean 50 and SD 2 tracks the histogram.

Each sample mean lands near the population mean with spread sigma/sqrt(n), and here sigma/sqrt(n) = 10/5 = 2. With n = 25, the central limit theorem has already made the distribution of means approximately normal even though the population is not.

How the result is produced

1

Repeated sampling

You pick a population (distribution shape and parameters), the statistic to track (mean, proportion, or variance), and a sample size n. Each draw takes n random values from the population, computes the statistic once, and adds the result as one bar in a running histogram, so the sampling distribution assembles itself sample by sample while the population histogram stays on screen for contrast.

2

Theory overlay

The tool also draws the theoretical sampling distribution: normal with mean mu and SD sigma/sqrt(n) for sample means, normal with mean p and SD sqrt(p(1-p)/n) for proportions, and chi-square with n-1 degrees of freedom for the variance when the population is normal. Drawing more samples makes the histogram converge toward the overlay; a lasting mismatch usually means n is too small for the approximation.

Good uses

  • Check the central limit theorem by hand: set a strongly skewed population, sample means with n = 5, then 30, then 100, and watch the histogram become bell-shaped while its spread narrows.
  • Plan a study's sample size: enter the population spread you expect and see how wide the sampling distribution will be for candidate values of n before committing to data collection.
  • Prepare for inference: demonstrate to yourself why a confidence interval or hypothesis test works by watching the distribution of the statistic that the interval's formula is built on.

Limits and checks

  • Sample size versus number of samples: n is how many values go into each sample and it alone sets the spread (sigma/sqrt(n) for means). The number of draws only smooths the histogram; a wide histogram with 10,000 draws means n is small, not that the tool is broken.
  • The central limit theorem is a limit, not a guarantee for small samples: with tiny n from a heavily skewed population the histogram of means stays skewed. Proportions degrade when p is near 0 or 1, and the variance's chi-square shape only holds when the population is normal.
  • Monte Carlo noise: after only a few dozen draws the histogram is ragged and can wobble around the overlay, occasionally looking shifted. Judge the center and shape only after many draws, and read the histogram against the theoretical curve rather than on its own.

Common questions

Why is my histogram of sample means still a bit skewed even at n = 30?

The central limit theorem is an asymptotic statement: the approximation improves as n grows but is exact only when the population itself is normal. Heavy skew or extreme outliers in the population push the needed n much higher. Try n = 100 or more, and check that you have drawn enough samples to see the true shape rather than noise.

Does drawing more samples shrink the standard error?

No. The standard error of the mean, sigma/sqrt(n), is determined by the population's spread and the sample size n; the number of draws does not appear in the formula at all. Drawing 10,000 samples instead of 100 makes the histogram smoother and closer to the theoretical curve, but its width stays about the same.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools