Law of large numbers simulator
Choose an experiment, trial count and seed. The chart tracks the running mean from the first to final observation.
Running mean
The line shows the mean after successive trials; the reference level is the expected value.
Convergence checkpoints
| Trials n | Running mean | Absolute error |
|---|---|---|
| Fill in the fields above — the result is computed on this page. | ||
How do I use this page?
- Choose Bernoulli trials or a die.
- Set the number of trials and optionally change the seed.
- Compare the running mean with the expected value.
What this page does not do: The simulator uses a deterministic pseudo-random generator for learning. It is not a lottery number source or a cryptographic tool.
Further reading
Theory — what does the law of large numbers state?
The law of large numbers states that for independent trials drawn from the same distribution, the sample mean approaches the expected value as the number of observations n grows. The calculator lets you choose an experiment, the number of trials and a random seed, then plots the running mean from the first to the final observation. The seed makes it possible to reproduce exactly the same simulation again. The path toward the expected value is not smooth or monotonic — the deviation can temporarily increase along the way.
Frequently asked questions
Does the mean always move closer?
What is the seed for?
See also
A/B test calculator
Compare two proportions in an A/B test. Calculate conversion rates, difference, uplift, z score, p value and c
A/B test planning — sample size, MDE and duration
Plan a two-proportion experiment, estimate detectable effect and traffic duration.
ACF and PACF autocorrelation calculator
Calculate ACF and PACF across time-series lags. Review the chart, reference bounds and coefficient table.