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.
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.
Uniform(0,1)
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.
Running mean of one sample path
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.
Distribution of sample means
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).
Two different limit-law stories are visible
One path settles toward 0.50. Your current long-run mean is 0.55.
Across reruns, sample means have empirical spread 0.053. The CLT target is 0.051.
The LLN is about one long average settling down. The CLT is about many reruns of that average becoming bell-shaped.
Uniform and exponential start very differently, but both have finite variance so the averaging story converges to the same Gaussian shape.
Cauchy is here on purpose. It makes the assumptions visible instead of pretending all averages behave nicely.