uncertainty
Measurement uncertainty budget after the GUM (JCGM 100): a formula over named quantities with standard uncertainties, optional dof and correlations gives the combined standard uncertainty from numeric sensitivities, Welch-Satterthwaite effective dof, coverage factor from Student's t, expanded uncertainty, a contribution table, and a fixed-seed Monte Carlo cross-check validated as in GUM Supplement 1 (JCGM 101) section 8.
- Field
- Measurement and data
- Version
- 0.1.0
- Runs as
- Compiled (Rust)
- Typical run
- 0.3 s
Compiled from source: run sh packs/install.sh once before admitting it.
Known answers it must pass
r0001sum y = a + b (GUM eq. 10 closed form): u = √(0.3² + 0.4²) = 0.5 exactly, k = normal 97.5 % quantile 1.959963984540054 (textbook), rel 10⁻⁹ (finite-difference sensitivity)passed
y15 ± 1.5 × 10⁻¹¹15lockedunder 0.01 % of the tolerance usedu_c0.5 ± 5 × 10⁻¹⁰0.5locked0.52 % of the tolerance usedk1.95996 ± 2 × 10⁻⁹1.95996lockedunder 0.01 % of the tolerance usedmc_u0.5 ± 0.00450.499078locked20 % of the tolerance usedmc_agrees= truetruelockedexact matchr0002product y = a b (GUM 5.1.6): relative u adds in quadrature, √(1%² + 2%²) = √(5 × 10⁻⁴) = 0.022360679774998, u = 6 x that = 0.134164078649987, rel 10⁻⁹passed
y6 ± 6 × 10⁻¹²6lockedunder 0.01 % of the tolerance usedu_rel0.0223607 ± 2.2 × 10⁻¹¹0.0223607locked0.1 % of the tolerance usedu_c0.134164 ± 1.3 × 10⁻¹⁰0.134164locked0.1 % of the tolerance usedr0003square y = x²: u = 2 x
u_x= 2 · 3 · 0.1 = 0.6 (closed form), rel 10⁻⁹passedy9 ± 9 × 10⁻¹²9lockedunder 0.01 % of the tolerance usedu_c0.6 ± 6 × 10⁻¹⁰0.6locked0.063 % of the tolerance usedcontributions.x.sensitivity= 6, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0004difference a - b fully correlated (r = 1) with equal u = 0.2:
u_c= 0 exactly (GUM eq. 16); abs 10⁻⁹ for finite-difference roundoffpassedy3 ± 3 × 10⁻¹²3lockedunder 0.01 % of the tolerance usedu_c0 ± 10⁻⁹0lockedunder 0.01 % of the tolerance usedmc_u0 ± 10⁻⁹6.15455 × 10⁻¹⁶lockedunder 0.01 % of the tolerance usedr0005cylinder density m/(π r² h): ρ = 0.5/(π 0.02² 0.05) = 7957.747154594767,
u_rel= √(0.002² + 4 0.005² + 0.004²) = √(1.2 × 10⁻⁴) = 0.010954451150103 (closed form), rel 10⁻⁹passedy7957.75 ± 8 × 10⁻⁹7957.75lockedunder 0.01 % of the tolerance usedu_rel0.0109545 ± 1.1 × 10⁻¹¹0.0109545locked0.017 % of the tolerance usedu_c87.1728 ± 8.7 × 10⁻⁸87.1728locked0.017 % of the tolerance usedcontributions.r.share_pct= 83.333333, within 1.000000 × 10⁻⁹ relativereading not recorded on this pager0006Welch-Satterthwaite a + b, u = 1 and dof = 1 each:
nu_eff= 2²/(1+1) = 2; k = t(0.975, 2) = 0.95 √(2/0.0975) = 4.302652729749461 (closed form for ν = 2); U = k √2, rel 10⁻⁹passednu_eff2 ± 2 × 10⁻⁹2lockedunder 0.01 % of the tolerance usedk4.30265 ± 4.3 × 10⁻⁹4.30265lockedunder 0.01 % of the tolerance usedU6.08487 ± 6.1 × 10⁻⁹6.08487locked0.12 % of the tolerance usedr0007t quantile ν = 1: one quantity with dof 1 gives k = t(0.975, 1) = tan(0.475 π) = 12.706204736174696 (Cauchy closed form), rel 10⁻⁹passed
nu_eff1 ± 10⁻⁹1lockedunder 0.01 % of the tolerance usedk12.7062 ± 1.3 × 10⁻⁸12.7062lockedunder 0.01 % of the tolerance usedu_c1 ± 10⁻⁹1locked0.14 % of the tolerance usedr0008Welch-Satterthwaite with unequal terms, y = 2a + b,
u_a= √(3)/2 (dof 3),u_b= 1 (dof 1): c u = √3 and 1,u_c= 2,nu_eff= 16/(9/3 + 1/1) = 4; k = t(0.975, 4) = 2 √(q - 1), q = cos(acos(sqrt A)/3)/sqrt A, A = 4 p (1 - p) (closed form for ν = 4) = 2.7764451051977934; U = 2 k, rel 10⁻⁹passedu_c2 ± 2 × 10⁻⁹2locked0.27 % of the tolerance usednu_eff4 ± 4 × 10⁻⁹4lockedunder 0.01 % of the tolerance usedk2.77645 ± 2.8 × 10⁻⁹2.77645lockedunder 0.01 % of the tolerance usedU5.55289 ± 5.6 × 10⁻⁹5.55289locked0.27 % of the tolerance usedr0009truncation of
nu_eff(GUM G.6.4) at 99 %: same model withdof_b= 1.8 givesnu_eff= 16/(3 + 1/1.8) = 4.5, used as 4; k = t(0.995, 4) = 4.604094871349992 (same ν = 4 closed form), rel 10⁻⁹passednu_eff4.5 ± 4.5 × 10⁻⁹4.5lockedunder 0.01 % of the tolerance usednu_used4 ± 4 × 10⁻¹²4lockedunder 0.01 % of the tolerance usedk4.60409 ± 4.6 × 10⁻⁹4.60409lockedunder 0.01 % of the tolerance usedr0010Monte Carlo y = x², x ~ N(1, 0.5): exact E = x² + u² = 1.25, sd = √(4 x² u² + 2 u⁴) = 1.0606601717798212 (normal moments); GUM gives 1.0 and is not validated; tol 0.012 = about 4.5 sampling errors at 200000 drawspassed
u_c1 ± 10⁻⁹1locked0.15 % of the tolerance usedmc_mean1.25 ± 0.0121.25123locked10 % of the tolerance usedmc_u1.06066 ± 0.0121.05958locked9 % of the tolerance usedmc_agrees= falsefalselockedexact match
Each line is one reading the kernel checked. The bright band is the tolerance; the needle is the value the instrument actually returned when it was admitted. A needle near the centre line used little of its tolerance.
Inputs
| Name | Unit | Default | Meaning |
|---|---|---|---|
formula | m/(pi*r^2*h) | The measurement model y = f(x) over the names in quantities. Operators + - * / ^ (or **), parentheses, constants π and e, functions sqrt exp ln log10 sin cos tan asin acos atan sinh cosh tanh abs pow hypot atan2. Angles in radians. | |
quantities | {"m": {"value": 0.5, "u_rel": 0.002}, "r": {"value": 0.02, "u_rel": 0.005}, "h": {"value": 0.05, "u_rel": 0.004}} | Input quantities by name: {"value": best estimate, "u": standard uncertainty in the value's unit, or "u_rel": standard uncertainty as a fraction of |value|, optional "dof": degrees of freedom (left out = infinite), optional "dist": "normal" (default) or "rectangular" for the Monte Carlo draw}. Each quantity carries its own unit; the formula must be consistent in them. | |
correlations | [] | Correlation coefficients between pairs of quantities: [{"a": name, "b": name, "r": -1 .. 1}]. Pairs left out are uncorrelated. | |
coverage_p | 1 | 0.95 | Coverage probability of the expanded uncertainty and of the Monte Carlo interval. |
mc_samples | 1 | 200000 | Number of Monte Carlo draws. |
seed | 1 | 1 | Seed of the Monte Carlo generator (xoshiro256**); the same seed gives the same draws. |
y_unit | 1 | Unit of the formula's result (written on y, u_c, U and the intervals), e.g. "kg/m³". "1" for a plain number. |
Readings
| Name | Unit | Meaning |
|---|---|---|
formula | ||
y_unit | ||
y | estimate f(x) at the best estimates | |
u_c | combined standard uncertainty (GUM eq. 13) | |
u_rel | 1 | u_c / |y| |
nu_eff | 1 | Welch-Satterthwaite effective degrees of freedom; null when infinite |
nu_used | 1 | nu_eff truncated to the next lower integer (GUM G.6.4) |
coverage_p | 1 | |
k | 1 | coverage factor: Student's t quantile at nu_used, or the normal quantile |
U | expanded uncertainty k u_c | |
low | ||
high | ||
correlation_share_pct | % | share of u_c² from the correlation terms |
contributions | per quantity: value, u, dof, dist, sensitivity (df/dx), rel_sensitivity (x/y df/dx), u_y (|c| u, in y's unit), share_pct (of u_c²) | |
mc_samples | 1 | |
mc_seed | 1 | |
mc_mean | ||
mc_u | standard deviation of the Monte Carlo output | |
mc_u_se | sampling error of mc_u (from the sample kurtosis) | |
mc_mean_se | ||
mc_low | ||
mc_high | ||
mc_u_rel_diff | 1 | (mc_u - u_c) / u_c |
mc_check_delta | GUM S₁ numerical tolerance: half a unit in the 2nd significant digit of u_c | |
mc_check_tol | δ plus three sampling errors of a Monte Carlo endpoint | |
mc_d_low | ||
mc_d_high | ||
mc_nonfinite | 1 | |
mc_agrees | true when both interval endpoints agree within mc_check_tol | |
warnings | ||
contributions.csv | ||
mc_histogram.csv |
Try the call
Change a value and the command updates. Nothing runs here; paste it into your terminal or give it to your agent.