Converter tool

Measurement Uncertainty Budget

Propagate uncertainties through your measurement equation by the GUM method, with Type A and Type B inputs, correlations, effective degrees of freedom, and a Monte Carlo check.

Numbers, input names, + - * / ^ and common functions

1. Model equation

2 of 16

2. Input quantities

Input 1
Input 2

Optional, between pairs of inputs

3. Correlations

Inputs are treated as independent. Add a pair if two readings share an instrument or a temperature.

Measurement Uncertainty Budget Calculator

Operator: Abdulla Al Fahad. How tools are built and checked

An uncertainty statement is only as good as the budget behind it: which inputs feed the result, how sensitive the result is to each, how many degrees of freedom each estimate carries, and whether any of them move together. This page builds that budget from your own measurement equation, following the Guide to the Expression of Uncertainty in Measurement (JCGM 100:2008), and then checks it against a Monte Carlo run as GUM Supplement 1 (JCGM 101:2008) describes.

You type the equation, for example R = 1000 * V / I * cos(phi), describe each input as repeated readings or a Type B bound, add correlation coefficients if two inputs share a cause, and read the combined and expanded uncertainty.

Key features

  • Model equation parsed with an allow-list: numbers, input names, + - * / ^, parentheses, and 22 named functions such as sqrt, exp, log, sin, atan2 and pow
  • Type A from pasted readings (mean, s over the square root of n, n - 1 degrees of freedom) and Type B as standard uncertainty, expanded uncertainty with k, or rectangular, triangular or U-shaped with a half-width
  • Pairwise correlation coefficients, checked for consistency
  • Sensitivity coefficients from the symbolic derivative and from Ridders-extrapolated differences, compared with each other
  • Contribution table with share of variance, combined standard uncertainty, Welch-Satterthwaite effective degrees of freedom, t-based coverage factor and expanded uncertainty

How sensitivity coefficients, degrees of freedom and coverage factors are computed, and how the Monte Carlo check is judged

Variable names are letters, digits and underscores starting with a letter, up to 16 characters, and cannot clash with a function or constant name. The equation may start with a label and an equals sign. Anything else, such as assignments, strings, matrices or function definitions, is refused before any evaluation, and the parsed tree is copied into plain data and evaluated by the page's own routine, never by a general evaluator.

Type A readings can be separated by spaces, commas, semicolons or new lines. With fewer than four readings the Monte Carlo cannot use a t distribution (its variance is infinite below 4 degrees of freedom), so it samples that input as normal and says so.

Type B inputs may carry degrees of freedom, for instance 8 for a 25 % reliability of the uncertainty estimate, or none for infinity. Correlations enter the combined variance as 2 c_i c_j u_i u_j r_ij and are listed as a separate row of the contribution table.

The Monte Carlo draws correlated inputs through a Gaussian copula: correlated normal variates are mapped to each input's own distribution. This is an extension of Supplement 1, which treats multivariate normal inputs, and is noted next to the results. With the Type A box unticked, readings-based inputs follow Supplement 1's scaled t distribution instead, and inputs that are correlated and have the same degrees of freedom share one chi-square draw, so they form a multivariate t rather than independent ones.

How it works

The combined variance is the sum of (c_i u_i)^2 plus the correlation terms. The effective degrees of freedom are u_c^4 divided by the sum of (c_i u_i)^4 / nu_i, shown to one decimal and truncated to a whole number when the coverage factor is looked up, as the Guide's annex G requires, and that factor is the two-sided Student t value for that number and your coverage probability.

The Monte Carlo runs in a background worker with a seeded generator. It reports the mean, the standard deviation, and both the probabilistically symmetric and the shortest coverage interval. The two methods are said to agree when each end of the GUM interval lies within a tolerance of the shortest Monte Carlo interval's end; the tolerance is half a unit in the second significant digit of u_c, as in section 8 of the Supplement.

A model that returns a non-finite value in more than 1 % of trials stops the run with an explanation instead of reporting an interval built from what is left.

Common use cases

  • A calibration lab computes the uncertainty of a resistor measured through a voltage and a current reading, with the two readings taken from the same supply.
  • A student models the sum of two instruments' rectangular bounds and finds the GUM 95 % interval at 1.60 against a Monte Carlo interval of 1.55 because the result is triangular, not normal.

How to use this tool

  1. Type the model equation or load one of the examples.
  2. Add an input row for every quantity; choose Type A and paste readings, or a Type B form and fill the estimate and bound.
  3. Add correlations if any, and choose the coverage probability.
  4. Read the budget, then run the Monte Carlo check with a trial count and a seed.
  5. Download the CSV or the PDF report.
  6. If the intervals disagree, look at the contribution table to see which input dominates and whether it is normal.
  7. Change the Type A treatment between a scaled t and a plain normal to see how much the small number of readings widens the interval.

