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 independent readings shrinks it by a factor of . 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.
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.
Write the measurement model, the formula that computes the result from the input quantities to : readings, corrections and constants such as the timer rate.
Evaluate a standard uncertainty for each input. A Type A evaluation uses statistics of repeated readings, for example the standard error §11.15 of a mean of independent readings whose sample standard deviation is . 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 of a value, with no value in that range more likely than another, is given a rectangular (uniform) distribution, whose standard uncertainty is .
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 and that must be estimated.
Combine the standard uncertainties with the law of propagation of uncertainty, stated below, into the combined standard uncertainty .
Expand and report. Multiply by a coverage factor to obtain the expanded uncertainty , and report together with . The value 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 ppm. The 16 durations have a mean of 1,000,000 microseconds and a sample standard deviation microseconds.
Random, Type A: the standard error of the mean is microseconds.
Systematic, Type B: the rate error lies anywhere within ppm, so its standard uncertainty is ppm. On 1,000,000 microseconds that is microseconds.
The two causes are independent, so their variances (squared standard uncertainties) add: microseconds. With , the report is microseconds.
Averaging does not remove the systematic part. With 1600 runs, the standard error falls to microseconds, but 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 random parts are independent, so together they contribute microseconds.
The rate error is the same fraction of both readings, because both used one crystal, so the measured difference is microseconds, and contributes only microseconds.
The combined uncertainty of the difference is microseconds. Treating the two rate errors as independent would wrongly add microseconds for them, where , and inflate the result to microseconds.
Stated precisely
Let the result be , with standard uncertainties , and let be the sensitivity coefficient of input : how much changes per unit change of . Let be the correlation coefficient of the errors in and , so that their covariance, the measure of how the two errors vary together, is . The law of propagation of uncertainty, as NIST Technical Note 1297 states it, is It is exact when is linear in its inputs. Otherwise it is a first-order approximation, adequate when the uncertainties are small compared with the scale over which curves.
For a duration computed from two timer readings, and , so Two independent endpoint errors with standard uncertainty 2 microseconds each give microseconds. Two identical errors (), such as a constant offset of the clock, give : the offset cancels. If each endpoint error is instead known only to lie within microseconds, a worst-case bound on the error of is 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 with contains the true value with probability about 95% for only when the distribution of the result is approximately normal and is well estimated. When a Type A component rests on few readings, the GUM replaces 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
Uncertainty covers only the effects that were identified. A wrongly defined measurand, such as an interval timed between the wrong events, a blunder in the analysis, or an effect nobody thought of, is not in the budget, and no statistic reveals it.
Repeatability §11.43 is not accuracy. A tightly clustered series of readings has a small Type A uncertainty and can still lie far from the true value because of an uncorrected systematic error; the resolution versus precision versus accuracy §11.34 entry treats the distinction.
Repetition reduces only the random part, and only if the readings are independent. Readings that are positively correlated in time, such as consecutive operations sharing a queue, average down more slowly than .
Variation of the system is not measurement uncertainty. If operations really differ in duration, that spread is a property of the system and belongs in the result, as a distribution or percentiles §11.16. It enters the uncertainty only of a summary, such as the mean, through the standard error.
A standard uncertainty is not a bound. About a third of normally distributed errors are larger than one standard uncertainty.
Assuming independence when errors are shared overstates the uncertainty of comparisons and understates the uncertainty of totals.
A timer that counts in whole steps adds a quantization component, the error from rounding a time to whole counts, treated in the counter quantization §11.35 entry.
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 independent readings reduces them by a factor of . 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 microseconds and a systematic one of about 28.87 microseconds, which combine to 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].