Bootstrap confidence intervals explained

What a bootstrap confidence interval is, why it works, and how to build one in KiwiGrapher to estimate a population parameter from a single sample.

A bootstrap confidence interval is one of the most intuitive ways to teach statistical inference. Instead of reaching for a formula, you let the data estimate its own uncertainty by re-sampling. Here’s the idea, and how to do it in KiwiGrapher.

The big idea

You have one sample, and you want to estimate something about the population it came from, say the mean. The problem is that a different sample would have given a slightly different mean. How much would it wobble?

The bootstrap answers this by treating your sample as a stand-in for the population:

  1. Re-sample from your data with replacement, taking a new sample the same size as the original.
  2. Calculate the statistic (e.g. the mean) for that re-sample.
  3. Repeat hundreds or thousands of times.

The spread of all those re-sampled statistics shows how much the estimate naturally varies.

Reading the interval

Once you have a bootstrap distribution, a 95% confidence interval is just the middle 95% of it: chop off the lowest 2.5% and the highest 2.5%. The interval gives a plausible range for the population value.

A bootstrap distribution with a 95% confidence interval marked in KiwiGrapher

Doing it in KiwiGrapher

KiwiGrapher has this built in and animated, which is what makes it click for students:

  • Load your sample and choose the bootstrap confidence interval tool.
  • Watch each re-sample being drawn and its statistic added to the distribution.
  • Read the confidence interval straight off the display.

Because the re-sampling is shown happening, students see why the interval has the width it does, not just a number from a formula.

Why it’s great for teaching

  • It connects directly to the idea of sampling variability.
  • There’s no distribution theory to wade through first.
  • The same logic extends to medians, proportions and differences.

Want to show it live in your next lesson? Open KiwiGrapher and run a bootstrap on your class data.