Example

The Guide's example H.2: five simultaneous readings of V (volts), I (milliamps) and phase angle (radians) across a component, with r(V, I) = -0.36, r(V, phi) = 0.86 and r(I, phi) = -0.65

R = 1000 * V / I * cos(phi)
V: 5.007 4.994 5.005 4.990 4.999
I: 19.663 19.639 19.640 19.685 19.678
phi: 1.0456 1.0438 1.0468 1.0428 1.0433

Resistance, X = 1000 V/I sin(phi) and Z = 1000 V/I from the same data

R = 127.732 ohm, u_c = 0.0702 ohm
X = 219.847 ohm, u_c = 0.2961 ohm, nu_eff = 50.6
Z = 254.260 ohm, u_c = 0.2367 ohm, nu_eff = 13.4
Correlation terms are -667 % of the variance of R

Common pitfalls

When correlation terms make up a large share of the variance, as for R above, the Welch-Satterthwaite formula (derived for uncorrelated inputs) gives an unreliable effective number of degrees of freedom; the page warns and offers a fixed k = 2.

A Type A input with few readings has a heavy-tailed Monte Carlo distribution, so the Monte Carlo interval can be wider than the GUM one even for a linear model.

Do not enter the same effect twice, once as a Type A input and again inside a Type B bound; the budget adds both.

The first-order method uses the sensitivity at the estimates. For strongly non-linear models near a singularity that can be far from the truth.

An uncertainty to more than two significant digits implies knowledge the inputs rarely have.

  • Write the equation in the units of your readings and put any unit factor in it, as the example does with the 1000 that turns volts per milliamp into ohms.
  • Enter the correlation of two quantities measured together; ignoring it can make the combined uncertainty far larger or smaller than it should be.

Common errors and how to fix them

"x2" is not one of the input quantities.
The equation uses a name that has no input row. Add a row with that name, or correct the spelling.
The function "floor" is not available.
Only the listed smooth functions are allowed. Use abs, min, max, sqrt and the others shown under the equation.
The correlation coefficients are not consistent with each other.
A set of pairwise values can be impossible, for example three inputs correlated +0.9, +0.9 and -0.9. Lower the larger values.

Reading the contribution table

Each row gives the input's estimate, its standard uncertainty, the sensitivity coefficient c_i (the change in the result per unit change of the input) and the product c_i u_i, which is that input's own contribution to the uncertainty of the result in the result's units. The share column is (c_i u_i)^2 over the combined variance. Without correlation the shares add to 100 %. With correlation a separate row carries the covariance terms, which can be negative.

The input with the largest share is where a better instrument or more readings pays off. Doubling the readings of a Type A input only reduces its u by 29 %, while swapping a rectangular bound for a narrower one reduces it in proportion.

What the Monte Carlo verdict means

Agreement does not make the GUM interval right in some absolute sense; it says the propagation of distributions gives the same interval within a stated tolerance. Disagreement is information too: it usually means one input with a non-normal shape dominates, the model is strongly non-linear, or a small Type A sample has heavier tails than the normal approximation assumes.

Frequently asked questions

Does the page reproduce the GUM's own example H.2?

Yes. The central values 127.732, 219.847 and 254.260 ohm reproduce the published results digit for digit. The combined uncertainties come out at 0.0702, 0.2961 and 0.2367 ohm against 0.071, 0.295 and 0.236 in the Guide, a difference of at most 1.5 %. The gap comes from entering the correlation coefficients as printed (-0.36, 0.86, -0.65): with coefficients computed from the five readings the same propagation gives 0.0711, 0.2956 and 0.2363 ohm. The Welch-Satterthwaite value for two uncorrelated inputs with 4 and 9 degrees of freedom (0.3 and 0.4) matches the hand formula to every digit, 12.835.

Why does the coverage factor sometimes differ from 2?

With few degrees of freedom the t distribution is wider than the normal: k = 2.18 for 12 degrees of freedom at 95 %, and 2.78 for 4. With infinite degrees of freedom it is 1.96. Use the fixed k = 2 option when your reporting rules require it.

What is the difference between the shortest and the symmetric interval?

The symmetric interval cuts equal probability from each tail. The shortest interval is the narrowest range holding the chosen probability, which is smaller for a skewed result. The agreement test uses the shortest, as the Supplement does.

Why does the Monte Carlo spread for R come out wider when I untick the normal option?

Supplement 1 models a mean of five readings as a t distribution with 4 degrees of freedom, and that distribution's standard deviation is the standard uncertainty times sqrt(4/2), about 1.41 times larger. For the H.2 resistance the Monte Carlo standard deviation is then about 0.0995 ohm instead of 0.0702 ohm. The default samples readings as normal so the check compares like with like against the GUM's first-order result; untick it to see the heavier tails.