shore.org.uk/resources/confidence-intervals
The Confidence Intervals Explorer is an interactive visualisation designed to bridge the gap between calculating a margin of error and truly understanding what a confidence interval represents. By simulating both individual samples and long-run repetitions, the tool confronts common misconceptions about probability and the frequentist interpretation of statistics.
The tool is split into two functional areas:
The interface is built around a dynamic Normal distribution curve representing the population. Users control the "ingredients" of the interval, Confidence Level and Sample Size (\(n\)), and watch the interval react in real-time.
The control bars allow for precise adjustment of the statistical model:
The Layers toggles are split into two sections to allow teachers to manage visual complexity:
What it does: By clicking "Sample," a new set of \(n\) points is generated. The tool calculates \(\bar{x}\) and constructs the interval \([\bar{x} - E, \bar{x} + E]\).
Why this is powerful: It makes "sampling error" visible. Students can see that while the population mean \(\mu\) is fixed, the sample mean \(\bar{x}\) (and its associated interval) "dances" around the centre with every new sample. It moves the focus away from a static formula and onto the randomness of the sampling process.
What it does: This section allows users to generate multiple intervals (up to \(N=100\)) simultaneously. The tool colours intervals that contain the population mean blue and those that miss it red.
The Capture Rate: A live readout (e.g., "Captured \(\mu\): 24 out of 25 (96%)") provides immediate quantitative feedback. This demonstrates that a 95% confidence level refers to the reliability of the process over time, rather than a probability for one specific interval.
The Trade-off Discovery: Keep the sample size \(n\) constant and move the Confidence Level slider. Discuss why we need a "wider net" (larger interval) to be more confident that we’ve captured the true mean.
The Power of \(n\): Set the confidence level to 95% and vary the sample size. This visually demonstrates the "Law of Large Numbers." As \(n\) increases, the estimate becomes more precise and the interval shrinks, despite the confidence level remaining the same.
Visualising "Misses": Generate 100 intervals at a 90% confidence level. Ask the class to count how many intervals failed to cross the central \(\mu\) line. The live "Captured \(\mu\)" counter makes the abstract \(10\%\) significance level a concrete, visible reality.
Bridging the Gap: Use the "Highlight top interval" toggle in the stacking view. This shows students exactly how the single sample they see in the top plot corresponds to the "long-run" list below, helping them connect individual results to the broader statistical theory.
The tool aligns with the work of researchers like Gerd Gigerenzer and Clifford Konold, who argue that statistical "literacy" requires a move away from "probability as a single-event state" toward "probability as a long-run frequency."
By using dynamic variation, where the user changes one parameter (\(n\) or %) and sees the visual result instantly, the app helps students develop an intuitive "feel" for the standard error. It moves the confidence interval from being a "thing you calculate" to a "process you trust."