uncertainty pack¶
9 nodes, in noodlelab and in the tiers that build on it.
Uncertainty¶
Add Uncertainty (Type B)¶
uncertainty.add_uncertainty
Give a value an uncertainty from a certificate, a resolution or a tolerance (GUM Type B), in the value’s unit. A half-width a becomes a/√3 for a rectangular distribution (a resolution, a tolerance) and a/√6 for a triangular one. On a value that is already uncertain, this adds another independent component.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Default |
|
|
Default |
|
|
Names this input in uncertainty budgets Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Correlate¶
uncertainty.correlate
Two values with the correlation coefficient r between them (GUM 5.2): each keeps its value and standard uncertainty (and unit), and u(a, b) = r·u(a)·u(b). Use it for inputs that share a cause, such as two readings of one instrument (r near 1) or a quantity and its complement.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
-1 to 1 Default |
|
|
Names this input in uncertainty budgets Default |
|
|
Names this input in uncertainty budgets Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Correlation Matrix Input¶
uncertainty.correlation_matrix
Give several values the correlations of a matrix (GUM 5.2): r(i, j) between value i and value j. The matrix must be symmetric, with ones on the diagonal, and positive semidefinite, which correlations that can all hold at once are. Each value keeps its value, standard uncertainty and unit; a set of named values (from Values) names them in budgets. Monte Carlo draws them jointly. Values that already depend on several sources keep only their total uncertainty (the node warns), as with Correlate.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Uncertain values: a list, an uncertain array or a set of named values |
|
|
n×n correlation coefficients: rows of numbers, a table or text |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Expanded Uncertainty¶
uncertainty.expanded_uncertainty
The expanded uncertainty U = k·u and the interval x ± U (GUM 6). k = 2 covers about 95 % for a normal distribution.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
2 for about 95 % Default |
|
|
From dof: k from Student’s t and the effective degrees of freedom Default |
|
|
Used with ‘from dof’ Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mean of Repeats (Type A)¶
uncertainty.mean_of_repeats
The mean of repeated readings, with its standard uncertainty s/√n (GUM
Type A, 4.2). std is the spread of single readings (s, n - 1).
Readings that carry an uncertainty of their own (from an instrument’s
calibration, say) pass it on to the mean too, combined with s/√n.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
Names this input in uncertainty budgets Default |
|
|
Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
Measurement¶
uncertainty.measurement
A measured value with its standard uncertainty, typed as text: 9.81 ± 0.02 m/s^2, 9.81 +/- 0.02 or 9.81(2).
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Default |
|
|
Names this input in uncertainty budgets Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Monte Carlo¶
uncertainty.monte_carlo
Propagate the distributions of the inputs by simulation (GUM Supplement
1, JCGM 101): everything upstream that depends on an uncertain input runs
trials times, each input drawn from its own distribution (normal,
rectangular, triangular, or Student’s t for a mean of few readings). Gives
the mean and standard uncertainty, the coverage interval, the samples and
a histogram, and says whether the linear (GUM) result agrees (JCGM 101, 8),
which it may not for non-linear models. Arrays are handled element by element.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The result to study: link it from any node |
|
|
Default |
|
|
Default |
|
|
Default |
|
|
Adaptive: batches of trials until two digits of u are stable Default |
|
|
The most an adaptive run Default |
|
|
The coverage interval: probabilistically symmetric or shortest Default |
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Uncertainty Budget¶
uncertainty.uncertainty_budget
Which inputs the uncertainty of a result comes from: each named input’s contribution |∂y/∂xᵢ|·u(xᵢ), in the result’s unit, and its share of the variance. Connect to Add Table for the report. For an array, each input’s largest contribution over the elements, and the element where it is.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
Value and Uncertainty¶
uncertainty.value_and_uncertainty
Split a value into its best estimate, its standard uncertainty (in the value’s unit) and the relative uncertainty u/|x|. An array is split element by element.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
Outputs
Name |
Type |
Description |
|---|---|---|
|
|
|
|
|
|
|
|