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.

4. Repeated measurements

School of Engineering, Nazarbayev University

Track: core  ·  Prerequisites: Chapters 1 and 3

Reading: Taylor, ch. 4, 5.7 and 7 · Bevington & Robinson, ch. 1.3–1.4 and 4.1–4.2 · Fornasini, ch. 7 and 9.2 · Rouaud, ch. I.E · GUM, clause 4.2 and Annex G

The simplest way to learn about random error is to repeat the measurement. The scatter of the readings tells us how uncertain a single reading is, and the mean of the readings is a better estimate than any one of them. This notebook answers four questions.

  1. How much better is the mean of NN readings than a single reading?

  2. How well do we know the uncertainty itself?

  3. What changes when NN is small?

  4. What does averaging not cure?

It ends with the weighted mean, used to combine results of different quality.

4.1 Mean, standard deviation and standard error

Let x1,…,xNx_1, \dots, x_N be NN readings of the same quantity, taken under the same conditions. Three numbers summarise them.

The mean is the best estimate of the quantity,

xˉ=1N∑i=1Nxi.\bar{x} = \frac{1}{N}\sum_{i=1}^{N} x_i .

The sample standard deviation measures the scatter of the individual readings,

s=1N−1∑i=1N(xi−xˉ)2.s = \sqrt{\frac{1}{N-1}\sum_{i=1}^{N} (x_i - \bar{x})^2 } .

It estimates the standard deviation σ\sigma of the underlying distribution, and so it is the uncertainty of one reading. The divisor is N−1N-1 and not NN because the deviations are taken from xˉ\bar x, which was itself computed from the same data and therefore lies closer to the readings than the true value does; one “degree of freedom” has been used.

The standard error of the mean is the uncertainty of xˉ\bar{x},

uxˉ=sN.u_{\bar{x}} = \frac{s}{\sqrt{N}} .

Where the N\sqrt{N} comes from

The mean is a function of the NN readings, xˉ=1N(x1+⋯+xN)\bar x = \tfrac1N(x_1 + \dots + x_N), and we can apply the propagation law of Chapter 3. Each sensitivity coefficient is ∂xˉ/∂xi=1/N\partial\bar x/\partial x_i = 1/N, each reading has the same uncertainty σ\sigma, and the readings are independent, so

uxˉ2=∑i=1N(1N)2σ2=σ2N.u_{\bar x}^2 = \sum_{i=1}^{N} \left(\frac{1}{N}\right)^{2}\sigma^2 = \frac{\sigma^2}{N} .

The standard error is thus not a new concept but the first application of error propagation. Note where independence was used. If successive readings are correlated, as successive configurations in a simulation always are, the cross terms survive and s/Ns/\sqrt{N} is too small; see Chapter 17.

An example

Ten readings of the time for a ball to roll down a ramp, in seconds:

mean               = 2.3070 s
standard deviation = 0.0333 s   (uncertainty of one reading)
standard error     = 0.0105 s   (uncertainty of the mean)
result: t = 2.307 ± 0.011 s

4.2 Seeing the 1/N1/\sqrt{N} law

The claim uxˉ=σ/Nu_{\bar x} = \sigma/\sqrt N is a statement about what would happen if the whole experiment, all NN readings, were repeated many times: the means would scatter with standard deviation σ/N\sigma/\sqrt N. In the laboratory we rarely have time for that. On a computer we do.

Below, one “experiment” consists of NN readings drawn from a normal distribution with true value 2.30 s and σ=0.03\sigma = 0.03 s. We repeat the experiment 20 000 times for each NN and look at the distribution of means.

<Figure size 1012x429 with 2 Axes>

The 1/N1/\sqrt N law is a law of diminishing returns. Going from 1 to 4 readings halves the uncertainty; halving it again needs 16 readings, and again 64. To gain one more significant figure takes a hundred times the effort. Beyond ten or twenty readings it is usually wiser to improve the instrument or the method.

4.3 The uncertainty of the uncertainty

The standard deviation ss is computed from the same NN noisy readings, so it is itself uncertain. For normally distributed readings its relative standard deviation is, to a good approximation,

uss≈12(N−1).\frac{u_s}{s} \approx \frac{1}{\sqrt{2(N-1)}} .
NN35102050200
us/su_s/s50 %35 %24 %16 %10 %5 %

From ten readings the uncertainty is known to about a quarter of its value. This is the reason for quoting uncertainties to one or two significant figures and no more.

  N   simulated u_s/s   1/sqrt(2(N-1))
   3      0.526            0.500
   5      0.362            0.354
  10      0.238            0.236
  20      0.163            0.162
  50      0.102            0.101
 200      0.050            0.050

(The simple formula is slightly off for N=3N = 3, where the distribution of ss is noticeably skewed.)

4.4 Small samples and Student’s tt

If σ\sigma were known exactly, the interval xˉ±σ/N\bar x \pm \sigma/\sqrt N would contain the true value in 68.3 % of all experiments. In practice we use ss in place of σ\sigma, and with few readings ss is sometimes much too small. The interval xˉ±s/N\bar x \pm s/\sqrt N then misses the true value more often than expected.

