Bootstrap Confidence Interval Calculator

Paste your data, set the confidence level and resamples to get a bootstrap confidence interval.

How it is calculated

Paste your observations in the Data values box, separated by spaces, commas, semicolons or new lines (use a dot as the decimal mark). At least two numbers are needed. The tool draws as many resamples as you set in Bootstrap resamples, each made of n values picked from your data with replacement, and records the mean of every resample. It sorts those means and reads off the percentile bounds: for a confidence level C the lower bound sits at the (100 − C)/2 percentile and the upper bound at the 100 − (100 − C)/2 percentile. The number of resamples is limited to between 100 and 100,000, and the level must be strictly between 0 and 100. The random generator uses a fixed seed, so the same input always gives the same interval. Besides the bounds, the plain sample mean is shown, all to four decimals.

Worked example

Eight measurements: 12.1, 14.3, 11.8, 15.2, 13.7, 12.9, 16.4, 13.1. Their sum is 109.5, so the sample mean is 109.5 / 8 = 13.6875. With 5000 resamples at 95% confidence, each resample averages eight values drawn with replacement. The 5000 sorted means are cut at the 2.5% and 97.5% positions, which gives a lower bound of 12.7250 and an upper bound of 14.7500. So the mean is estimated to lie between about 12.73 and 14.75.

Try this example →

Common mistakes

  • Typing a decimal comma in the data field, such as 12,5. Commas are separators here, so 12,5 is read as the two numbers 12 and 5. Use 12.5. A decimal comma does work when you put semicolons or spaces between the values (2,5; 4 or 2,5 4).
  • Entering the confidence level as a fraction (0.95). The field is in percent, so 95 is correct; 0.95 means a 0.95% interval and gives a very narrow, meaningless band.
  • Reading the interval as covering individual observations. It is an interval for the mean, so most of your raw data will lie outside it.
  • Trusting a bootstrap on a handful of points. With only 3 or 4 values the resamples can take very few distinct means, so the interval is coarse and tends to look narrower than the real uncertainty.
  • Raising the resample count to make the interval narrower. More resamples only make the bounds more stable; they do not add information about the population.

Sources

About this calculator

The bootstrap, introduced by Bradley Efron in 1979, estimates the sampling distribution of a statistic — here, the mean — by repeatedly resampling your observed data with replacement and recalculating the statistic on each resample, thousands of times. Unlike a traditional confidence interval that assumes an underlying normal distribution and relies on the t- or z-distribution, the bootstrap makes no such assumption, drawing the interval directly from the spread of resampled means using the percentile method.

This calculator takes your raw data, a chosen confidence level, and a number of resamples, then returns the resulting bootstrap confidence interval for the mean. Statisticians and data scientists working with small, skewed, or otherwise non-normal samples, and researchers who want a distribution-free alternative to the classical confidence interval use it when the usual normality assumptions are questionable or hard to verify.

Was this helpful?

You can pick up to 3 reactions.

Note from the editors

A bootstrap interval can only describe the data you paste, so one unusual value moves it a lot: run the tool with and without a suspected outlier and see how far the bounds shift. The seed is fixed, so rerunning with the same data gives identical bounds; to see how much the bounds wobble from resampling alone, change the number of resamples, say from 5,000 to 5,001. How many observations does your sample have, and what are you measuring?

Comments

  • Be the first to comment.

Popular calculators

All Calculators