Skill Tracer
Skills › Scientific Agent Skills › uncertainty-and-units › gum-methodology.md

gum-methodology.md

238 lines · skills/uncertainty-and-units/references/gum-methodology.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# GUM methodology
2
3The *Guide to the Expression of Uncertainty in Measurement* (JCGM 100:2008, "the GUM")
4and its Supplement 1 (JCGM 101:2008, the Monte Carlo method) define how an uncertainty
5is evaluated, combined, and reported. This file covers the parts that decide whether a
6number is defensible.
7

GUM methodology

The Guide to the Expression of Uncertainty in Measurement (JCGM 100:2008, "the GUM") and its Supplement 1 (JCGM 101:2008, the Monte Carlo method) define how an uncertainty is evaluated, combined, and reported. This file covers the parts that decide whether a number is defensible.

Raw lines 1 to 7
8## Vocabulary that has to stay straight
9
10| Term | Symbol | Meaning |
11| --- | --- | --- |
12| Measurand | Y | the quantity intended to be measured |
13| Estimate | y | the value obtained for it |
14| Standard uncertainty | u(x) | uncertainty of an input, expressed as a standard deviation |
15| Combined standard uncertainty | u_c(y) | standard uncertainty of the result |
16| Expanded uncertainty | U | k * u_c(y) |
17| Coverage factor | k | multiplier chosen for a stated coverage probability |
18| Coverage probability | p | probability that the interval contains the measurand |
20"Error" and "uncertainty" are not synonyms: error is measured value minus a reference
21value; uncertainty characterizes dispersion of values attributed to the measurand.
22Accuracy is qualitative. Precision can be quantified by a standard deviation, variance,
23or coefficient of variation under specified conditions (VIM 2.15).

Vocabulary that has to stay straight

TermSymbolMeaning
MeasurandYthe quantity intended to be measured
Estimateythe value obtained for it
Standard uncertaintyu(x)uncertainty of an input, expressed as a standard deviation
Combined standard uncertaintyu_c(y)standard uncertainty of the result
Expanded uncertaintyUk * u_c(y)
Coverage factorkmultiplier chosen for a stated coverage probability
Coverage probabilitypprobability that the interval contains the measurand

"Error" and "uncertainty" are not synonyms: error is measured value minus a reference value; uncertainty characterizes dispersion of values attributed to the measurand. Accuracy is qualitative. Precision can be quantified by a standard deviation, variance, or coefficient of variation under specified conditions (VIM 2.15).

Raw lines 8 to 24
25## Type A and Type B are methods, not qualities
27The distinction is only about *how the uncertainty was evaluated*. Neither is more
28reliable than the other, and both produce a standard uncertainty on the same footing.
30**Type A** — evaluated from a statistical analysis of repeated observations.
32For n independent readings with experimental standard deviation s(q):
34```text
35u(q_bar) = s(q) / sqrt(n) degrees of freedom: nu = n - 1
36```
38The standard uncertainty of the *mean* is what enters the budget when the reported
39value is a mean. Using s(q) itself overstates it by sqrt(n); using `numpy.std` without
40`ddof=1` understates s(q) itself. Both mistakes are common and neither is visible in
41the output.
43Pool repeatability only when a common variance model is defensible; the same instrument
44does not rule out drift, dependence, or different between-run variation.
46**Type B** — evaluated by any other means: a calibration certificate, a manufacturer's
47specification, a handbook value, a previous measurement, or documented judgement.
49The stated quantity is converted to a standard uncertainty by dividing by a factor that
50depends on what the statement means:
52| What the source states | Assumed density | Divisor | u |
53| --- | --- | --- | --- |
54| Expanded uncertainty U with stated factor k | use the source model; not necessarily normal | k | U / k |
55| Symmetric 95% interval justified by a large-sample normal model | normal | 1.96 | half-width / 1.96 |
56| A standard uncertainty | any assigned density with this SD | 1 | as stated |
57| Limits ±a, any value equally likely | rectangular | sqrt(3) | a / sqrt(3) |
58| Limits ±a, centre far more likely | triangular | sqrt(6) | a / sqrt(6) |
59| Limits ±a, extremes more likely (sinusoidal drift, cyclic error) | arcsine | sqrt(2) | a / sqrt(2) |
61A 95% label alone does not identify a divisor: recover the source method, degrees of
62freedom, asymmetry, and whether the interval is a confidence, coverage, or prediction
63interval. Rectangular is a common model when a specification gives limits and says nothing about the
64distribution inside them. Digital resolution of one least significant digit d gives
65half-width a = d/2, so u = d / (2 sqrt(3)).
67The most frequent Type B error is treating a certificate's expanded uncertainty as a
68standard uncertainty: it silently doubles the reported interval.

