ecl-logo Documentation

PropagateUncertainty

PropagateUncertainty[expr,pars]stats

computes the uncertainty in the evaluation of expr using the parameter values and distributions specified in pars.

Details

  • In SLL, measurements with uncertainty are represented using Distributions, which may have physical units.
  • PropagateUncertainty is the low-level SLL function used to compute the uncertainty of expressions dependent on uncertain values. This function is invoked automatically when performing arithmetic operations on distributions, and can be explicitly called with options to compute confidence intervals and/or use non-standard error propagation methods, such as empirical sampling.
  • Textbook error propagation formulae (e.g. Object[Report,Literature,"id:eGakldJBRRxE"]) are typically first-order approximations derived by assuming uncertain values are Gaussian-distributed, and that the uncertainty of each measurement is much smaller than the measurement itself. PropagateUncertainty is a generalization of error propagation to arbitrary distributions, and computes uncertainty without relying on these assumptions.
  • When possible, uncertainty is propagated analytically using the parametric forms of distributions, resulting in either a parametric or transformed distribution. For example, the sum of two independent Gaussian-distributed uncertain measurements A 1.0 ± 1.0 and B 2.0 ± 1.0 is a Gaussian distribution 3.0 ± 2.
  • If uncertainty cannot be propagated analytically, the input expression will be repeatedly sampled to generate an approximate EmpiricalDistribution representing the uncertainty of the final expression. The NumberOfSamples and SamplingMethod may be changed by setting the corresponding options of PropagateUncertainty - otherwise, these parameters will be automatically set to optimize precision within reasonable compute bounds.
  • Fixed parameters should be specified using Rule, and represent values with no uncertainty. Uncertain parameters should be specified as distributions using Distributed.
  • Input
    Output
    General Options
    Attributes
  • HoldFirst

Examples

Basic Examples  (5)

Transform a distribution:

Add two uncertain values:

Add two quantity distributions:

Add one certain volume to two uncertain volumes:

Compute uncertainty in the volume of a sphere, based on uncertainty in radius measurement:

Additional Examples  (7)

Given list of constant values, no distributions:

Given list of constant values, no distributions, using Empirical method:

Can mix certain and uncertain values in any arrangement:

Given multivariate distribution:

Given mixture of univariate and multivariate distributions, using Parametric method:

Use multivariate distributions to correlate variables, which affects the variance of the resulting distribution:

Given quantity expression, return QuantityDistribution:

Options  (6)

ConfidenceLevel  (1)

Specify confidence interval as a percentage:

Method  (2)

Sample to obtain empirical distribution:

Sample from mixture of univariate and multivariate distributions:

NumberOfSamples  (1)

Specify number of samples to use for creating empirical distribution:

Output  (1)

Specify value to return:

SamplingMethod  (1)

Specify sampling method to use for empirical distribution:

Attributes  (1)

HoldFirst  (1)

Expressions are held before evaluation:

Possible Issues  (1)

Parametric method makes approximations that can miss features resulting from highly nonlinear transforms: