PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabsLessons
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry📊Statistics & Probability
ENRUESPTFRDE

Related simulators

Continue with similar topics in this category — or all 10 in Statistics & Probability.

View category →
NewFeaturedKids

Galton Board (Bean Machine)

Launch Simulator

Balls bounce left/right through rows of pegs; the bins fill a binomial that turns into a bell curve. Few rows vs many rows.

NewSchool

Confidence Interval Simulator

Launch Simulator

Draw a sample, build a 90/95/99 % interval for μ; repeat 100 times and count how many intervals catch the true mean.

NewKids

Law of Large Numbers

Launch Simulator

Coin or die: running mean x̄ₙ for several runs converges to μ; the ±σ/√n envelope shows how slowly.

NewKids

Binomial Distribution

Launch Simulator

P(K = k) bars for n trials with success p; mean np, variance np(1−p); coin and rare-event presets; normal overlay at large n.

NewKids

Normal Distribution & z-Scores

Launch Simulator

Bell curve with μ and σ; shaded tails, the 68–95–99.7 rule, and a built-in z-score converter x → z = (x − μ)/σ.

NewSchool

p-Value Explained

Launch Simulator

Test statistic on the null density; shaded one- or two-sided tail is the p-value. Why it is not the probability that H₀ is true.

PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry
  • Statistics & Probability

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Statistics & Probability/Central Limit Theorem

Central Limit Theorem

Pick a parent (uniform, exponential, binomial, die), draw samples of size n = 1, 5, 30; the histogram of means turns normal and its spread shrinks as σ/√n.

Sampling experiment

Parent distribution

5
4 samples/s

Each sample is n independent draws from the chosen parent; its mean x̄ is one entry in the bottom histogram. Changing the parent or n starts a new collection of means. The x-axis of the histogram is fixed to the parent’s range, so the spread of the means visibly shrinks as σ/√n when n grows. Reset draws a new random seed.

Shortcuts

  • •Space / Enter — draw one sample
  • •P — auto-draw on / off
  • •R — reset (new seed)

Measured values

Parent mean μ0.5000 (1/2)
Parent SD σ0.2887 (1/√12)
Sample size n5
Means collected0
Latest sample mean x̄—
Mean of the means—
SD of the means (empirical)—
σ/√n (theory)0.1291
Skewness of the means—

About this model

The simulator draws samples of size n from a chosen parent distribution, reduces each sample to its mean x̄ = (x₁ + … + xₙ)/n, and collects those means in a histogram. Five parents are available, each with mean μ and standard deviation σ in closed form: the uniform U(0,1) (μ = 1/2, σ = 1/√12 ≈ 0.2887), the exponential with rate 1 (μ = 1, σ = 1), the binomial Bin(10, 0.2) (μ = np = 2, σ = √(np(1−p)) = √1.6 ≈ 1.265), a fair six-sided die (μ = 3.5, σ = √(35/12) ≈ 1.708) and an equal-weight mixture of two normals centred at ±1.5 with standard deviation 0.5 (μ = 0, σ = √(0.5² + 1.5²) = √2.5 ≈ 1.581). Draws are independent and identically distributed and come from a seeded pseudo-random generator (mulberry32), so a session is reproducible until Reset picks a new seed; the exponential is sampled by inversion, the binomial as a sum of ten Bernoulli trials, the mixture with the Box–Muller transform. For any parent with finite variance, E[x̄] = μ and SD[x̄] = σ/√n exactly, for every n. The central limit theorem adds the shape: as n grows, the distribution of (x̄ − μ)/(σ/√n) approaches the standard normal, so the histogram of means approaches N(μ, σ²/n). The overlay curve is that normal scaled to the number of means collected and the bin width, the dashed lines mark μ and μ ± σ/√n, and the readout compares the theoretical standard error σ/√n with the sample standard deviation of the collected means (divisor N − 1). The skewness of the means, m₃/m₂^{3/2}, is reported because it shows how the asymmetry of a skewed parent (exponential, binomial with p = 0.2) decays roughly as 1/√n. Bins have width about σ/(3√n), so a ±3 standard-error bell always spans about eighteen bins; for discrete parents the width is rounded to a multiple of 1/n so that every possible mean k/n falls at the centre of a bin. The x-axis is fixed to the parent's range so the narrowing of the histogram with n is seen directly. Simplifications: the parent is fully known, draws are i.i.d., no finite-population correction, and the convergence rate is not quantified (the Berry–Esseen bound is not drawn). Companion simulators: statistics/law-of-large-numbers (convergence of a single running mean), statistics/normal-distribution (the limit curve and z-scores), statistics/galton-board and statistics/binomial-distribution (a binomial turning normal), statistics/confidence-interval (where σ/√n is used in practice).