Type A and Type B are methods, not qualities

The distinction is only about how the uncertainty was evaluated. Neither is more reliable than the other, and both produce a standard uncertainty on the same footing.

Type A — evaluated from a statistical analysis of repeated observations.

For n independent readings with experimental standard deviation s(q):

u(q_bar) = s(q) / sqrt(n)          degrees of freedom: nu = n - 1

The standard uncertainty of the mean is what enters the budget when the reported value is a mean. Using s(q) itself overstates it by sqrt(n); using numpy.std without ddof=1 understates s(q) itself. Both mistakes are common and neither is visible in the output.

Pool repeatability only when a common variance model is defensible; the same instrument does not rule out drift, dependence, or different between-run variation.

Type B — evaluated by any other means: a calibration certificate, a manufacturer's specification, a handbook value, a previous measurement, or documented judgement.

The stated quantity is converted to a standard uncertainty by dividing by a factor that depends on what the statement means:

What the source statesAssumed densityDivisoru
Expanded uncertainty U with stated factor kuse the source model; not necessarily normalkU / k
Symmetric 95% interval justified by a large-sample normal modelnormal1.96half-width / 1.96
A standard uncertaintyany assigned density with this SD1as stated
Limits ±a, any value equally likelyrectangularsqrt(3)a / sqrt(3)
Limits ±a, centre far more likelytriangularsqrt(6)a / sqrt(6)
Limits ±a, extremes more likely (sinusoidal drift, cyclic error)arcsinesqrt(2)a / sqrt(2)

A 95% label alone does not identify a divisor: recover the source method, degrees of freedom, asymmetry, and whether the interval is a confidence, coverage, or prediction interval. Rectangular is a common model when a specification gives limits and says nothing about the distribution inside them. Digital resolution of one least significant digit d gives half-width a = d/2, so u = d / (2 sqrt(3)).

The most frequent Type B error is treating a certificate's expanded uncertainty as a standard uncertainty: it silently doubles the reported interval.

Raw lines 25 to 69
70## Law of propagation of uncertainty
72For a model Y = f(X_1, ..., X_N) with uncorrelated inputs (JCGM 100:2008 equation 10):
74```text
75u_c(y)^2 = sum_i ( df/dx_i )^2 * u(x_i)^2
76```
78with correlated inputs (equation 13):
80```text
81u_c(y)^2 = sum_i ( df/dx_i )^2 u(x_i)^2
82 + 2 * sum_i sum_{j>i} (df/dx_i)(df/dx_j) u(x_i) u(x_j) r(x_i, x_j)
83```
85The partial derivatives are the **sensitivity coefficients** c_i. They carry units, and
86`c_i * u(x_i)` is the contribution of that input expressed in the units of the result.
87Comparing contributions, not raw uncertainties, is what tells you where to spend effort.
89Correlation is not exotic. It appears whenever two inputs were calibrated against the
90same standard, corrected with the same reference value, measured with the same
91instrument, or derived from a common fit. The sign of the covariance contribution is `c_i*c_j*r_ij`, not the sign of `r_ij`
92alone. Positive correlation increases uncertainty in a sum and can reduce it in a
93difference; negative correlation has the reverse effect. In a difference of two similar quantities
94measured the same way, the correlation is the whole point — it is what makes the
95difference more precise than either term.

Law of propagation of uncertainty

For a model Y = f(X_1, ..., X_N) with uncorrelated inputs (JCGM 100:2008 equation 10):

u_c(y)^2 = sum_i ( df/dx_i )^2 * u(x_i)^2

with correlated inputs (equation 13):

u_c(y)^2 = sum_i ( df/dx_i )^2 u(x_i)^2
         + 2 * sum_i sum_{j>i} (df/dx_i)(df/dx_j) u(x_i) u(x_j) r(x_i, x_j)

The partial derivatives are the sensitivity coefficients c_i. They carry units, and c_i * u(x_i) is the contribution of that input expressed in the units of the result. Comparing contributions, not raw uncertainties, is what tells you where to spend effort.

