Section 11.33

Measurement uncertainty

Definition

Measurement uncertainty is a non-negative number, or an interval, that states how far the true value of a measured quantity may plausibly lie from the reported value, given everything known about the measurement. The GUM (Guide to the Expression of Uncertainty in Measurement) expresses each contribution as a standard uncertainty: the standard deviation §11.14 (a measure of spread) of a probability distribution describing what is known about that contribution. The error is the unknown difference between the reported and true values; the uncertainty states how large the error plausibly is.

The idea

A developer times an operation with a hardware timer and reports 1 second. Several things limit what that number means. The operation’s duration varies from run to run, so the mean of a few runs is itself uncertain. The timer’s crystal oscillator, the vibrating quartz part that sets its rate, may run up to 50 ppm (parts per million) fast or slow, so every reading may be stretched or shrunk by up to that fraction. And the timer is read a short, variable time after each event, so each endpoint of the interval is slightly off. An honest report says how large each effect can be and how the effects combine.

The effects behave differently across readings. A random component changes unpredictably from one reading to the next, and averaging nn independent readings shrinks it by a factor of n\sqrt{n}. A systematic component, like the crystal’s rate error, has the same value in every reading made under the same conditions, and averaging does not shrink it. A correlated component is shared by two quantities, such as two durations measured with the same timer; it cancels in a difference and adds up in a sum. The label depends on the comparison: a crystal’s rate error is systematic for one device but varies at random across a batch of devices.

A bathroom scale is a fair picture. Averaging ten weighings removes the wobble of the needle, but not the error of a scale that reads 2 kilograms heavy every time. The picture stops being accurate in one respect: a scale usually answers a question about one absolute weight, whereas timing often compares two versions measured with the same timer, and in that comparison a shared rate error largely cancels.

How it works

The GUM is the international guide on the subject. Its procedure, which NIST adopted for its own measurement results in its Technical Note 1297, has six steps.

  1. Define the measurand, the quantity intended to be measured, precisely enough that it has one value: for example, the mean time from the arrival of a request to the sending of the last byte of its answer, on this device, under this workload.

  2. Write the measurement model, the formula y=f(x1,…,xN)y = f(x_1, \dots, x_N) that computes the result yy from the input quantities x1x_1 to xNx_N: readings, corrections and constants such as the timer rate.

  3. Evaluate a standard uncertainty u(xi)u(x_i) for each input. A Type A evaluation uses statistics of repeated readings, for example the standard error §11.15 s/ns/\sqrt{n} of a mean of nn independent readings whose sample standard deviation is ss. A Type B evaluation uses other knowledge, such as a datasheet, a calibration §11.42 certificate or the resolution of the timer. A quantity known only to lie within ±a\pm a of a value, with no value in that range more likely than another, is given a rectangular (uniform) distribution, whose standard uncertainty is a/3a/\sqrt{3}.

  4. Identify correlations §15.44. Inputs that share a cause, such as two readings of the same clock or two corrections taken from the same calibration, have a correlation coefficient between −1-1 and +1+1 that must be estimated.

  5. Combine the standard uncertainties with the law of propagation of uncertainty, stated below, into the combined standard uncertainty uc(y)u_c(y).

  6. Expand and report. Multiply by a coverage factor kk to obtain the expanded uncertainty U=kuc(y)U = k\,u_c(y), and report y±Uy \pm U together with kk. The value k=2k = 2 gives an interval with about 95% coverage when the distribution of the result is approximately normal (bell-shaped).

The list of inputs with their standard uncertainties, types and correlations is called the uncertainty budget. Writing it down answers the question of which components are random, systematic or correlated. The GUM itself classifies evaluations as Type A or Type B rather than components as random or systematic, because those labels depend on the use: a random component of one measurement becomes a systematic component of a later measurement that uses the first result as an input. The GUM also expects every recognized systematic effect to be corrected; what remains is the uncertainty of the correction, evaluated like any other input.

Worked example

An uncertainty budget. An operation is timed 16 times with a timer whose crystal is specified as accurate to within ±50\pm 50 ppm. The 16 durations have a mean of 1,000,000 microseconds and a sample standard deviation s=200s = 200 microseconds.

The two causes are independent, so their variances (squared standard uncertainties) add: uc=502+28.872=2500+833.3=3333.3≈57.7u_c = \sqrt{50^2 + 28.87^2} = \sqrt{2500 + 833.3} = \sqrt{3333.3} \approx 57.7 microseconds. With k=2k = 2, the report is 1,000,000±1151{,}000{,}000 \pm 115 microseconds.

Averaging does not remove the systematic part. With 1600 runs, the standard error falls to 200/1600=200/40=5200/\sqrt{1600} = 200/40 = 5 microseconds, but uc=52+28.872=25+833.3=858.3≈29.3u_c = \sqrt{5^2 + 28.87^2} = \sqrt{25 + 833.3} = \sqrt{858.3} \approx 29.3 microseconds. A hundred times as many runs reduce the combined uncertainty only from 57.7 to 29.3 microseconds, and no number of runs takes it below 28.87 microseconds. Only a calibration of the crystal against a better reference can.

