User Rating 0.0
Total Usage 0 times
Is this tool helpful?

Your feedback helps us improve.

About

The Central Limit Theorem (CLT) states that the distribution of sample means X converges to a Normal distribution as sample size n increases, regardless of the population's original shape. The approximation becomes reliable around n 30 for most distributions, but highly skewed populations (exponential, Pareto) may require n 50 - 100. Misapplying the CLT to small samples drawn from non-Normal populations produces confidence intervals and hypothesis tests with incorrect coverage probabilities. This calculator generates actual random samples from six distribution families, computes the empirical sampling distribution, and overlays the theoretical Normal curve N(μ, σ2/n) so you can observe convergence directly. The simulation runs inside a Web Worker to handle up to 100,000 replications without freezing your browser.

Note: this tool assumes independent, identically distributed draws with finite variance. Distributions with infinite variance (Cauchy) violate CLT assumptions and will not converge. The empirical histogram uses Sturges' rule for bin count, which may under-resolve multimodal artifacts at low replication counts.

central limit theorem CLT calculator sampling distribution statistics simulator normal approximation sample mean distribution

Formulas

The Central Limit Theorem provides the following convergence result for the sampling distribution of the mean:

X = 1n ni=1 Xi N(μ, σ2n)

The standard error of the mean is computed as:

σX = σn

The Normal probability density function used for the theoretical overlay curve:

f(x) = 1σX2π e(x μ)22σX2

Where μ = population mean, σ = population standard deviation, n = sample size (observations per sample), X = sample mean, and σX = standard error of the mean. Skewness is measured as γ1 = E[(X μσ)3] and excess kurtosis as γ2 = E[(X μσ)4] 3.

Reference Data

DistributionParametersPopulation Mean (μ)Population Std Dev (σ)SkewnessKurtosis (Excess)Min n for CLT
Uniform(a, b)a, ba + b2b a120−1.212
Exponential(λ)λ1λ1λ2640 - 80
Binomial(n, p)n, pnpnp(1 p)1 2pnp(1p)Varies20 - 30
Poisson(λ)λλλ1λ1λ20 - 50
Beta(α, β)α, βαα + βComplexDepends on α, βDepends15 - 60
Gamma(k, θ)k, θkθkθ2k6k30 - 80
Normal(μ, σ)μ, σμσ001 (exact)
Chi-Squared(k)kk2k8k12k30 - 50
Log-Normal(μ, σ)μ, σeμ + σ2/2ComplexRight-skewedHigh50 - 100
Bernoulli(p)ppp(1p)12pp(1p)Varies30
Cauchy(x₀, γ)x₀, γUndefinedUndefinedUndefinedCLT fails

Frequently Asked Questions

The Cauchy distribution has undefined mean and infinite variance. The CLT requires finite variance (σ2 < ) for the standard error σ/n to converge to zero. Without this condition, the sample mean does not stabilize and averaging n Cauchy variables produces another Cauchy variable with identical spread.
The commonly cited n 30 is a rough guideline that works well for symmetric distributions with moderate kurtosis. Highly skewed populations (Exponential with λ = 0.5, Log-Normal) may require n 50 - 100. For already-Normal populations, the sampling distribution of the mean is exactly Normal for any n 1. Use this simulator to observe the convergence for your specific distribution.
The standard deviation σ measures spread of individual observations in the population. The standard error σX = σ/n measures spread of sample means. As n increases, the standard error shrinks, meaning sample means cluster more tightly around μ. This is why larger samples produce more precise estimates.
The classical CLT applies specifically to the sample mean. For the sample median, a separate asymptotic result exists: the median is approximately Normal with variance 14n[f(m)]2 where f(m) is the population density at the median. This calculator focuses exclusively on the mean.
The Berry-Esseen theorem quantifies the convergence rate: the maximum deviation between the standardized sample mean CDF and the Normal CDF is bounded by 0.4748 ρσ3n, where ρ = E[|X μ|3]. Higher skewness inflates ρ, slowing convergence.
This tool demonstrates the foundational theorem that justifies those methods. Once you confirm the sampling distribution is approximately Normal (visually via histogram and quantitatively via skewness and kurtosis), you can apply the Z-test formula: Z = X μ0σ/n. The empirical standard error from the simulation can validate your analytical calculation.