Skip to the content.

Sampling means and the Gaussian limit

The classical Lindeberg–Lévy theorem is the reason a sample mean can be treated as approximately normal even when the observations are not. Let X1, X2, … be independent and identically distributed with mean μ and finite variance σ². Write X̄n for the average of the first n of them. Then √n (X̄n − μ) / σ converges in distribution to a standard normal random variable. On the scale of the data, X̄n is approximately normal with mean μ and variance σ²/n. The population may be skewed, discrete, or bounded. The hypotheses that do the work are independence, a common distribution, and a finite second moment.

The Shiny explorer is a Monte Carlo picture of that limit. It draws a population of 100,000 values from the family you choose, then repeatedly samples n of those values with replacement and records the sample mean. Sampling with replacement from a large population stands in for independent draws from the same law. The histogram of the recorded means is the sampling distribution of X̄n. A normal density, centered at the mean of those simulated means and scaled by their standard deviation, is drawn over the histogram. A normal quantile–quantile plot of the same means asks whether the cloud has actually become Gaussian: points along the reference line support the approximation, and a systematic bend means n is still too small or the variance hypothesis has failed.

Two sliders set the experiment. Sample size n runs from 1 to 200 and starts at 30. The number of sample means runs from 100 to 5,000 and starts at 1,000. The families are normal, exponential, uniform, Poisson, binomial, gamma, chi-square, Student’s t, and Cauchy, each with its usual parameters. An exponential population with rate λ has mean 1/λ and variance 1/λ², so the standard error of the mean is 1/(λ √n). A uniform law on an interval [a, b] has variance (b − a)²/12. Gamma with shape α and rate β has mean α/β and variance α/β². Poisson(λ) has mean and variance λ. A binomial count with m trials and success probability p has mean mp and variance mp(1 − p). Chi-square with k degrees of freedom has mean k and variance 2k. Whenever σ² is finite, increasing n shrinks the sampling distribution like 1/√n. It also wears down skewness: the skewness of an exponential mean is 2/√n, which is why a badly skewed population can still produce a bell-shaped histogram of means.

Finite variance is not optional. The Cauchy location-scale family, marked in the app as the case where the theorem does not apply, has neither a mean nor a variance. The average of independent Cauchy draws is Cauchy with the same scale, so the histogram of means stays heavy-tailed and does not tighten as n grows. Student’s t is the neighboring boundary. Its variance equals ν/(ν − 2) only when the degrees of freedom ν exceed 2; at ν = 1 the t law is Cauchy, and at ν = 2 the variance is already infinite. For ν > 2 the classical theorem does apply, but the tails are heavy enough that a moderate sample still leaves the quantile plot curved. Exponential, Poisson, and chi-square are the useful contrast: each is skewed, each has finite variance, and raising n moves the histogram of means onto the normal curve.

The figure has three panels. The wide top panel is the sampling distribution of the mean, with the normal curve overlaid. The lower left panel is the population that was sampled, so the original skew or discreteness stays visible. The lower right panel is the normal quantile plot of the means. Redraw Plots builds a new population and a new set of means, so two runs with the same settings agree in shape and still differ in the particular sample. The hosted explorer is the Central Limit Theorem app. The sources in this repository are app.R, ui.R, and server.R.

What the theorem uses

Open the Shiny app Source