Sampling distributions

Sampling, central limit theorem, CIs

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 is therefore σ/√n.

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

For heavy-tailed parent populations with infinite variance the central limit theorem does not apply.

Experiment with different populations! There are continuous distributions with finite variance (uniform, exponential, normal, power-law 3.5), distributions with infinite variance (power-law 2.5, Cauchy, power-law 1.5), and a discrete distribution (±1). Or, design your own custom distribution!