Correlation is not exotic. It appears whenever two inputs were calibrated against the same standard, corrected with the same reference value, measured with the same instrument, or derived from a common fit. The sign of the covariance contribution is c_i*c_j*r_ij, not the sign of r_ij alone. Positive correlation increases uncertainty in a sum and can reduce it in a difference; negative correlation has the reverse effect. In a difference of two similar quantities measured the same way, the correlation is the whole point — it is what makes the difference more precise than either term.

Raw lines 70 to 96
97## Degrees of freedom and the coverage factor
99k = 2 gives about 95% coverage for an approximately normal output with sufficiently
100well-determined standard uncertainty. Large degrees of freedom alone do not make an
101output normal. The Welch-Satterthwaite formula (JCGM 100:2008 G.2b)
102gives them:
104```text
105nu_eff = u_c(y)^4 / sum_i ( (c_i u(x_i))^4 / nu_i )
106```
108Assigning infinite degrees of freedom to Type B components assumes their uncertainty
109evaluations are sufficiently reliable. This is not automatic: GUM G.4.2 allows finite
110values based on the uncertainty of the uncertainty. Infinite-dof terms drop out of the denominator. A single Type A component
111from a handful of readings can pull nu_eff low enough that k rises well above 2:
113| nu_eff | k for p = 95% |
114| --- | --- |
115| 2 | 4.30 |
116| 5 | 2.57 |
117| 10 | 2.23 |
118| 20 | 2.09 |
119| 50 | 2.01 |
120| infinite | 1.96 |
122If the dominant component came from five readings, reporting k = 2 understates the
123interval by about a quarter. The formula assumes uncorrelated inputs; with correlation
124the independent-input formula must not be used without a justified extension or
125reformulation in terms of independent sources.

Degrees of freedom and the coverage factor

k = 2 gives about 95% coverage for an approximately normal output with sufficiently well-determined standard uncertainty. Large degrees of freedom alone do not make an output normal. The Welch-Satterthwaite formula (JCGM 100:2008 G.2b) gives them:

nu_eff = u_c(y)^4 / sum_i ( (c_i u(x_i))^4 / nu_i )

Assigning infinite degrees of freedom to Type B components assumes their uncertainty evaluations are sufficiently reliable. This is not automatic: GUM G.4.2 allows finite values based on the uncertainty of the uncertainty. Infinite-dof terms drop out of the denominator. A single Type A component from a handful of readings can pull nu_eff low enough that k rises well above 2:

nu_effk for p = 95%
24.30
52.57
102.23
202.09
502.01
infinite1.96

If the dominant component came from five readings, reporting k = 2 understates the interval by about a quarter. The formula assumes uncorrelated inputs; with correlation the independent-input formula must not be used without a justified extension or reformulation in terms of independent sources.

Raw lines 97 to 126
127## When the GUM framework is not applicable
129The framework linearizes f about the estimates. That is fine when the model is close to
130linear across the input uncertainties, and wrong when it is not. Specifically, it
131breaks down when:
133- the model is significantly nonlinear over ±2u of an input — squares, reciprocals,
134 ratios of comparable quantities, exponentials;
135- a single non-normal component dominates, so the output is not approximately normal
136 and k from a t-distribution does not deliver the claimed coverage;
137- the output distribution is asymmetric, which the symmetric interval y ± U cannot
138 represent;
139- an input's relative uncertainty is large (above roughly 20-30%), where the second-order
140 terms the expansion drops are no longer negligible;
141- the model has a bound the interval crosses — a variance, a concentration, or a
142 squared quantity whose GUM interval extends below zero.

When the GUM framework is not applicable

The framework linearizes f about the estimates. That is fine when the model is close to linear across the input uncertainties, and wrong when it is not. Specifically, it breaks down when:

  • the model is significantly nonlinear over ±2u of an input — squares, reciprocals, ratios of comparable quantities, exponentials;
  • a single non-normal component dominates, so the output is not approximately normal and k from a t-distribution does not deliver the claimed coverage;
  • the output distribution is asymmetric, which the symmetric interval y ± U cannot represent;
  • an input's relative uncertainty is large (above roughly 20-30%), where the second-order terms the expansion drops are no longer negligible;
  • the model has a bound the interval crosses — a variance, a concentration, or a squared quantity whose GUM interval extends below zero.
