Bootstrap Resampling Statistics Explorer

Illustrates resampling an empirical distribution to estimate model-free values and confidence intervals for various statistics.
7 Downloads
Updated 6 Mar 2025

View License

A distribution of measured values of some quantity often derives from an unknown probability distribution. Statistical bootstrapping provides a model-free means to estimate the distribution of a statistic like the mean value and confidence limits for the statistic. It is based on resampling (with replacement) the measured distribution to obtain a derived distribution, finding the value of the statistic for the derived distribution, and with multiple derived distributions observing the distribution of the statistic. This trick is based only on the assumption that the measurements are independent and uses the fact that in the absence of a model the measured distribution is by definition one's best estimate of the underlying distribution. It is always applicable and can avoid a possibly dubious assumption that the underlying distribution is normal or of some other form.
This educational Live Script simulates bootstrap resampling with a normal distribution for which the distributions of mean and variance parameters governing it are well known, and then for parametric triangular distributions which may be asymmetric and for which various statistics are readily calculated. The resampling and CL estimation follows the examples in Ref[1].
This script may interest students and instructors in physics and related fields. 'Try this' suggestions and coding 'Challenges' along with references and hyperlinks are included for further exploration. For 100+ other STEM education Live Scripts by the author, see Ref[2].

Cite As

Duncan Carlsmith (2025). Bootstrap Resampling Statistics Explorer (https://uk.mathworks.com/matlabcentral/fileexchange/180299-bootstrap-resampling-statistics-explorer), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

BootstrapResamplingStatisticsExplorer folder

Version Published Release Notes
1.0.1

added challenge

1.0.0