Skip to main content

Sampling and Limit Laws Lab

Start from one source distribution, then separate three questions: what one draw looks like, whether one long average settles, and what many reruns of that average look like.

Sampling and limit laws

Watch one source distribution turn into two different averaging stories

The top plot is the source itself. The middle plot shows one running average. The bottom plot shows many reruns of the sample mean. Together they separate the LLN question from the CLT question.

source mean
0.50
source variance
0.08
path final mean
0.55
rerun spread
0.053
Source distribution

Uniform(0,1)

raw draws
meanone draw from the source

A flat source on one interval. The sample mean starts broad, then narrows toward the true center 0.5.

A clean finite-variance source: ideal for seeing both limit laws without tail drama.

Long run

Running mean of one sample path

LLN view
mu1n = 32sample index

One sequence can wobble early, but with finite mean it settles toward the population target. The question is not whether one draw looks Gaussian. It is whether the average stabilizes.

Repeated sampling

Distribution of sample means

CLT view
0.330.65sample mean over 32 draws

Across many reruns, the sample mean forms a tight bell around the true mean. That is the CLT in practice: shape becomes Gaussian, width shrinks like sigma / sqrt(n).

Diagnosis

Two different limit-law stories are visible

LLN

One path settles toward 0.50. Your current long-run mean is 0.55.

CLT

Across reruns, sample means have empirical spread 0.053. The CLT target is 0.051.

Choose a source
How to read this

The LLN is about one long average settling down. The CLT is about many reruns of that average becoming bell-shaped.

Why source choice matters

Uniform and exponential start very differently, but both have finite variance so the averaging story converges to the same Gaussian shape.

Failure mode

Cauchy is here on purpose. It makes the assumptions visible instead of pretending all averages behave nicely.