Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Error analysis and propagation

School of Engineering, Nazarbayev University

Evaluating, propagating and reporting uncertainty, from the first ± to the covariance matrix of a fit, with examples across disciplines.

Every number in science and engineering comes with an uncertainty, yet the subject is usually taught once, as a set of recipes in a first-year laboratory, and seldom carried into the places where it is needed later: curve fitting, counting experiments, correlated simulation data, numerical computation, and the systematic effects that no formula for random error will reveal. This book treats error analysis as one connected subject.

Each chapter is an executed Jupyter notebook. Every idea is derived, demonstrated on simulated data for which the true answer is known, and checked by simulation, so that every error bar can be compared with the truth. The notebooks share a small Python module, errprop, written to be read as much as to be used.

The reading guide maps every chapter to the standard textbooks and to the GUM, and suggests routes through the material.

Part I. Measurement and uncertainty

ChapterTrackTopics
1. Measurements, errors and how to report a resultcoreerror vs uncertainty; random and systematic effects; Type A and Type B evaluation; quadrature; rounding and reporting; comparing results
2. Measuring instrumentscorestatic characteristics; resolution, noise and dithering; calibration and accuracy specifications; first-order dynamic response and lag correction
3. Propagation of uncertaintycorethe propagation law; rules for sums, products and powers; uncertainty budgets; Monte Carlo check; differences of nearly equal numbers
4. Repeated measurementscorestandard deviation and standard error; the uncertainty of the uncertainty; Student’s t; what averaging does not cure; weighted mean

Part II. Probability and statistics

ChapterTrackTopics
5. Probability distributions and the central limit theoremcorebinomial, Poisson, normal, uniform, exponential and Cauchy distributions; the central limit theorem; χ², t and F
6. Counting statisticscorethe square-root rule and the dispersion test; background subtraction and counting-time split; Garwood intervals for small counts; dead time
7. Estimators and maximum likelihoodadvancedbias, variance and mean-square error; efficient and inefficient estimators; maximum likelihood; likelihood intervals; Cramér–Rao bound
8. Hypothesis tests and goodness of fitcorep-values, power and errors of both kinds; z, t and Welch tests; χ² test of a distribution; F test; correlation coefficient; many tests at once
9. Outliers and the rejection of datacoreChauvenet’s criterion tested; robust estimators (median, trimmed mean, Huber); the bootstrap; a policy for suspect data
10. Monte Carlo methodsadvancedsampling by inverse transform and rejection; correlated inputs; the accuracy of a Monte Carlo result; Latin hypercube sampling

Part III. Data analysis

ChapterTrackTopics
11. Fitting a straight linecoreleast squares and its parameter uncertainties; residuals; weighted fits and χ²; coverage check; pitfalls
12. Covariance and the limits of linearisationadvancedthe general law Cy = J Cx JT; shared errors; staged calculations; second-order bias; Monte Carlo propagation
13. Fit parameters and their covarianceadvancedmatrix form of least squares; correlated slope and intercept; centring; transformed data and weights; absolute vs relative error bars; errors in both variables
14. Nonlinear least squaresadvancedGauss–Newton and Levenberg–Marquardt; local minima and starting values; covariance at the minimum; profile Δχ² intervals; derived quantities; coverage
15. Fitting counts: maximum likelihoodadvancedNeyman vs Pearson χ² vs Poisson likelihood for histograms; goodness of fit with few counts; unbinned likelihood with a finite window
16. Rules of thumb, testedcorenine rules from course guides tested by simulation: worst case vs quadrature, overlapping error bars, limits of linearisation, the dependency trap, measuring many at once, dropping small terms, significant figures, offsets and gains, cancelling errors

Part IV. Advanced topics

ChapterTrackTopics
17. Correlated data and block averagingadvancedvariance of the mean of a time series; integrated autocorrelation time; blocking analysis; coverage test; jackknife for derived quantities
18. Sensitivity analysis and uncertainty budgetsadvancedsensitivity, elasticity and importance; budgets across operating points; bottom-up vs top-down; Sobol indices; aleatory vs epistemic uncertainty; model-form error
19. Numerical erroradvancedfloating point and cancellation; Welford’s algorithm; conditioning; step size of numerical derivatives; Richardson extrapolation; long-time integration

Part V. Worked examples

ChapterTrackTopics
20. Physics: the acceleration of gravity from a pendulumcorephysics: a systematic error that shows up as a trend; a fit that absorbs it; a correction common to all points
21. Chemical engineering: viscosity from a falling spherecorechemical engineering: Type B evaluation; a full budget; a model error fourteen times the budget; defining the measurand
22. Chemistry: activation energy from an Arrhenius plotadvancedchemistry: parameters with correlation 0.999; prediction with and without covariance; the statistical compensation effect
23. Molecular simulation: pressure and diffusion in a Lennard-Jones liquidadvancedmolecular simulation: correlated time series; block averaging on real MD data; transport coefficients; what an error bar leaves out
24. Nuclear physics: a half-life from decay countsadvancednuclear physics: why the log-linear fit is biased; background in the likelihood; checking four methods by simulation
25. Analytical chemistry: a calibration curve and its detection limitcoreanalytical chemistry: inverse prediction and its uncertainty; decision threshold and detection limit (Currie); the 3s rule tested
26. Mechanical engineering: tolerance stack-up and inspectioncoremechanical engineering: worst case vs RSS vs Monte Carlo tolerancing; yield and Cpk; the Abbe error; guard bands at inspection

Licence and citation

Code: MIT. Text, figures and data: CC BY 4.0. Please cite the material using the metadata in CITATION.cff in the repository.