combine/errors
combine quantities-with-error in an expression
Calling Sequence
Parameters
Description
Examples
combine( expr, errors, opts )
expr
-
expression containing quantities-with-error
opts
(optional) equation(s) of the form option=value, where option is one of 'rule' or 'correlations'; determine behavior
The combine( expr, errors, opts ) command combines quantities-with-error in a mathematical expression, or in other words, propagates the errors through an expression.
The opts argument can contain one or more of the following equations that determine the behavior:
'rule' = name
If the optional parameter rule=name is given, the rounding rule name is applied to the result of combine. Otherwise, the default rounding rule is used ('digits', or as set by ScientificErrorAnalysis[UseRule]).
'correlations' = true or false
If 'correlations'=true, combine/errors uses correlations defined between the quantities-with-error combined. The default value of 'correlations' is true. If 'correlations'=false, combine/errors ignores any correlations defined between the quantities-with-error.
If no correlations have been directly defined between the quantities-with-error in expr (using ScientificErrorAnalysis[SetCorrelation]), 'correlations'=false does not produce a result different from the default.
'correlations'=false has no effect on further induced error analysis calculations. That is, when combine/errors requires the variance of a quantity-with-error with functional dependence, that calculation is performed using correlations.
The result of combine/errors is a quantity-with-error returned in a Quantity object.
The uncertainty is calculated using the usual formula of error analysis involving a first-order expansion with the variances of the quantities-with-error.
The error u⁡y in y, where y is a function of variables xi, is
u⁡y2=∑i=1N⁡ⅆyⅆxi2⁢u⁡xi2
where u⁡xi is the error in xi, and the partials are evaluated at the central values of the xi.
When correlations are included, the formula also involves the covariances u⁡xi,xj between the quantities-with-error.
u⁡y2=∑i=1N⁡ⅆyⅆxi2⁢u⁡xi2+2⁢∑i=1N−1⁡∑j=i+1N⁡ⅆyⅆxi⁢ⅆyⅆxj⁢u⁡xi,xj
The covariance u⁡xi,xj can be expressed in terms of the correlation r⁡xi,xj and errors u⁡xi, u⁡xj as:
u⁡xi,xj=r⁡xi,xj⁢u⁡xi⁢u⁡xj
where u⁡xi and u⁡xj are the errors in xi and xj.
ScientificErrorAnalysis[Variance] and ScientificErrorAnalysis[Covariance] are used to calculate the variances and covariances of the quantities-with-error. Thus, any quantity-with-error combined can have functional dependence on other quantities-with-error.
with⁡ScientificErrorAnalysis:
a≔Quantity⁡10.,1.:
b≔Quantity⁡20.,1.:
combine⁡a⁢b,errors
Quantity⁡200.,22.36067977
combine⁡a⁢b,errors,rule=round2
Quantity⁡200.,22.
combine⁡ba,errors
Quantity⁡2.000000000,0.2236067977
SetCorrelation⁡a,b,0.1
Quantity⁡200.,23.23790008
Quantity⁡2.000000000,0.2144761059
combine⁡ba,errors,correlations=false
with⁡ScientificConstants:
e5≔Constant⁡h⁢Constant⁡c⁢a
e5≔Constant⁡h⁢Constant⁡c⁢Quantity⁡10.,1.
combine⁡e5,errors
Quantity⁡1.986445824×10−24,1.986445824×10−25
e6≔Constant⁡meConstant⁡mp
combine⁡e6,errors
Quantity⁡0.0005446170214,5.176301769×10−14
See Also
combine
Overview of ScientificErrorAnalysis
Rounding rules
ScientificConstants
ScientificConstants[Constant]
ScientificErrorAnalysis
ScientificErrorAnalysis and ScientificConstants
ScientificErrorAnalysis[Covariance]
ScientificErrorAnalysis[GetCorrelation]
ScientificErrorAnalysis[Quantity]
ScientificErrorAnalysis[SetCorrelation]
ScientificErrorAnalysis[UseRule]
ScientificErrorAnalysis[UsingRule]
ScientificErrorAnalysis[Variance]
Download Help Document