Sampling distributions

Sampling, central limit theorem

Help

Experiment with sampling from various populations, where the sample means are stored in a histogram.

A custom population can be created by clicking/pressing on the distribution to shape it.

Choose the population and sample size, then start generating samples.

Toggle the display of the population, sample values, and sample histogram.

Compare the sampling distribution with the normal approximation from the central limit theorem.

Reset the display via the reset button, or by changing the population or sample size.

This app is inspired by the outstanding web app developed by David Lane: https://onlinestatbook.com/stat_sim/sampling_dist/

Overview

Sampling distributions are fundamental for the understanding of statistics.

For a parent population with finite variance σ² the central limit theorem tells us that in the limit of large sample size (n) the sampling distribution of the mean will approach a normal distribution with the same mean as the parent population, and variance σ²/n.

The standard deviation of the sample mean, that is the width of the sampling distribution of the mean, is σ/√n.

A good rule of thumb is that a sample size of 30 ensures that the sampling distribution is “close” to normal.

For a long-tailed parent population without finite variance the central limit theorem does not apply.

Experiment with different populations, including various continuous distributions that have finite variance (uniform, exponential, normal, power-law with exponent 3.5), distributions without finite variance (power-law with exponent 2.5, Cauchy), a discrete distribution (±1), or your own custom distribution.