The exact correction, for normally distributed readings, is to widen the interval by a factor tp,νt_{p,\nu} taken from Student’s tt distribution with ν=N−1\nu = N-1 degrees of freedom:

xˉ±tp,ν sN.\bar x \pm t_{p,\nu}\,\frac{s}{\sqrt N} .
NN2351020∞\infty
tt for 68.3 %1.841.321.141.061.031.00
tt for 95 %12.74.302.782.262.091.96

The simulation below counts how often the interval contains the true value.

<Figure size 1012x429 with 2 Axes>

Panel (a): with three readings the plain “±2\pm 2 standard errors” interval contains the true value only about 82 % of the time instead of 95 %. With the tt factor the coverage is exact (open symbols on the dotted lines). From about ten readings the difference is small.

4.5 What averaging does not cure

Panel (b) shows the running mean of readings from an instrument that reads 0.02 s too long. The shaded band, the standard error, shrinks as 1/N1/\sqrt N and the running mean converges beautifully, to the wrong value. After 2000 readings the standard error is 0.0007 s and the result is wrong by thirty times that.

The standard error describes random scatter only. A complete uncertainty adds the Type B contributions of Chapter 1 in quadrature,

u2=s2N⏟Type A+uresolution2+ucalibration2+…⏟Type B,u^2 = \underbrace{\frac{s^2}{N}}_{\text{Type A}} + \underbrace{u_\text{resolution}^2 + u_\text{calibration}^2 + \dots}_{\text{Type B}} ,

and the Type B terms set a floor that no amount of repetition can lower. For the ramp timings of Section 4.1: the stopwatch displays hundredths of a second, and suppose its calibration is good to 0.005 s (standard uncertainty).

Type A (standard error)  : 0.0105 s
Type B (resolution)      : 0.0029 s
Type B (calibration)     : 0.0050 s
combined                 : 0.0120 s
result: t = 2.307 ± 0.012 s

A related point: if all readings come out identical, s=0s = 0, but the uncertainty is not zero. It only means that the random scatter is smaller than the resolution of the instrument, and the resolution term takes over.

4.6 Combining results of different quality: the weighted mean

Suppose the same quantity has been measured several times with different methods, giving independent results xi±uix_i \pm u_i. A plain average would let a poor result spoil a good one. Instead we look for the linear combination xˉw=∑iaixi\bar x_w = \sum_i a_i x_i with ∑iai=1\sum_i a_i = 1 that has the smallest variance ∑iai2ui2\sum_i a_i^2 u_i^2. Minimising with a Lagrange multiplier λ\lambda for the constraint gives 2aiui2=λ2a_iu_i^2 = \lambda, that is, ai∝1/ui2a_i \propto 1/u_i^2. With weights wi=1/ui2w_i = 1/u_i^2,

xˉw=∑iwixi∑iwi,uxˉw=1∑iwi.\bar{x}_w = \frac{\sum_i w_i x_i}{\sum_i w_i}, \qquad u_{\bar{x}_w} = \frac{1}{\sqrt{\sum_i w_i}} .

Each result is weighted by the inverse of its variance. For equal uncertainties this reduces to the ordinary mean and u/Nu/\sqrt N.

Before combining, check that the results are consistent. The reduced chi-square χν2=1N−1∑iwi(xi−xˉw)2\chi^2_\nu = \frac{1}{N-1}\sum_i w_i (x_i - \bar x_w)^2 should be around one. A value much larger than one says that the results disagree by more than their uncertainties allow, so at least one uncertainty is underestimated, and the weighted mean should not be trusted as it stands.

weighted mean   : 25.05 ± 0.11 N/m    (reduced chi-square 0.60)
unweighted mean : 24.98 ± 0.20 N/m

The weighted mean is close to the most precise result and slightly more precise than it. The unweighted mean ignores the quoted uncertainties and, with only three values, rests on a very poorly known standard deviation.

Summary

  • ss is the uncertainty of one reading; s/Ns/\sqrt N is the uncertainty of the mean of NN independent readings.

  • The standard error follows from the propagation law applied to the mean.

  • ss itself is uncertain by about 1/2(N−1)1/\sqrt{2(N-1)}, hence one or two significant figures.

  • For fewer than about ten readings, widen intervals with Student’s tt.

  • Averaging reduces random error only. Systematic and Type B contributions remain and must be added in quadrature.

  • Results of different quality are combined with weights 1/ui21/u_i^2, after checking their consistency.

Exercises

  1. Five readings of a length are 12.31, 12.35, 12.29, 12.34, 12.32 mm. Give the mean with its standard uncertainty and with a 95 % interval using Student’s tt.

  2. You have ten readings and want to halve the standard error. How many more readings do you need? What if a Type B contribution equal to the present standard error is also present: by how much does the combined uncertainty fall?

  3. Change the distribution in Section 4.2 from normal to uniform (same standard deviation). Does the 1/N1/\sqrt N law still hold? Is the distribution of the mean for N=5N = 5 still close to normal? (This is the central limit theorem at work.)

  4. Add a fourth result 26.9±0.326.9 \pm 0.3 N/m to the data of Section 4.6. What happens to the reduced chi-square, and what would you do next?