Raw lines 127 to 143
144## Monte Carlo propagation (JCGM 101:2008)
146The supplement propagates the input distributions rather than their standard
147deviations. The procedure is:
1491. assign a probability density to each input, not merely a standard uncertainty;
1502. draw M samples from the joint density, respecting any correlation;
1513. evaluate the model for each draw;
1524. take the mean as the estimate and the standard deviation as u_c;
1535. take a coverage interval from the sorted output.
155Two intervals are defined and they differ for an asymmetric output. The
156**probabilistically symmetric** interval cuts (1-p)/2 from each tail. The **shortest**
157interval is the narrowest one containing the fraction p; it can be useful for skewed unimodal outputs. State which interval is used. Equal-tail
158and shortest intervals need not agree for symmetric multimodal distributions, and a
159shortest interval need not be unique. A single interval can obscure separated modes.
161M = 10^6 is the usual starting point for a 95% interval; JCGM 101 also defines an
162adaptive procedure that keeps drawing until the results are stable to within the
163numerical tolerance below. A fixed trial count does not guarantee endpoint accuracy; assess stabilization of the
164mean, SD, and endpoints against the requested numerical tolerance.

Monte Carlo propagation (JCGM 101:2008)

The supplement propagates the input distributions rather than their standard deviations. The procedure is:

  1. assign a probability density to each input, not merely a standard uncertainty;
  2. draw M samples from the joint density, respecting any correlation;
  3. evaluate the model for each draw;
  4. take the mean as the estimate and the standard deviation as u_c;
  5. take a coverage interval from the sorted output.

Two intervals are defined and they differ for an asymmetric output. The probabilistically symmetric interval cuts (1-p)/2 from each tail. The shortest interval is the narrowest one containing the fraction p; it can be useful for skewed unimodal outputs. State which interval is used. Equal-tail and shortest intervals need not agree for symmetric multimodal distributions, and a shortest interval need not be unique. A single interval can obscure separated modes.

M = 10^6 is the usual starting point for a 95% interval; JCGM 101 also defines an adaptive procedure that keeps drawing until the results are stable to within the numerical tolerance below. A fixed trial count does not guarantee endpoint accuracy; assess stabilization of the mean, SD, and endpoints against the requested numerical tolerance.

Raw lines 144 to 165
166## Comparing intervals without overstating validation
168JCGM 101 clause 8 is the reason to run both methods rather than choosing one. Write u(y)
169from the stabilized Monte Carlo result to n_dig significant digits (1 or 2) as c × 10^L. The numerical
170tolerance is half of that last digit:
172```text
173delta = 0.5 * 10^L
174```
176Compare the endpoints of the two coverage intervals:
178```text
179d_low = | (y - U) - y_low_MC |
180d_high = | (y + U) - y_high_MC |
181```
183With Monte Carlo numerically stabilized to delta/5 (clause 8.2), endpoint agreement
184supports the GUM interval for this model, PDF assignment, probability, and interval
185type. Disagreement can reflect nonlinearity or a poor output-distribution approximation.
186It does not by itself establish which measurement model or input PDFs are appropriate.
188`scripts/propagate_uncertainty.py` runs a fixed number of trials and reports only an
189endpoint-agreement diagnostic; `gum_framework_validated` is null. It does not implement
190the adaptive stabilization procedure. Finite dof alter the GUM factor but not the MC
191input PDFs, so their difference may reflect different distributional assumptions.
192Neither numerical agreement nor propagation mechanics proves metrological traceability,
193empirical coverage, or correctness of the measurement model. Two useful examples:
195**Rectangular inputs, linear model.** A model dominated by rectangular contributions
196can fail interval agreement even though it is perfectly linear: the true output distribution is
197closer to trapezoidal than normal, and k = 1.96 over-covers. The GUM value and u_c are
198right; the interval is too wide.
200**Nonlinear model.** For y = x^2 with x = 1.0 ± 0.5, the framework gives y = 1.0,
201u_c = 1.0, and a 95% interval of [-0.96, 2.96] — an interval that is partly negative
202for a squared quantity. Monte Carlo gives a mean of 1.25, u_c = 1.06, and a shortest
20395% interval of [0, 3.32]. The GUM interval includes values the model cannot produce.

Comparing intervals without overstating validation

JCGM 101 clause 8 is the reason to run both methods rather than choosing one. Write u(y) from the stabilized Monte Carlo result to n_dig significant digits (1 or 2) as c × 10^L. The numerical tolerance is half of that last digit:

delta = 0.5 * 10^L

Compare the endpoints of the two coverage intervals:

d_low  = | (y - U)      - y_low_MC  |
d_high = | (y + U)      - y_high_MC |

With Monte Carlo numerically stabilized to delta/5 (clause 8.2), endpoint agreement supports the GUM interval for this model, PDF assignment, probability, and interval type. Disagreement can reflect nonlinearity or a poor output-distribution approximation. It does not by itself establish which measurement model or input PDFs are appropriate.

