About this site
The Sampling Lab is a free set of interactive explanations of the ideas at the start of every statistics course: spread, the normal curve, the binomial and Poisson distributions, sampling distributions, confidence intervals and p-values. It has no ads and needs no sign-up.
The idea§
Statistics is about what would happen if you could repeat a study many times, and in real life you never can. Every figure here repeats the experiment for you, thousands of times, so that the long-run frequencies the formulas describe (coverage, false-positive rates, the spread of sample means) appear in front of you. The figures share one grammar: a dot is one measurement, a short tick is a statistic computed from a sample, and a dashed line is the truth about the population, which in real life you never get to see.
How the numbers are checked§
The figures are driven by a small engine of pure functions. Where an exact answer exists, the engine computes it: normal tail areas with a continued fraction that keeps relative accuracy far into the tails, Student’s t through the incomplete beta function, binomial and Poisson probabilities summed exactly in log space, and the exact coverage of interval methods. Everything else is a simulation driven by a seeded random number generator, so each sample can be regenerated on its own and a shared link reproduces exactly what you saw. The engine’s own tests check worked examples, invariants and limits against independently computed reference values. A separate test suite, written by a different author from the published equations without reading the engine’s code, checks the engine again.
Every equation, number and historical statement on the site is listed with its source in a claims register and checked by a reviewer who did not write it. Each figure says what it simplifies, in an aside headed “Simplification”, with the real story next to it. The full list is on the sources page.
Found an error?§
Please open an issue on the source repository. Corrections are welcome and are credited.
Reuse§
Text and figures are licensed CC BY 4.0; code is MIT. Teachers may use and adapt any of it, with attribution. Every figure has a Share button that copies a link to its exact state, which is a convenient way to set up an exercise.