NIST Uncertainty Machine - User's Manual: 1 For The Impatient
NIST Uncertainty Machine - User's Manual: 1 For The Impatient
2 Purpose
(c) Correlations {ri j } between every pair of different input quantities, which
the NIST Uncertainty Machine assumes all to be zero unless the user ex-
plicitly specifies other values for them;
In general, neither the Gaussian nor the Student’s t distributions need model
the dispersion of values of the output quantity accurately, even when all the
input quantities are adequately modeled as Gaussian random variables.
The GUM suggests that the Central Limit Theorem (CLT) from Probability The-
ory [DeGroot and Schervish, 2011] lends support to the Gaussian approxima-
tion for the distribution of the output quantity. However, without a detailed
examination of the measurement function f , and of the probability distribution
of the input quantities (examinations that the GUM does not explain how to
do), it is impossible to guarantee the adequacy of the Gaussian or Student’s t
approximations.
NOTE . The CLT states that, under specified conditions, a sum of indepen-
dent random variables has a probability distribution that is approximately
Gaussian [Billingsley, 1979, Theorem 27.2]. The CLT is a limit theorem,
in the sense that it concerns an infinite sequence of sums, and provides
no indication about how close to Gaussian the distribution of a sum with
a finite number of summands will be. Other results in probability theory
provide such indications, but they involve more than just the means and
variances that are required to apply Gauss’s formula [Friedrich, 1989].
NOTE . The reason why the CLT may be relevant is the following: if the
function f is sufficiently smooth in a neighborhood of the point (in n-
dimensional Euclidean space) (ξ1 , . . . , ξn ), whose coordinates are the true
values of the input quantities, then f (x 1 , . . . , x n ) ≈ f (ξ1 , . . . , ξn )+ f˙1 (x 1 , . . . , x n )(x 1 −
ξ1 ) + · · · + f˙n (x 1 , . . . , x n )(x n − ξn ), where the { f˙i } denote the first-order
partial derivatives of f . The right-hand side is a sum of random variables
when the {x i } are modeled as random variables.
Figure 1 on Page 6 shows the graphical user interface of the NIST Uncertainty
Machine filled in to reflect these modeling choices, and the results that are
returned and displayed by the browser. To load the specifications for this
example into the NIST Uncertainty Machine, click here.
The method described in the GUM produces y = 32.2 and u( y) = 12.5.
According to the conventional interpretation, the interval y ± 2u( y) =
(18, 67.1) may be a coverage interval with approximately 95 % coverage
probability. (The results of the Monte Carlo method can be used to show
that the effective coverage of this interval is 95.5 %.)
Since the NIST Uncertainty Machine requires that the probability distribu-
tion of the input quantities be specified, in the absence of cogent reason to do
otherwise, the user may assign Gaussian (or, normal) distributions to them:
• If the input quantities are correlated, then besides assigning Gaussian dis-
tributions to them as in the previous case, then the user will also need to
check the box marked Correlation in the interface of the NIST Uncertainty
Machine, and then specify the values of the correlations, and select a
Gaussian copula (if indeed a multivariate Gaussian distribution is desired)
to enforce the correlations [Possolo, 2010].
INPUT
a b c
a*b/c
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
Run the computation
This software was developed at NIST. This software is not subject to copyright protection and is in the public domain. This software is an
experimental system. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about
OUTPUT
ave = 32.2
sd = 13
median = 28.8
mad = 8.9
Coverage intervals
ANOVA (% Contributions)
y = 28.8
u(y) = 8.7
SensitivityCoeffs Percent.u2
a 0.9 0.27
b 32.0 0.85
c -29.0 99.00
Correlations NA 0.00
============================================
Figure 1: ABC. Entries in the Web page correspond to the example discussed in §3.
In each numerical result, only the digits that the NIST Uncertainty Machine deems
to be significant are printed. Estimate of the probability density of the output quantity
(solid blue line), and probability density (dotted red line) of a Gaussian distribution
with the same mean and standard deviation as the output quantity. In this case, the
Gaussian approximation is very inaccurate.
LAFARGE & POSSOLO PAGE 6 OF 46
VERSION 1.3.5 NIST UNCERTAINTY MACHINE
4 Usage
The NIST Uncertainty Machine runs on a NIST Web server, accessible via a
Web browser at https://uncertainty.nist.gov/. The computational engine
of the NIST Uncertainty Machine is written in the R language for statistical
computing and graphics [R Core Team, 2015].
Seed. The box following Random number generator seed contains an inte-
ger no larger than 100 that serves as the seed for the random number generator.
With the same seed, and with the same other inputs, the NIST Uncertainty
Machine should always produce exactly the same results. In general, the user
does not need to choose a value for the seed: a value is placed in the box auto-
matically when the Web page of the NIST Uncertainty Machine is visited.
Reset. Pressing the Reset button. will clear all the entries in the input page.
(U-1) If the user wishes to use a previously saved configuration file with in-
puts for the NIST Uncertainty Machine, then use the rectangle out-
lined with a dashed line in the input page, Drop configuration file
here or click to upload: either drag the file onto it, or click inside
this rectangle and then look for and select the file where the input pa-
rameters will have been saved previously. (U-12) explains how to save
a configuration file that may be used subsequently to re-run the same
computation.
(U-2) Choose the number of input quantities from the drop-down menu cor-
responding to the entry Number of input quantities. In response to
this, the Web page will update itself and show as many boxes as there
are input quantities, and assign default names to them (which may be
changed as explained next).
(U-3) Enter the names of the input quantities into the boxes following Names
of input quantities. The same names will automatically become the
labels of the rows of boxes that appear immediately below and that are
used to specify probability distributions for the input quantities.
(U-6) Enter the size of the Monte Carlo sample to be drawn from the proba-
bility distribution of the output quantity, into the box labeled Number of
realizations of the output quantity: the default value, 1 × 106 , is
the minimum recommended sample size (currently the NIST Uncertainty
Machine is able to generate samples of size from 1 × 105 to 5 × 106 ).
(U-7) Enter a valid R expression into the box labeled Value of output quantity
(R expression) that represents f (x 1 , . . . , x n ), the right-hand side of
the measurement equation that defines the value of the output quan-
tity. This expression should involve only the input quantities, functions
and numerical constants that R knows how to evaluate, listed on ta-
ble 1. (Remember that R is case sensitive.) Refer to the current version
of An Introduction to R, freely available at https://cran.r-project.
org/manuals.html, or to one of the tutorials listed in https://cran.
r-project.org/other-docs.html.
+ - * ^ %% %/%
/ abs sign sqrt ceiling floor
trunc cummax cummin cumprod cumsum exp
expm1 log log10 log2 log1p cos
cosh sin sinh tan tanh acos
acosh asin asinh atan atanh cospi
sinpi tanpi gamma lgamma digamma trigamma
== < > = pi complex
Re Im Mod Arg { (
c function $ mapply matrix %*%
uniroot t solve
N = L1-L0
D = L0*(T1-T0)
N / D
(U-8) If the output quantity is a vector with p components, press the “+” button
p − 1 times to create a total of p output fields. Enter an R expression into
each one of them similarly to how the specification of the value of the
output quantity was described in (U-7).
(U-9) If symmetrical coverage intervals are desired, then check the box marked
Symmetrical coverage intervals. These intervals take a little longer
to compute than those computed by default (which may be asymmetri-
cal), and are of the form by ± ku( y) where b
y , the estimate of the output
quantity, is the average of the Monte Carlo sample, and the coverage fac-
tor k depends on the specified coverage probability.
Even for symmetrical intervals (those that are centered on the aver-
age of the Monte Carlo sample drawn from the probability distribu-
tion of the output quantity), the coverage factor k is computed only
after the coverage interval has been derived from this sample, hence
differently from how it is computed in the GUM.
(U-10) If there are non-null correlations between input quantities that need to
be taken into account, then check the box marked Correlations, and
enter the values of non-zero correlations into the appropriate boxes in
the upper triangle of the correlation matrix that the browser will display.
(U-11) If the box marked Correlations has been checked, then besides having
specified correlations in (U-10), also select a copula (currently, either
Gaussian or Student’s t) to manufacture a joint probability distribution
for the input quantities. This is needed because there are infinitely many
multivariate distributions with the same means, standard deviations, and
correlations [Nelsen, 2006]. If the copula chosen is (multivariate) Stu-
dent’s t, then another box will appear nearby to receive the desired num-
ber of degrees of freedom.
(U-12) Click the button labeled Run the computation. In response to this, the
browser will open a new tab where numerical and graphical results will
be displayed, which are described in §5.
The NIST Uncertainty Machine estimates the number of significant dig-
its in the results, and reports only these. To increase the number of sig-
nificant digits, another run will have to be done with a larger size for
the Monte Carlo specified in Number of realizations of the output
quantity, as explained in (U-6).
5 Results
The NIST Uncertainty Machine produces output on a Web page, and offers
the possibility of downloading its output in the form of four files.
• Numerical output appears to the left, and it is divided into two sections.
The top section lists results from the application of the Monte Carlo method.
The bottom section lists results from the application of the method de-
scribed in the GUM.
The results for the Monte Carlo method include a table with summary
statistics for the sample that was drawn from the probability distribution
of the output quantity: average, standard deviation, median, MAD.
The average is the common estimate of the true value of the output quan-
tity, and the standard deviation is the common evaluation of u( y). How-
ever, the median may be a reasonable, and in some cases a preferable
alternative to the average as estimate of that true value. Similarly, MAD
may be a reasonable, and in some cases a preferable alternative to the
standard deviation as evaluation of u( y). When reporting measurement
results, it is the user’s responsibility to state how the estimate of the true
value of the output quantity was obtained, and how the associated stan-
dard uncertainty was evaluated.
NOTE . “ MAD ” denotes the median absolute deviation from the me-
dian, multiplied by a factor (1.4826) that makes the result compara-
ble to the standard deviation when applied to samples from Gaussian
distributions.
NOTE . Neither the MAD , nor the MAD divided by the square root of the
sample size, are the standard deviation of the sampling distribution
Table 2: Distributions. Several distributions are available with alternative parametrizations: for these, it suffices to select
and specify one of them. DF stands for number of degrees of freedom. Left and Right denote the left and right endpoints
of the interval to which a distribution assigns probability 1. The mode of a distribution is where its probability density
reaches its maximum. The rectangular distribution is the same as the uniform distribution. A quantity x has a shifted and
rescaled beta distribution when (x − Left)/(Right − Left) has a conventional beta distribution. For the truncated Gaussian
distribution, Mean and StdDev denote the mean and standard deviation without truncation: the actual mean and standard
deviation depend also on the truncation points, and it is the actual mean and standard deviation that the GUM and Monte
Carlo methods use in their calculations. A Student’s t distribution will have infinite standard deviation unless DF > 2, and
its mean will be undefined unless DF > 1. The values assigned to the parameters must satisfy the constraints listed.
VERSION 1.3.5 NIST UNCERTAINTY MACHINE
• The plot included in the output Web page depicts an estimate of the prob-
ability density of the output quantity (smooth, continuous version of a
histogram, drawn in a solid blue line) computed as described by Silver-
man [1986] and as implemented in R function density. The plot also
shows (depicted as a red dashed line) the probability density of the Gaus-
sian distribution with the same mean and standard deviation as the Monte
Carlo sample of values of the output quantity.
• Below this plot there are five clickable lines of green text that, once clicked,
download a file to the local machine.
The script will install any necessary R packages that may not have been previ-
ously installed in the local version of the R system. The script first writes its
version number onto the terminal window, which should be matched to the
version of the NIST Uncertainty Machine displayed at the top of the page of
the web application, for example: NIST Validation & Verification Script
Version 1.3.5
INPUT
L0 T0 L1 T1
(L1-L0) / (L0*(T1-T0))
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
Run the computation
OUTPUT
ave = 1.727e-05
sd = 1.7e-06
median = 1.727e-05
mad = 1.2e-06
Coverage intervals
ANOVA (% Contributions)
y = 1.727e-05
u(y) = 1.8e-06
SensitivityCoeffs Percent.u2
L0 -7.9e-03 2.0e+01
T0 2.0e-07 5.4e-04
L1 7.8e-03 8.0e+01
T1 -2.0e-07 3.4e-03
Correlations NA 0.0e+00
============================================
Figure 2: Thermal Expansion Coefficient. Input and output Web pages for
the example discussed in §7.
QUANTITY x u(x)
lS 50 000 623 nm 25 nm
d 215 nm 9.7 nm
δα 0 ◦C−1 0.58 × 10−6 ◦C−1
θ −0.1 ◦C 0.41 ◦C
αS 11.5 × 10−6 ◦C−1 1.2 × 10−6 ◦C−1
δθ 0 ◦C 0.029 ◦C
bilistically symmetric (meaning that it leaves 0.5 % of the Monte Carlo sample
uncovered on both sides), then the Monte Carlo method produces (50 000 749 nm,
50 000 927 nm) as 99 % coverage interval, which happens not be quite centered
at the estimate of y.
INPUT
lS + d - lS*(dalpha*theta +
alphaS*dtheta)
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
OUTPUT
ave = 50000837.9
sd = 33.9
median = 50000837.9
mad = 34
Coverage intervals
ANOVA (% Contributions)
y = 50000838
u(y) = 31.7
SensitivityCoeffs Percent.u2
lS 1 62.00
d 1 9.40
dalpha 5000000 0.84
theta 0 0.00
alphaS 0 0.00
dtheta -580 28.00
Correlations NA 0.00
============================================
Figure 3: End-Gauge Calibration. Input and output Web pages for the exam-
ple discussed in §8. Note that the value of αS , 11.5 × 10−6 ◦C−1 , was entered
as 11.5e-6.
And if Gauss’s formula is used to evaluate u(µM ), the result is 1.11 mPa s.
Interestingly, the evaluation of u(µM ) is close to the evaluation produced by the
Monte Carlo method, but the estimates of the measurand produced by one and
by the other differ: the reason is the skewness (or, asymmetry) of the distribu-
tion of the measurand, apparent in Figure 4 on Page 23.
This figure also shows that the coverage interval given above differs from the
interval corresponding to the prescription in clause 6.2.1 of the GUM (estimate
of the output quantity plus or minus twice the standard measurement uncer-
tainty evaluated using the approximate propagation of error formula). Figure 5
on Page 24 shows the corresponding input and output Web pages of the NIST
Uncertainty Machine.
0.4
0.3
Prob. density
0.2
● GUM
● GUM−S1
0.1
●
0.0
4 6 8 10 12
µ / mPa s
Figure 4: HAAKE™ falling ball viscometer from Thermo Fisher Scientific, Inc.,
(left panel), and probability density (right panel) corresponding to a Monte
Carlo sample of size 1 × 106 , also showing 95 % coverage intervals for the
value of the dynamic viscosity of the liquid, one corresponding to the prescrip-
tion in clause 6.2.1 of the GUM, the other whose endpoints are the 2.5th and
97.5th percentiles of the Monte Carlo sample.
10 Example — Resistance
In Example H.2 of the GUM, the measurement model for the resistance of an
element of an electrical circuit is R = (V /I) cos(φ). The estimates and standard
uncertainties of the input quantities, and the correlations between them, are
listed in Table 4 on Page 25.
For the Monte Carlo method, we model the input quantities as correlated Gaus-
sian random variables with means and standard deviations equal to the esti-
INPUT
muC * ((rhoB-rhoM)/(rhoB-rhoC)) *
(tM/tC)
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
Run the computation
OUTPUT
ave = 5.82
sd = 1.1
median = 5.69
mad = 1
Coverage intervals
ANOVA (% Contributions)
y = 5.69
u(y) = 1
SensitivityCoeffs Percent.u2
muC 1.2000 3.1e-01
rhoB 0.0014 4.9e-05
rhoM -0.0055 7.1e-04
rhoC 0.0040 3.9e-04
tM 0.0930 3.1e+01
tC -0.1600 6.9e+01
Correlations NA 0.0e+00
============================================
Figure 5: Viscosity. Input and output Web pages for the example discussed
in §9.
mates and standard uncertainties listed in Table 4, and with correlations identi-
cal to those given in the same table. We also adopt a Gaussian copula to manu-
facture a joint probability distribution consistent with the assumptions already
stated.
To load the specifications for this example into the NIST Uncertainty Machine,
click here.
QUANTITY x u(x)
V 4.9990 V 0.0032 V
I 19.6610 × 10−3 A 0.0095 × 10−3 A
φ 1.044 46 rad 0.000 75 rad
r(V, I) = −0.36 r(V, φ) = 0.86 r(I, φ) = −0.65
The GUM’s approach and the Monte Carlo method produce the same values
of the output quantity R = 127.732 Ω and of the standard uncertainty u(R) =
0.07 Ω. The Monte Carlo method yields (127.595 Ω, 127.869 Ω) as approximate
95 % coverage interval for the resistance without invoking any additional as-
sumptions about R. Figure 6 on Page 26 reflects these facts, and lists the results.
Note that the Greek letter that is conventionally used to denote the Stefan-
Boltzmann constant is the same that is also commonly used to denote the stan-
dard deviation of a probability distribution. In this example, all instances of “σ”
refer to the Stefan-Boltzmann constant.
Table 5 lists the 2010 CODATA [Mohr et al., 2012] recommended values of the
quantities that determine the value of the Stefan-Boltzmann constant, and the
INPUT
V I phi
(V/I)*cos(phi)
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
V I phi
V 1 -0.36 0.86
I 1 -0.65
phi 1
Gaussian Copula
OUTPUT
ave = 127.732
sd = 0.0699
median = 127.732
mad = 0.07
Coverage intervals
ANOVA (% Contributions)
y = 127.732
u(y) = 0.07
SensitivityCoeffs Percent.u2
V 26 140
I -6500 78
phi -220 560
Correlations NA -670
============================================
Figure 6: Resistance. Input and output Web pages for the example discussed in §10.
Note that, in this case, the NIST Uncertainty Machine reconfigured its graphical user
interface automatically to accommodate the correlations that had to be specified.
According to the GUM, the estimate of the measurand equals the value of the
measurement function evaluated at the estimates of the input quantities, as
σ = 5.670 37 × 10−8 W m−2 K−4 . Both the GUM’s approximation and the Monte
Carlo method produce the same evaluation of u(σ) = 2 × 10−13 W m−2 K−4 .
These evaluations disregard the correlations between the input quantities that
result from the adjustment process used by CODATA. However, once these cor-
relations are taken into account via Equation (13) in the GUM, the same value
still obtains for u(σ) to within the single significant digit reported above.
Without making additional assumptions, it is impossible to interpret an expres-
sion like σ ± u(σ) probabilistically. The assumptions made to apply the Monte
Carlo method of the GUM-S1 deliver not only an evaluation of uncertainty, but
also enable its probabilistic interpretation.
If the measurement uncertainties associated with h, R, R∞ , Ar (e), and α are
expressed by modeling these quantities as independent Gaussian random vari-
ables with means and standard deviations set equal to the values and stan-
dard measurement uncertainties listed in Table 5, then the distribution that the
Monte Carlo method of the GUM-S1 assigns to the measurand happens to be
approximately Gaussian as gauged by the Anderson-Darling test of Gaussian
shape [Anderson and Darling, 1952].
Figure 7 on Page 29 reflects these facts and shows the results, which imply that
the interval from 5.670 332 × 10−8 W m−2 K−4 to 5.670 412 6 × 10−8 W m−2 K−4
Tsui et al. [2012] consider the voltage reflection coefficient Γ = S22 −S12 S23 /S13
of a microwave power splitter, defined as a function of elements of the corre-
sponding 3-port scattering matrix (S-parameters). Table 6 reproduces the mea-
surement results for the S-parameters listed in Tsui et al. [2012, Table 5]. Since
the S-parameters (input quantities) are complex-valued, so is Γ (output quan-
tity). Therefore, in this example the measurement model is a measurement
equation with a vector-valued output quantity, (ℜ(Γ ), ℑ(Γ )), whose components
are the real and imaginary parts of Γ .
The NIST Uncertainty Machine can handle vectorial output quantities. Addi-
tional output fields are added by clicking the “+” button as explained in (U-8)
on Page 11. The NIST Uncertainty Machine produces the raw materials that
are necessary to characterize the uncertainty of a multivariate output by appli-
cation of the Monte Carlo method, but it does not provide a full characterization
of the uncertainty surrounding the multivariate output.
If y = f (x 1 , . . . , x n ) is the measurement model for a p-dimensional output quan-
tity y = ( y1 , . . . , y p ), then the model may be re-written as a system of p simul-
INPUT
h R Rinf e alpha
OUTPUT
ave = 5.6703725e-08
sd = 2.05e-13
median = 5.6703725e-08
mad = 2e-13
Coverage intervals
ANOVA (% Contributions)
SensitivityCoeffs Percent.u2
h 8.6e+25 1.5e-02
R 2.7e-08 1.0e+02
Rinf 2.1e-14 3.1e-09
e -4.1e-04 2.0e-05
alpha -6.2e-05 5.3e-05
Correlations NA 0.0e+00
============================================
Figure 7: Stefan-Boltzmann Constant. Input and output Web pages for the
example discussed in §11.
(i) Run the NIST Uncertainty Machine with each output in its own field,
and save the file containing the samples drawn from the probability dis-
tributions of the p components y1 , . . . , y p of the vectorial output quantity;
(ii) Read this file into some suitable statistical analysis computing environ-
ment, for example R, and complete the uncertainty analysis for the output
quantity in this environment.
S22 = complex(modulus=S22.Mod,
argument=S22.Arg) S22 = complex(modulus=S22.Mod,
S12 = complex(modulus=S12.Mod, argument=S22.Arg)
argument=S12.Arg) S12 = complex(modulus=S12.Mod,
S23 = complex(modulus=S23.Mod, argument=S12.Arg)
argument=S23.Arg) S23 = complex(modulus=S23.Mod,
S13 = complex(modulus=S13.Mod, argument=S23.Arg)
argument=S13.Arg) S13 = complex(modulus=S13.Mod,
Gamma = S22 - S12*S23/S13 argument=S13.Arg)
Re(Gamma) Gamma = S22 - S12*S23/S13
Im(Gamma)
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
Run the computation
3
0.015
2
0.010
1
Arg(Γ)
0.005
Im(Γ)
0
0.000
−1
−0.005
−2
−0.010
−3
−0.005 0.000 0.005 0.010 0.015 0.020 0.000 0.005 0.010 0.015 0.020 0.025
Re(Γ) Mod(Γ)
Figure 9: The left panel shows an estimate of the probability density of the joint
distribution of the real and imaginary parts of Γ , and the right panel shows its
counterpart for the modulus and argument of Γ . The solid (red) curves out-
line 95 % coverage regions, and the dashed (red) curves outline 68 % cover-
age regions. Their (blue) counterparts, dotted and dash-dotted, are based on
the (obviously erroneous) assumption that the joint bivariate distributions are
Gaussian.
Gamma.Re = scan("NUM-Gamma-Real-Results-Values.txt")
Gamma.Im = scan("NUM-Gamma-Imaginary-Results-Values.txt")
c(mean(Gamma.Re), sd(Gamma.Re))
c(mean(Gamma.Im), sd(Gamma.Im))
cor(Gamma.Re, Gamma.Im)
require(ash)
require(car)
ab = cbind(Gamma.Re, Gamma.Im)
abx = matrix(c(-0.0075, -0.0100, 0.0220, 0.0195), 2, 2)
nbin = c(200, 200)
bins = bin2(ab, abx, nbin)
m = c(60,60)
f = ash2(bins,m)
image(f$x, f$y, f$z, col=cm.colors(24), axes=FALSE,
xlab=expression(plain(Re)(Gamma)),
ylab=expression(plain(Im)(Gamma)))
axis(1, lwd=0.5); axis(2, lwd=0.5)
w = (f$z[-length(f$z)]*diff(f$x)*diff(f$y)) /
sum(f$z[-length(f$z)]*diff(f$x)*diff(f$y))
iw = order(w, decreasing=TRUE)
iw95 = which.min(abs(cumsum(w[iw])-0.95))
xx = matrix(rep(f$x, 200), ncol=200)
yy = matrix(rep(f$y, 200), ncol=200, byrow=TRUE)
xx = xx[iw][1:iw95]
yy = yy[iw][1:iw95]
ixy = chull(xx, yy)
lines(c(xx[ixy], xx[ixy][1]),
c(yy[ixy], yy[ixy][1]), col="Red")
iw68 = which.min(abs(cumsum(w[iw])-0.68))
xx = matrix(rep(f$x, 200), ncol=200)
yy = matrix(rep(f$y, 200), ncol=200, byrow=TRUE)
xx = xx[iw][1:iw68]
yy = yy[iw][1:iw68]
ixy = chull(xx, yy)
lines(c(xx[ixy], xx[ixy][1]),
c(yy[ixy], yy[ixy][1]), col="Red", lty=2)
ab = cbind(Gamma.Mod, Gamma.Arg)
abx = matrix(c(0, -3, 0.025, 3), 2, 2)
nbin = c(200, 200)
bins = bin2(ab, abx, nbin)
m = c(60,60)
f = ash2(bins,m)
image(f$x, f$y, f$z, col=cm.colors(24), axes=FALSE,
xlab=expression(plain(Mod)(Gamma)),
ylab=expression(plain(Arg)(Gamma)))
axis(1, lwd=0.5); axis(2, lwd=0.5)
w = (f$z[-length(f$z)]*diff(f$x)*diff(f$y)) /
sum(f$z[-length(f$z)]*diff(f$x)*diff(f$y))
iw = order(w, decreasing=TRUE)
iw95 = which.min(abs(cumsum(w[iw])-0.95))
xx = matrix(rep(f$x, 200), ncol=200)
yy = matrix(rep(f$y, 200), ncol=200, byrow=TRUE)
xx = xx[iw][1:iw95]
yy = yy[iw][1:iw95]
ixy = chull(xx, yy)
lines(c(xx[ixy], xx[ixy][1]),
c(yy[ixy], yy[ixy][1]), col="Red")
iw68 = which.min(abs(cumsum(w[iw])-0.68))
xx = matrix(rep(f$x, 200), ncol=200)
yy = matrix(rep(f$y, 200), ncol=200, byrow=TRUE)
xx = xx[iw][1:iw68]
yy = yy[iw][1:iw68]
ixy = chull(xx, yy)
lines(c(xx[ixy], xx[ixy][1]),
c(yy[ixy], yy[ixy][1]), col="Red", lty=2)
Table 7 lists isotopic ratios and associated uncertainties for several samples
drawn from two chondrules of the Allende meteorite [Clarke et al., 1971], to
measure their absolute age using a geochronometer based on isotopic ratios of
radiogenic lead.
The original data, from Table S4 of Connelly et al. [2012], comprise values
of R(204 Pb/206 Pb), R(207 Pb/206 Pb), and relative expanded uncertainties (with
coverage factor k = 2) expressed as percentages. The isotopic ratios listed in
Table 7 were derived from these as R(206 Pb/204 Pb) = 1/R(204 Pb/206 Pb) and
R(207 Pb/204 Pb) = R(207 Pb/206 Pb) R(206 Pb/204 Pb).
The standard uncertainties listed in Table 7 were derived from the expanded
uncertainties in [Connelly et al., 2012, Table S4], by application of the Monte
Carlo method, modeling the isotopic ratios as Gaussian random variables, and
taking into account the correlation between R(204 Pb/206 Pb) and R(207 Pb/206 Pb)
also listed in the aforementioned Table S4. The standard uncertainties listed are
the median absolute deviations from the median, rescaled as per the default
definition of R function mad.
Since 206 Pb and 207 Pb both are radiogenic, being the end-products of the decay
of 235 U and 238 U, respectively, and 204 Pb is primordial, the isotopic ratios in
Table 7 may be used as a geochronometer [White, 2015], under the following
assumptions:
(a) The isotopic ratio R(238 U/235 U) of the parent material is known;
(b) All atoms of 206 Pb and 207 Pb derive entirely from uranium originally in the
parent material, and none have been lost;
206
Pb/204 Pb 207
Pb/204 Pb
SAMPLE R u(R) R u(R)
C20-L4 22.012 0.018 18.223 0.014
C20-L5 33.078 0.043 25.145 0.028
C20-L7 55.066 0.220 38.880 0.140
C20-L8 91.684 0.348 61.765 0.219
C20-L9 217.155 5.695 140.222 3.572
C20-LR 172.028 9.454 112.025 5.969
C30-L2 23.265 0.021 18.996 0.015
C30-L5 31.195 0.056 23.958 0.036
C30-L7 59.726 0.083 41.801 0.050
C30-L8 77.310 0.054 52.799 0.033
C30-L9 97.437 0.156 65.392 0.096
C30-LR 232.829 12.658 150.096 7.929
(c) No atoms of 204 Pb have been added or removed from the chondrules since
their formation.
R (206Pb 204
Pb) ± 10 u (R (206Pb 204
Pb))
200
R (207Pb 204
Pb) ± 10 u (R (207Pb 204
Pb))
EIV
150
●
Pb)
●
204
R (207Pb
●
100
●
●
●
50
●
●
●●
●
●
R( 206
Pb 204
Pb)
(a) The uncertainties associated with the half-lives of the relevant uranium iso-
topes: u(T½ (235 U)) = 1 Ma [Bé et al., 2010] and u(T½ (238 U)) = 4.8 Ma
[Villa et al., 2016];
(b) The uncertainty associated with the isotopic ratio of the same uranium iso-
topes: u(R(238 U/235 U)) = 0.013 [Connelly et al., 2012, Table 1];
(c) The measurement uncertainties associated with the measured lead isotope
ratios {u(R(206 Pb/204 Pb))} and {u(R(207 Pb/204 Pb))};
(d) The sampling uncertainty associated with the selection of the n = 12 sam-
ples that were used to define the isochron.
The measurement equation is A = f (B, R, T235 , T238 ), where the inputs are mod-
eled as random variables: B denoting the slope of the isochron; R denoting the
value of the isotopic ratio R(238 U/235 U); T235 denoting the half-life of 235 U; and
T238 denoting the half-life of 238 U.
To evaluate the uncertainty associated with A, either by application of Gauss’s
formula or of the Monte Carlo method, three obstacles must be overcome: (i)
computing values of the function f , which involves solving Equation (2) using
numerical methods; (ii) computing the values of the partial derivatives of f
that are needed in Gauss’s formula, which requires numerical differentiation;
and (iii) representing the probability distribution of B in a form that the NIST
Uncertainty Machine can process.
While (i) would be burdensome and (ii) would be practically insurmountable
without recourse to suitably specialized software, for the NIST Uncertainty
Machine neither is challenging. Indeed, once f is determined by specifying R
commands in the appropriate box in the input page, the NIST Uncertainty
Machine will have no difficulty addressing (i) or (ii).
B poses a difficulty of a different kind because the corresponding probability
distribution is represented by a sample drawn using a previous application of the
Monte Carlo method outside of the NIST Uncertainty Machine environment,
and none of the parametric distributions available in the NIST Uncertainty
Machine fit it adequately.
Therefore, one needs to use the sample itself, which the NIST Uncertainty
Machine also allows, as already mentioned in (U-5) on Page 9. In fact, the NIST
Uncertainty Machine can read a file with the values of such sample, and then
use it alongside the parametric distributions specified for the other inputs, both
when it applies Gauss’s formula, and the Monte Carlo method.
For Gauss’s formula, the NIST Uncertainty Machine simply uses the average
and the standard deviation of the sample of values of B that is provided. For
the Monte Carlo method, it resamples this sample repeatedly, with replacement,
thus treating it as if it were an infinite population. (Therefore, when such a
sample is provided as input, it need not be of the same size as the number
of replicates of the output quantity that are requested. However, the sample
should still be of sufficiently large size to provide an accurate representation of
the underlying distribution.)
To load the specifications for this example into the NIST Uncertainty Machine,
click here.
The probability distribution of B expresses the contributions from the uncer-
tainties associated with the isotopic ratios, and with the selection of the twelve
samples of the two chondrules that were used, from among those that were
measured (uncertainty sources (c) and (d) mentioned above). These contribu-
tions were evaluated by application of two variants of the statistical bootstrap
in tandem: the parametric version for (c), and the non-parametric version for
(d) [Efron and Tibshirani, 1993]. Figure 11 shows the graph of an estimate of
the probability density of B that was derived from the input sample.
Figure 12 shows a screenshot of the input page of the NIST Uncertainty Machine
with the characterization of the input variables: B is not assigned any paramet-
ric distribution, and only a sample of size 2023 is provided that was drawn from
its otherwise unspecified distribution; the other three are modeled as Gaussian
random variables with specified means and standard deviations. The input page
also includes the definition of the measurement equation, whose R code may
more easily be examined in Listing 2.
300
Probability Density
200
100
0
βEIV
lambda235 = log(2)/T235
lambda238 = log(2)/T238
ageEquation = function (x, beta, lambdaU238, lambdaU235, RU238U235) {
(exp(x*lambdaU235)-1)/(exp(x*lambdaU238)-1) - RU238U235*beta }
lowerAge = 4e9
upperAge = 5e9
f = function(lambda238,lambda235,R,B) {
uniroot(ageEquation, lower=lowerAge, upper=upperAge,
beta=B, lambdaU238=lambda238, lambdaU235=lambda235,
RU238U235=R)$root }
mapply(f,lambda238,lambda235,R,B)
INPUT
B R T235 T238
B Sample values (between 30 and 100000) 2023 Samples loaded Drop sample file here or click to upload
R Gaussian (Mean, StdDev) 137.786 0.013
T235 Gaussian (Mean, StdDev) 704e6 1e6
T238 Gaussian (Mean, StdDev) 4.4683e9 4.8e6
lambda235 = log(2)/T235
lambda238 = log(2)/T238
ageEquation = function (x, beta,
lambdaU238, lambdaU235, RU238U235) {
(exp(x*lambdaU235)-1)/(exp(x*lam
bdaU238)-1) - RU238U235*beta}
lowerAge = 4e9
upperAge = 5e9
f = function(lambda238,lambda235,R,B)
{uniroot(ageEquation, lower=lowerAge,
upper=upperAge,
beta=B,lambdaU238=lambda238,lambdaU235=l
ambda235, RU238U235=R)$root}
mapply(f,lambda238,lambda235,R,B)
Definition of output quantity (R expression): - +
Symmetrical coverage intervals
Correlations
Run the computation
OUTPUT
ave = 4568800000
sd = 1.1e+07
median = 4568700000
mad = 1e+07
ANOVA (% Contributions)
y = 4568800000
u(y) = 1.2e+07
SensitivityCoeffs Percent.u2
B 2.3e+09 31.000
R 1.1e+07 0.014
T235 9.4e+00 65.000
T238 -4.5e-01 3.500
Correlations NA 0.000
============================================
Figure 12: Allende Meteorite. Input and output Web pages for the example
discussed in §13.
The NIST Uncertainty Machine always requires that the measurement func-
tion f be vectorized, in the sense just described. However, in all the other ex-
amples this is accomplished automatically owing to the evaluation rules of the R
language (which govern the interpretation of the code entered in the box where
the value of f is specified, in the input Web page of the NIST Uncertainty
Machine). Not in this case, owing to the presence of the root finder uniroot,
which does not accommodate vectorization.
Figure 12 shows two areas of the output page: the portion that summarizes the
results of the GUM calculations, including application of Gauss’s formula, and
the portion with the results of the Monte Carlo method, including the plot of
the estimate of the probability density of the output quantity (which is the age
of the chondrules).
It is worth noting, in the portion of the output produced by the Monte Carlo
method, that the percentage of the variance of the output quantity attributable
to non-linearity of the measurement function (0.02 %) is very small, even though
the function clearly is non-linear. This is attributable to the fact that, its overall
non-linearity notwithstanding, f still is approximately linear within a neigh-
borhood of the estimates of the input quantities of size comparable to their
associated uncertainties.
The corresponding age estimate is 4569 Ma with associated standard uncer-
tainty 12 Ma according to Gauss’s formula, and 11 Ma according to the Monte
Carlo method. (Connelly et al. [2012] report 4566 Ma for C20 and 4567 Ma for
C30, with much smaller uncertainties.)
These chondrules are truly ancient, frozen remnants of the protoplanetary disk
that would evolve to become the solar system. However, Scott [2007] points
out that “the Allende chondrite is not a pristine chondrite, as was once believed.
It was severely altered by fluid-assisted metamorphism in its parent asteroid.”
Therefore, an uncertainty even larger than our calculations suggest should sur-
round the age of these chondrules.
Acknowledgments
The authors are grateful to their colleagues Will Guthrie, Alan Heckert, Narain
Krishnamurthy, Adam Pintar, Jolene Splett, and Jack Wang, for the many sug-
gestions that they offered for improvement of the NIST Uncertainty Machine
and of this user’s manual.
Alan Heckert, Steven Conn, Shawn Winhoven, Walter Rowe, Dale Little, and
Del Brockett, greatly facilitated the deployment of this Web-based application
for use on the World Wide Web.
The authors will be very grateful to users of the software, and to readers of this
manual, for information about errors and other deficiencies, and for suggestions
for improvement, which may be sent via eMail to [email protected]
and to [email protected].
References
T. W. Anderson and D. A. Darling. Asymptotic theory of certain “goodness-of-fit” criteria
based on stochastic processes. Annals of Mathematical Statistics, 23:193–212, 1952.
P. Billingsley. Probability and Measure. John Wiley & Sons, New York, NY, 1979.
B. Efron and R. J. Tibshirani. An Introduction to the Bootstrap. Chapman & Hall, London,
UK, 1993.
D. Freedman, R. Pisani, and R. Purves. Statistics. W. W. Norton & Company, New York,
NY, fourth edition, 2007.
W. F. Guthrie, H.-k. Liu, A. L. Rukhin, B. Toman, J. C.M. Wang, and N.-f. Zhang. Three
statistical paradigms for the assessment and interpretation of measurement uncer-
tainty. In F. Pavese and A. B. Forbes, editors, Data Modeling for Metrology and Testing
in Measurement Science, Modeling and Simulation in Science, Engineering and Tech-
nology, pages 1–45. Birkhäuser Boston, 2009. doi: 10.1007/978-0-8176-4804-6_3.
T. Lafarge and A. Possolo. The NIST Uncertainty Machine. NCSLI Measure Journal of
Measurement Science, 10(3):20–27, September 2015.
R. B. Nelsen. An Introduction to Copulas. Springer, New York, NY, 2nd edition, 2006.
Corrected 2nd. printing, 2007.
A. Possolo. Simple Guide for Evaluating and Expressing the Uncertainty of NIST Mea-
surement Results. National Institute of Standards and Technology, Gaithersburg,
MD, 2015. URL http://dx.doi.org/10.6028/NIST.TN.1900. NIST Technical Note
1900.
A. Possolo and H. K. Iyer. Concepts and tools for the evaluation of measurement un-
certainty. Review of Scientific Instruments, 88(1):011301, 2017. doi: 10.1063/1.
4974274.
E. R. D. Scott. Chondrites and the protoplanetary disk. Annual Review of Earth and Plan-
etary Sciences, 35:577–620, 2007. doi: 10.1146/annurev.earth.35.031306.140100.
B. N. Taylor and C. E. Kuyatt. Guidelines for Evaluating and Expressing the Uncertainty
of NIST Measurement Results. NIST Technical Note 1297. National Institute of Stan-
dards and Technology, Gaithersburg, MD, 1994. URL physics.nist.gov/Pubs/
guidelines/TN1297/tn1297s.pdf.
W. M. White. Isotope Geochemistry. John Wiley & Sons, New York, NY, 2015.