JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

The Honest Number: Uncertainty, Error Propagation, and Fitting

An experiment's output is not a number but a number-with-an-error-bar. Learn to quantify random scatter, shrink it as 1/\sqrt{N}, push uncertainties through a calculation with the propagation formula, and fit a model to data with least squares and chi-squared — the statistics every measurement rests on.

Scatter, the mean, and the error on the mean

Repeat a measurement N times and the readings scatter. The best estimate of the true value is the mean \bar{x}; the typical spread of a single reading is the standard deviation \sigma.

\bar{x} = \frac{1}{N}\sum_{i} x_i, \qquad \sigma = \sqrt{\frac{1}{N-1}\sum_{i}\left(x_i-\bar{x}\right)^2}

The sample mean and standard deviation. The N-1 (not N) — Bessel's correction — compensates for using \bar{x} estimated from the very same data.

Crucially, \sigma describes the scatter of one reading and does not shrink with more data. What shrinks is the uncertainty of the mean itself — the standard error of the mean.

\sigma_{\bar{x}} = \frac{\sigma}{\sqrt{N}}

The error on the mean falls as 1/\sqrt{N}: to halve it, take four times as much data. This is the fundamental reason experiments run long.

Pushing errors through a formula: propagation

You rarely measure the final quantity directly; you compute it from several measured inputs, each carrying its own uncertainty. Error propagation tells you the uncertainty of the result. For f(x,y,\dots) built from independent, uncorrelated inputs:

\sigma_f^2 = \left(\frac{\partial f}{\partial x}\right)^2\sigma_x^2 + \left(\frac{\partial f}{\partial y}\right)^2\sigma_y^2 + \cdots

The general propagation formula: each input's uncertainty enters weighted by how sensitively f depends on it — its partial derivative.

f = x \pm y:\ \ \sigma_f = \sqrt{\sigma_x^2 + \sigma_y^2} \qquad f = xy\ \text{or}\ x/y:\ \ \frac{\sigma_f}{|f|} = \sqrt{\left(\frac{\sigma_x}{x}\right)^2 + \left(\frac{\sigma_y}{y}\right)^2}

The two everyday special cases: for sums and differences, absolute errors add in quadrature; for products and quotients, relative errors add in quadrature.

A worked case: measure a cylinder's volume V=\pi r^2 h with r=2.00\pm0.02 cm (a 1\% error) and h=10.0\pm0.1 cm (also 1\%). Then \sigma_V/V = \sqrt{(2\times1\%)^2 + (1\%)^2} = \sqrt{5}\times1\% \approx 2.2\% — note the radius counts double because V\propto r^2. Respecting significant figures, quote V=126\pm3\ \text{cm}^3, not ten meaningless digits.

Fitting a model: least squares and chi-squared

The deepest use of data is to fit a model. Given points (x_i, y_i) with error bars \sigma_i and a model f(x;\theta) with parameters \theta, least-squares fitting chooses \theta to minimize the weighted sum of squared residuals — the chi-squared.

\chi^2(\theta) = \sum_{i=1}^{N} \frac{\left(y_i - f(x_i;\theta)\right)^2}{\sigma_i^2}

Each residual is weighted by 1/\sigma_i^2, so precise points (small \sigma_i) pull the fit harder. Minimizing \chi^2 is the maximum-likelihood estimate when the errors are Gaussian.

Data points with error bars and the best-fit line; the fit minimizes the total chi-squared — the sum of squared vertical residuals, each weighted by its point's error.

\chi^2_\nu = \frac{\chi^2_{\min}}{N - p}

The reduced chi-squared, dividing by the degrees of freedom \nu=N-p (data points minus fitted parameters). It is the headline goodness-of-fit diagnostic.

This is where fitting meets inference: least squares is the maximum-likelihood estimate for Gaussian errors, and the curvature of \chi^2 around its minimum gives the uncertainties on the fitted parameters. A fit is not just a line through points; it is a measurement of \theta, delivered with its own error bars.