Applications of the ScientificErrorAnalysis Package
The ScientificErrorAnalysis package provides representation and construction of numerical quantities that have a value and associated error, which is a measure of the degree of precision to which the quantity's value is known. Calculations of error analysis can be performed with these quantities.

Specification of Quantities with Error


The same quantitywitherror can be entered three different ways.
>


 (2.1) 
>


 (2.2) 
>


 (2.3) 
Other examples:
>


 (2.4) 
>


 (2.5) 
>


 (2.6) 
Important: These quantities do not represent intervals in which possible values must be contained  they represent unknown values with central tendency. See any text on error analysis for the physical sciences or engineering.
>



A Note about the Display of Maple FloatingPoint Numbers


If a floatingpoint number is not displayed in scientific notation, it may not be apparent whether trailing zeros are significant figures.
>


 (2.1.1) 
>


 (2.1.2) 
>



>




Simple Error Analysis  Propagation of Errors


Errors can be propagated through calculations by using the combine/errors command.
>


 (3.1) 
>


 (3.2) 
Error in the sum of the above two quantities:
>


 (3.3) 
Relative error in their sum:
>


 (3.4) 
Error in their difference:
>


 (3.5) 
Relative error in their difference:
>


 (3.6) 
As expected, the relative error in the difference is greater than that in the sum.
Error in the product of the above two quantities:
>


 (3.7) 
Relative error in their product:
>


 (3.8) 
Error in their quotient:
>


 (3.9) 
Relative error in their quotient:
>


 (3.10) 
As expected, the relative errors in the product and quotient are the same.
Error in a power:
>


 (3.11) 
Error in differentiable functions:
>


 (3.12) 
>


 (3.13) 
Important: The above calculations are not interval arithmetic, and the quantities involved do not represent intervals in which values must be contained.


The Formulae of Error Propagation


The usual expressions for error propagation through simple functions are easily obtained.
>


 (4.1) 
>


 (4.2) 
Error in a sum:
>


 (4.3) 
Error in a product:
>


 (4.4) 
Relative error in the product:
>


 (4.5) 
Error in a square:
>


 (4.6) 
>


General Formula
The general formula for the error in y, where y is a function of variables is:
where is the error in and the partials are evaluated at the central values of the .
With covariances taken into account, the formula is:
The covariance may be expressed in terms of the correlation and errors , as follows:
>




Working with Rounding Rules



Introduction


The initial default rounding rule is digits, for which no rounding is performed.
>


 (5.1.1) 
We can explicitly round a Quantity( ) object:
>


 (5.1.2) 
specify a rounding rule in combine/errors:
>


 (5.1.3) 
>


 (5.1.4) 
>


 (5.1.5) 
or change the default rounding rule using the UseRule function.
>


>


 (5.1.6) 
>


 (5.1.7) 
>


 (5.1.8) 
>


>




Another Note about FloatingPoint Numbers


If a floatingpoint number is not displayed in scientific notation, it may not be apparent whether trailing zeros are significant figures.
>


 (5.2.1) 
>


 (5.2.2) 
>


 (5.2.3) 
>




Adding a New Rounding Rule


The rounding rule round3g[n] rounds the error to n figures for a significant figure of 3 or greater and n+1 figures for a significant figure of 1 or 2. Here, we add a similar rule round2g[n], which rounds the error to n figures for a significant figure of 2 or greater and n+1 figures for a significant figure of 1.
>


We can use the new rule round2g[n].
>


 (5.3.1) 
>


 (5.3.2) 
>


 (5.3.3) 
>


 (5.3.4) 
>


 (5.3.5) 
>





Error Analysis with Physical Constants



A Simple Experiment


The period of oscillation T of a simple pendulum for small amplitude is given by:
where g is the standard acceleration of gravity and L is the length of the string of the pendulum (or, more precisely, the distance from the point of suspension to the center of the pendulum bob).
A student constructs a pendulum to determine a value for g. The student measures L to be 153.2 centimeters (cm). It is decided that the uncertainty in this measurement is primarily due to the difficulty in measuring L to the center of the bob, and that this uncertainty is about plus or minus 2 millimeters (mm). (In other words, it is estimated that the measurement is probably within 2 millimeters of the correct value.) Thus, L is taken to be 153.2 +/ 0.2 centimeters. In standard units:
>


 (6.1.1) 
Now, the student sets the pendulum swinging with a small amplitude (a few centimeters). Using a stopwatch, the student measures the time for 30 oscillations to be 75.3 seconds (s). The uncertainty in this measurement is due to the human reaction time in operating the stopwatch, and so the time measurement is taken to be 75.3 +/ 0.5 seconds.
>


 (6.1.2) 
Because the number of oscillations (30) is exact, the period of a single oscillation is:
>


 (6.1.3) 
The previous formula rearranges to:
and so, the student calculates the experimentally determined value of g to be:
>


 (6.1.4) 
The accepted value of g is:
>


 (6.1.5) 
Assuming the error in the experimental value represents a standard deviation, the accepted value thus lies farther than one standard deviation from the experimental central value. The student then must decide whether to repeat the experiment, or consider possibly overlooked sources of measurement error.
>




Another Example


A sample of a gas is measured to have a volume of 20.3 liters (L), pressure of 105 kilopascals (kPa), and temperature of 297 kelvins (K). If all the measurements have uncertainty of 1%, what is the value and uncertainty of the number of moles in the sample?
The ideal gas law is:
where P is pressure, V is volume, T is temperature, and R is the ideal gas constant.
Constructing quantitieswitherror for P, V, and T in standard units:
>


 (6.2.1) 
>


 (6.2.2) 
>


 (6.2.3) 
Thus, the number of moles n is:
>


 (6.2.4) 
Thus, the sample has 0.863 moles (mol) of gas molecules, with a relative error of:
>


 (6.2.5) 
or about 2%.
>




Working at higher Digits


Some physical constants have their values determined to more than 10 significant figures, hence calculations involving these objects at the default setting of Digits may result in a loss of precision. If more precision is desired, Digits may be set to a higher value, 15 for example.
>


 (6.3.1) 
>


 (6.3.2) 
>


>


 (6.3.3) 
>


>





Error in a Derived Physical Constant


Let us examine the formula for the electron mass.
>


 (7.1) 
As a demonstration, we manually construct the same expression using individual physical constant objects.
>


 (7.2) 
Propagating the errors gives us:
>


 (7.3) 
The above calculation is similar to the method ScientificConstants and ScientificErrorAnalysis use internally.
>


 (7.4) 
>


 (7.5) 

Return to ScientificErrorAnalysis
Return to Index for Example Worksheets
