Details of ScientificErrorAnalysis - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Scientific Error Analysis : ScientificErrorAnalysis/Details

Details of ScientificErrorAnalysis

Description

 • In ScientificErrorAnalysis, a structure that has numerical quantities with associated errors is called a quantity-with-error structure.  Instances of such structures, which have a particular quantity and error, are called quantities-with-error.
 • There is a quantity-with-error structure native to ScientificErrorAnalysis, constructed using the Quantity constructor.
 > with(ScientificErrorAnalysis):
 > Quantity( 10., 1. );
 ${\mathrm{Quantity}}{}\left({10.}{,}{1.}\right)$ (1)
 In the above, the first argument is the central value and the second argument is the associated error, which can be specified in absolute, relative, or units in the least digit form.  In the returned object, the error is in absolute form.
 • The minimal interpretation placed on a quantity-with-error by ScientificErrorAnalysis is that of an unknown value with central tendency, where the error value is some statistical measure of the spread of the distribution of particular values (as obtained from an experiment or trial, for example).
 Nevertheless, many calculations of both error analysis and the ScientificErrorAnalysis package are only strictly valid for Gaussian distributions.  However, in any particular application, this condition may not be strictly satisfied, and the interpretation of error values is the responsibility of the application.
 What the ScientificErrorAnalysis package does not do is perform what is called interval arithmetic.  The error value of an object in the ScientificErrorAnalysis package does not represent an interval in which possible values must be contained.
 • To extract the central value and error of a quantity-with-error, for example the above object, use evalf and GetError.
 > x := (1):
 > evalf( x ), GetError( x );
 ${10.}{,}{1.}$ (2)
 • The central feature of ScientificErrorAnalysis is the ability to combine quantities-with-error in a mathematical expression, that is, to propagate the errors through an expression.  This is done using combine/errors.
 > y := Quantity( 20., 1. );
 ${y}{:=}{\mathrm{Quantity}}{}\left({20.}{,}{1.}\right)$ (3)
 > combine( x*y, errors );
 ${\mathrm{Quantity}}{}\left({200.}{,}{22.36067977}\right)$ (4)
 The significance of this result is that, because x and y are uncertain quantities, the product has an uncertainty, as given by the error in the result.  In the theory of error analysis, this is called error propagation.  (Again, these errors do not represent closed intervals.)
 • In an error, usually only 1 or 2 digits are meaningful.  To appropriately round a result, use ApplyRule with a rounding rule.
 > ApplyRule( (4), round[2] );
 ${\mathrm{Quantity}}{}\left({200.}{,}{22.}\right)$ (5)
 A rounding rule can be directly specified in combine/errors.
 > combine( x*y, errors, rule=round[2] );
 ${\mathrm{Quantity}}{}\left({200.}{,}{22.}\right)$ (6)
 Alternatively, the default rounding rule used by combine/errors can be changed.
 > UseRule( round[2] );
 > combine( x*y, errors );
 ${\mathrm{Quantity}}{}\left({200.}{,}{22.}\right)$ (7)
 > UseRule( digits );
 Several rounding rules are available in ScientificErrorAnalysis, and more can be added by the user.
 • Errors can be propagated through any differentiable function.
 > combine( x*exp(0.1*y), errors );
 ${\mathrm{Quantity}}{}\left({73.89056099}{,}{10.44970335}\right)$ (8)
 • Correlations can be defined between quantities-with-error.
 > SetCorrelation( x, y, 0.3 );
 > combine( x*y, errors );
 ${\mathrm{Quantity}}{}\left({200.}{,}{24.89979920}\right)$ (9)
 For more information on error propagation, see any text on error analysis for the physical sciences.
 • Other quantity-with-error structures are the Constant( ) and Element( ) objects of the ScientificConstants package.  For example:
 > ScientificConstants:-Constant( G );
 ${\mathrm{Constant}}{}\left({G}\right)$ (10)
 > combine( (10), errors );
 ${\mathrm{Quantity}}{}\left({6.673}{}{{10}}^{{-11}}{,}{1.00}{}{{10}}^{{-13}}\right)$ (11)
 • Quantity-with-error structures are defined using the AddStructure command.
 • Quantity-with-error structures can be defined so that their objects are defined as functions of other objects.  In such cases, Variance, Covariance, and combine/errors use this functional dependence. For more information, see Variance, Covariance, and combine/errors.
 The derived Constants of ScientificConstants are treated as quantities-with-error with functional dependence by ScientificErrorAnalysis.  For example:
 > ScientificConstants:-GetConstant( m[e] );
 ${\mathrm{electron_mass}}{,}{\mathrm{symbol}}{=}{{m}}_{{e}}{,}{\mathrm{derive}}{=}\frac{{2}{}{{R}}_{{\mathrm{∞}}}{}{h}}{{c}{}{{\mathrm{α}}}^{{2}}}$ (12)
 > combine( ScientificConstants:-Constant( m[e] ), errors );
 ${\mathrm{Quantity}}{}\left({9.109381882}{}{{10}}^{{-31}}{,}{7.179221837}{}{{10}}^{{-38}}\right)$ (13)