scripts/propagate_uncertainty.py runs a fixed number of trials and reports only an endpoint-agreement diagnostic; gum_framework_validated is null. It does not implement the adaptive stabilization procedure. Finite dof alter the GUM factor but not the MC input PDFs, so their difference may reflect different distributional assumptions. Neither numerical agreement nor propagation mechanics proves metrological traceability, empirical coverage, or correctness of the measurement model. Two useful examples:

Rectangular inputs, linear model. A model dominated by rectangular contributions can fail interval agreement even though it is perfectly linear: the true output distribution is closer to trapezoidal than normal, and k = 1.96 over-covers. The GUM value and u_c are right; the interval is too wide.

Nonlinear model. For y = x^2 with x = 1.0 ± 0.5, the framework gives y = 1.0, u_c = 1.0, and a 95% interval of [-0.96, 2.96] — an interval that is partly negative for a squared quantity. Monte Carlo gives a mean of 1.25, u_c = 1.06, and a shortest 95% interval of [0, 3.32]. The GUM interval includes values the model cannot produce.

Raw lines 166 to 204
Runs code scripts/propagate_uncertainty.py :188
205## Order of operations
2071. Write the measurement model explicitly, including every correction, even those whose
208 value is zero. A correction with an estimated value of zero still has an uncertainty,
209 and leaving it out of the model leaves its uncertainty out of the budget.
2102. Assign each input an estimate, a standard uncertainty, a distribution, and degrees of
211 freedom.
2123. Identify correlations before combining anything.
2134. Compute sensitivity coefficients and the budget.
2145. Combine, and check the linearization against Monte Carlo.
2156. Choose k from nu_eff, not by habit.
2167. Round the uncertainty first, then the value (see `reporting-rules.md`).

Order of operations

  1. Write the measurement model explicitly, including every correction, even those whose value is zero. A correction with an estimated value of zero still has an uncertainty, and leaving it out of the model leaves its uncertainty out of the budget.
  2. Assign each input an estimate, a standard uncertainty, a distribution, and degrees of freedom.
  3. Identify correlations before combining anything.
  4. Compute sensitivity coefficients and the budget.
  5. Combine, and check the linearization against Monte Carlo.
  6. Choose k from nu_eff, not by habit.
  7. Round the uncertainty first, then the value (see reporting-rules.md).
Raw lines 205 to 217
218## Recurring defects
220- Reporting a standard deviation of readings as the uncertainty of their mean.
221- Dividing a certificate's expanded uncertainty by nothing, or by 2 when the certificate
222 states a different k.
223- Omitting a correction from the model because its value is negligible, thereby omitting
224 its uncertainty too.
225- Combining relative and absolute uncertainties without converting.
226- Treating resolution and repeatability as independent when the resolution is what
227 limits the repeatability — double counting.
228- Quoting k = 2 with an effective degrees of freedom below 10.
229- Applying the framework to a strongly nonlinear model and never checking.
230- Propagating uncertainty through a fitted model without using the fit's covariance
231 matrix, which discards the correlation between the fitted parameters.

Recurring defects

  • Reporting a standard deviation of readings as the uncertainty of their mean.
  • Dividing a certificate's expanded uncertainty by nothing, or by 2 when the certificate states a different k.
  • Omitting a correction from the model because its value is negligible, thereby omitting its uncertainty too.
  • Combining relative and absolute uncertainties without converting.
  • Treating resolution and repeatability as independent when the resolution is what limits the repeatability — double counting.
  • Quoting k = 2 with an effective degrees of freedom below 10.
  • Applying the framework to a strongly nonlinear model and never checking.
  • Propagating uncertainty through a fitted model without using the fit's covariance matrix, which discards the correlation between the fitted parameters.
Raw lines 218 to 232
233## Current primary guidance
235Reviewed 2026-10-01: [BIPM JCGM publications](https://www.bipm.org/en/committees/jc/jcgm/publications),
236[JCGM 100](https://www.bipm.org/documents/20126/2071204/JCGM_100_2008_E.pdf),
237[JCGM 101](https://www.bipm.org/documents/20126/2071204/JCGM_101_2008_E.pdf),
238and [VIM precision](https://jcgm.bipm.org/vim/en/2.15.html).

Current primary guidance

Reviewed 2026-10-01: BIPM JCGM publications, JCGM 100, JCGM 101, and VIM precision.

Raw lines 233 to 238