Interactive statistics simulations

Experiment with distributions, theorems and stochastic processes in real time. Adjust the parameters and watch how the statistics change.

Available simulations

Pillar page of the statistical simulations cluster: it links to every educational simulator and keeps the generic intent on the hub.

What is a statistical simulation?

A statistical simulation is a computational experiment that generates random data following a specific probabilistic model, with the goal of studying the behavior of statistics, estimating probabilities, or understanding theoretical properties that would otherwise be difficult to visualize.

Unlike exact analytical calculations, simulations let you observe directly how randomness behaves in practice: what a sample of size 10 looks like compared to one of size 1000, how sampling distributions converge, or what fraction of confidence intervals actually cover the true parameter.

The Monte Carlo method — the most widely used simulation approach in statistics — is named after the famous Monaco casino because of its connection to chance. It consists of repeating a random experiment thousands of times to approximate probabilities and distributions through relative frequencies. It is a fundamental tool in quantitative finance, particle physics, bioinformatics and many other fields.

Why learn statistics through simulation

Many statistical concepts are counterintuitive when presented only through formulas. Simulation lets you build intuition experimentally:

  • The central limit theorem states that the mean of many independent observations follows a normal distribution, regardless of the original distribution. That's surprising: how can a skewed or discrete distribution produce perfectly normal means? Simulation makes it visible.
  • A 95% confidence interval does not mean there is a 95% probability that the parameter lies inside that particular interval. It means that the construction procedure produces intervals that capture the true parameter 95% of the time. The difference is subtle but fundamental, and it becomes easy to grasp once you simulate hundreds of intervals.
  • Markov chains model systems that evolve randomly over time but with "short memory": the next state depends only on the current state, not on the full history. Their convergence to a stationary distribution is a theoretical result that can be observed directly by running the chain for enough steps.
  • The Poisson process is the canonical model for rare events that occur at a constant rate: phone calls, customer arrivals, radioactive decays. Simulating it makes it clear why the time between events follows an exponential distribution and how events accumulate over time.

Central limit theorem simulator

The central limit theorem (CLT) is one of the most important results in probability and statistics. It states that, under very general conditions, the sum (or mean) of a sufficiently large number of independent and identically distributed random variables approaches a normal distribution, regardless of the original distribution of each variable.

In practice, this justifies the use of parametric tests (t, z, ANOVA...) even when the individual data aren't normal, as long as the sample is large enough. For most distributions, n ≥ 30 tends to be sufficient; for very skewed or heavy-tailed distributions, a larger n may be needed.

The simulator lets you choose among six distributions (Normal, Uniform, Exponential, Bernoulli, Poisson and Chi-square) and watch how the distribution of the sample mean converges to a normal distribution as the sample size n increases.

Open the CLT simulator →

Confidence interval simulator

A 95% confidence interval is a range of values computed from the sample data such that, if you repeated the study many times and built the interval each time, 95% of those intervals would contain the true value of the parameter.

This definition is very different from saying "there is a 95% probability that the parameter lies in this interval." Once a specific interval has been computed, the parameter is either inside it or it isn't: there's no probability left. The 95% probability refers to the construction procedure, not to any individual interval.

The simulator repeatedly generates random samples, computes the confidence interval for each one, and visualizes the fraction of cases in which the interval covers the true parameter. The empirical coverage converges to the nominal level (95%, 90% or 99%) as the number of simulations increases.

Open the confidence interval simulator →

Markov chain simulator

A Markov chain is a stochastic process that evolves in discrete steps through a finite set of states, with the property that the probability of moving to the next state depends only on the current state, not on how it was reached. This property is called the Markov property, or "memorylessness."

Markov chains have very broad applications: weather models, customer behavior (active, inactive, churned), web navigation (Google's PageRank), population genetics, Markov chain Monte Carlo (MCMC) in Bayesian statistics, and many more.

Under conditions of ergodicity (irreducibility and aperiodicity), a Markov chain converges to a unique stationary distribution, regardless of the initial state. This distribution is the solution to the system πP = π, where P is the transition matrix.

The simulator lets you define the transition matrix (with presets for real-world scenarios), run the chain for several steps, and watch the state distribution evolve toward equilibrium.

Open the Markov chain simulator →

Poisson process simulator

A Poisson process is a model for events that occur randomly over time at a constant average rate λ (lambda). Three properties define it: events are independent of one another, the probability of an event occurring in a very small interval is proportional to the size of that interval, and two events can never occur at exactly the same time.

The number of events occurring within a time interval t follows a Poisson distribution with mean λt. The time between consecutive events follows an exponential distribution with mean 1/λ. This connection between the Poisson process and the exponential distribution is one of the most elegant relationships in probability theory.

Examples of processes frequently modeled as a Poisson process: arrivals at a service queue (customers at a counter, network packets), security incidents in a computer system, genetic mutations, particle collisions in nuclear physics.

The simulator lets you visualize individual trajectories as a step function, study the distribution of the number of events over different time horizons, and compare the observed inter-event times against the theoretical exponential distribution.

Open the Poisson process simulator →

1D and 2D random walk simulator

A random walk is a sequence of steps in which the direction of each move is chosen at random. In 1D, a particle moves +1 or −1 at each instant. In 2D, it moves in any of the four cardinal directions with equal probability.

The most characteristic property is that the spread grows as √n, not as n: after n steps, the positions are distributed as N(μ, σ²n) with σ proportional to √n. The theoretical ±2σ bands in the simulator show this fan-shaped widening.

The simulation includes drift (p ≠ 0.5), 2D recurrence (the trajectory returns to the origin infinitely many times), and the connection to Brownian motion, the gambler's ruin problem and the diffusion law.

Open the random walk simulator →

Type I and Type II error simulator

In a hypothesis test, two types of errors can occur: Type I error (rejecting H₀ when it's true, controlled by α) and Type II error (failing to reject H₀ when H₁ is true, equal to β). Statistical power is 1 − β: the probability of detecting a real effect.

The simulator visually shows the two distributions of the Z statistic (under H₀ and under H₁) overlaid on the same chart. Moving the controls in real time shows how reducing α increases β, how increasing the effect size or the sample size separates the distributions and increases power, and why α and β cannot both be minimized at the same time.

Open the Type I/Type II error simulator →

Bootstrap simulator

The bootstrap (Efron, 1979) is a resampling technique that estimates the sampling distribution of any statistic — mean, median, standard deviation, correlation... — without assuming a parametric distribution. The core idea is to treat the observed sample as if it were the population and generate B "bootstrap" samples by drawing with replacement from the original sample.

The simulator lets you choose the population distribution, the statistic of interest, the sample size and the number of replicates. Two independent buttons let you draw a new sample or regenerate the bootstrap replicates on the same sample, making it easier to understand the variability of the bootstrap procedure itself. The percentile-method confidence interval is shaded in green over the bootstrap distribution.

Open the bootstrap simulator →

Related tools