Correlation decides the uncertainty of a comparison. Version A measures 1,000,000 microseconds and version B measures 990,000 microseconds, both with the same timer, each a mean of 16 runs with a standard error of 50 microseconds. Their difference is 10,000 microseconds.

The combined uncertainty of the difference is 5000+0.292≈70.7\sqrt{5000 + 0.29^2} \approx 70.7 microseconds. Treating the two rate errors as independent would wrongly add 28.872+28.582≈833.5+816.8≈40.6\sqrt{28.87^2 + 28.58^2} \approx \sqrt{833.5 + 816.8} \approx 40.6 microseconds for them, where 990,000×28.87×10−6≈28.58990{,}000 \times 28.87 \times 10^{-6} \approx 28.58, and inflate the result to 5000+1650≈81.5\sqrt{5000 + 1650} \approx 81.5 microseconds.

Stated precisely

Let the result be y=f(x1,…,xN)y = f(x_1, \dots, x_N), with standard uncertainties u(xi)u(x_i), and let ci=∂f/∂xic_i = \partial f / \partial x_i be the sensitivity coefficient of input ii: how much yy changes per unit change of xix_i. Let rijr_{ij} be the correlation coefficient of the errors in xix_i and xjx_j, so that their covariance, the measure of how the two errors vary together, is u(xi,xj)=riju(xi)u(xj)u(x_i, x_j) = r_{ij}\,u(x_i)\,u(x_j). The law of propagation of uncertainty, as NIST Technical Note 1297 states it, is uc2(y)=∑i=1Nci2u2(xi)+2∑i=1N−1∑j=i+1Ncicju(xi,xj).u_c^2(y) = \sum_{i=1}^{N} c_i^2\,u^2(x_i) + 2 \sum_{i=1}^{N-1} \sum_{j=i+1}^{N} c_i\,c_j\,u(x_i, x_j). It is exact when ff is linear in its inputs. Otherwise it is a first-order approximation, adequate when the uncertainties are small compared with the scale over which ff curves.

For a duration D=t2−t1D = t_2 - t_1 computed from two timer readings, c1=−1c_1 = -1 and c2=+1c_2 = +1, so uc2(D)=u2(t1)+u2(t2)−2u(t1,t2).u_c^2(D) = u^2(t_1) + u^2(t_2) - 2\,u(t_1, t_2). Two independent endpoint errors with standard uncertainty 2 microseconds each give uc=4+4=8≈2.83u_c = \sqrt{4 + 4} = \sqrt{8} \approx 2.83 microseconds. Two identical errors (r12=1r_{12} = 1), such as a constant offset of the clock, give uc2=4+4−2×4=0u_c^2 = 4 + 4 - 2 \times 4 = 0: the offset cancels. If each endpoint error is instead known only to lie within ±2\pm 2 microseconds, a worst-case bound on the error of DD is 2+2=42 + 2 = 4 microseconds. A bound and a standard uncertainty answer different questions and must not be combined as if they were the same kind of number.

The interval y±Uy \pm U with U=kucU = k\,u_c contains the true value with probability about 95% for k=2k = 2 only when the distribution of the result is approximately normal and ucu_c is well estimated. When a Type A component rests on few readings, the GUM replaces k=2k = 2 by a value from Student’s t distribution, with an effective number of degrees of freedom computed by the Welch–Satterthwaite formula.

Limits and common mistakes

Questions answered

Which uncertainty components are random, systematic, or correlated?

An uncertainty component is random if its value changes unpredictably from one reading to the next, systematic if it has the same value in every reading made under the same conditions, and correlated if it is shared by two or more of the quantities that are combined; which label applies depends on which readings are being compared. In timing, random components include the run-to-run variation of the operation and the jitter (small random variation) in when each timer reading is taken; averaging nn independent readings reduces them by a factor of n\sqrt{n}. Systematic components include the timer’s rate error, a fixed delay between an event and its timestamp, and a wrong conversion constant; averaging leaves them untouched, and only calibration against a better reference reduces them.

Correlated components are shared between inputs: two timestamps from one clock share its offset and rate error, and two versions timed with one timer share its rate error. A shared offset cancels in a duration and a shared rate error largely cancels in a comparison, while shared errors add up in sums. To answer the question for a real measurement, write an uncertainty budget: list every input with its standard uncertainty (the standard deviation that describes what is known about it), say whether it was evaluated by Type A (from repeated readings) or Type B (from other knowledge such as a datasheet), and state which inputs share a cause and how strongly they are correlated. For example, a 1-second mean of 16 runs with a standard deviation of 200 microseconds, timed with a crystal accurate to 50 ppm (parts per million), has a random component of 200/16=50200/\sqrt{16} = 50 microseconds and a systematic one of about 28.87 microseconds, which combine to 502+28.872≈57.7\sqrt{50^2 + 28.87^2} \approx 57.7 microseconds.

Related entries: Resolution versus precision versus accuracy (§11.34), Counter quantization (§11.35), Calibration (§11.42), Wall clock and clock synchronization (§9.36), Clock source and drift (§6.18), Standard error (§11.15). Further reading: [77].