Who it's for: Upper-secondary and introductory university statistics (AP Statistics, first-year probability and statistics courses).

Key terms

  • central limit theorem
  • sample mean
  • standard error σ/√n
  • parent (population) distribution
  • sampling distribution
  • normal approximation
  • skewness
  • independent and identically distributed

How it works

Pick a parent distribution — flat, skewed, discrete or even two-humped — and draw samples of n values from it. Each sample is reduced to a single number, its sample mean x̄, and that mean is dropped into the bottom histogram. Whatever the parent looks like, the means pile up around the parent mean μ, and as more means arrive the histogram takes the shape of a normal distribution N(μ, σ²/n): that is the central limit theorem. Its width is the standard error σ/√n, so quadrupling n halves the spread — compare n = 1, 5 and 30 against the fixed x-axis. The model is idealised: draws are independent and identically distributed, and the parent’s μ and σ are known exactly in closed form.

Key equations

x̄ = (x₁ + … + xₙ)/n, E[x̄] = μ
SD[x̄] = σ/√n (standard error of the mean)
CLT: (x̄ − μ)/(σ/√n) → N(0, 1) as n → ∞, i.e. x̄ ≈ N(μ, σ²/n)
μ, σ: U(0,1): 1/2, 1/√12 · Exp(1): 1, 1 · Bin(10, 0.2): 2, √1.6 · die: 3.5, √(35/12) · bimodal ½N(−1.5, 0.5²)+½N(1.5, 0.5²): 0, √2.5

Frequently asked questions

The parent is flat (or skewed, or two-humped) — why do the means still form a bell curve?
A sample mean adds up n independent contributions, and a sum of many small independent pieces is dominated by how those pieces combine, not by the shape of any single piece. Mathematically, the characteristic function of the standardised sum tends to that of the standard normal whenever the parent has finite variance. The parent's shape only controls how fast this happens: for the uniform the histogram of means is already close to normal at n = 5, the exponential needs around n = 30 for its right tail to fade, and the bimodal parent looks normal once n is large enough that one mean averages over both humps. At n = 1 the histogram of means is simply the parent itself, which is why that setting is the natural starting point.
Why does the spread of the means shrink as σ/√n and not as σ/n?
Variances of independent variables add. The sum x₁ + … + xₙ has variance nσ², and dividing the sum by n divides the variance by n², leaving σ²/n. Taking the square root gives the standard deviation of the mean, σ/√n, called the standard error. So quadrupling n only halves the spread: compare n = 5 and n = 20, or read the theoretical standard error and the empirical SD of the means in the readout — they agree once a few hundred means have been collected.
What is the difference between the sample size n and the number of means collected?
They play different roles. The sample size n is how many parent values are averaged to make one mean; it decides the shape and width of the sampling distribution, through the standard error σ/√n and the central limit theorem. The number of means collected decides how well the histogram shows that sampling distribution: with 20 means the histogram is ragged, with 1000 it is smooth. Increasing the number of means never makes the histogram narrower; only increasing n does.
Where do the exact values of μ and σ for each parent come from?
They follow from the definitions E[X] = ∫x f(x) dx (or Σx p(x)) and σ² = E[X²] − μ². For U(0,1), E[X] = 1/2 and E[X²] = 1/3, so σ² = 1/12. For the exponential with rate 1, μ = 1 and E[X²] = 2, so σ = 1. For a binomial, μ = np and σ² = np(1 − p), which gives 2 and 1.6 for n = 10, p = 0.2. For a fair die, μ = 3.5 and E[X²] = 91/6, so σ² = 91/6 − 49/4 = 35/12. For the equal mixture of N(−1.5, 0.5²) and N(1.5, 0.5²), μ = 0 and σ² = 0.5² + 1.5² = 2.5, because the variance of a mixture is the average within-component variance plus the variance of the component means.