Every time you draw a fresh random sample from the population, you compute a sample mean and build a 95% (or whatever level you choose) confidence interval around it. This simulation draws many such samples, one after another, and stacks the resulting intervals as horizontal bars along a depth axis. A green bar means the interval happened to capture the true population mean μ (the red plane); a red bar means it missed.
A 95% confidence interval does not mean "there's a 95% chance μ is in this particular interval." Once computed, an interval either contains μ or it doesn't — the 95% describes how the interval-building procedure behaves if you repeated it forever, which is exactly what this simulation lets you watch happen.
Draw repeated random samples and watch confidence intervals stack up as bars along a depth axis — green when they capture the true mean, red when they miss — while a linked Z-test scores the latest sample against a hypothesized value.
Coverage is a long-run property of the interval-building procedure: roughly C% of intervals built this way capture μ over many repeats, exactly as the accumulating green/red bars and running coverage percentage show.
Adjust sample size, confidence level, population spread, and the Z-test's hypothesized mean, then draw samples one at a time or in a batch of 20 to watch the sampling distribution and coverage rate respond.
A 95% CI does not mean "95% probability μ is in this interval" — once computed, an interval either contains μ or it doesn't. The 95% describes the procedure's long-run behaviour, which this simulation lets you watch directly.