Data Science Foundations · Beginner

Statistics & Sampling

Watch one real sample become one sample mean, then one point in a growing sampling distribution.

A deterministic browser-side visual lab for descriptive statistics and repeated sampling. The learner can play or step through draw → mean → sampling-distribution → standard-error stages while every displayed value comes from the exact local samples.

Step by step

  1. Choose a population shape and inspect its actual μ and σ.
  2. Draw one exact sample of size n from that same population.
  3. Calculate x̄ from the sampled values and inspect the arithmetic.
  4. Drop that exact x̄ into the growing sampling distribution.
  5. Repeat the experiment and compare empirical SE with σ/√n.
  6. Increase n and watch the distribution of sample means tighten.

Core formulas

Sample mean

x̄ = (1/n) Σ xᵢ

The sample mean summarizes one sample.

Population variance

σ² = (1/N) Σ (xᵢ − μ)²

Variance measures squared spread around the population mean.

Standard error

SE(x̄) = σ / √n

The spread of sample means shrinks as sample size grows.

When to use Statistics & Sampling

  • Learning descriptive statistics before fitting a model.
  • Understanding why larger samples make estimates more stable.
  • Connecting a population distribution to a sampling distribution.

Primary references

NIST — Normal distribution and Central Limit Theorem

NIST — Confidence limits for the mean