Wyższa Szkoła Zarządzania i Bankowości
LECTURESNOTEBOOKSPACKAGES
4 Number Representation and Error Propagation
4.2 Error Propagation

1 Introduction to Simulation and Modeling
2 Discrete Medeling (L-Systems)
3 Population Dynamics
4 Number Representation and Error Propagation
4.1 Number Representation
4.2 Error Propagation
4.3 Conditioning
5 Modeling with Random Numbers
6 Heat Transfer in a Rod (Connection Mathematica and C: MathLink)
7 Special Topics in Stochastic Finance
8 Appendix: Introduction to Mathematica
9 Population Dynamics in Vensim®PLE
     
 

IV.2 Error Propagation

In the previous section it was shown that errors are inherent to numerical calculations. Unlike symbolic calculations, where the focus is on symbol manipulation, errors play an important role in numerical calculations. Errors may come from several sources:

[Graphics:Images/nb4_gr_259.gif] modelling
[Graphics:Images/nb4_gr_260.gif] data
[Graphics:Images/nb4_gr_261.gif] computation

Modelling errors occur when assumptions on the model are not correct. For example, a classical approach is taken in a situation where a quantum approach is required, or a viscous component is left out of consideration.
Data errors occur due to inaccuracies in the input data. The input data can be the result of (inaccurate) measurements or be the result of previous calculations.
Computational errors occur due to inaccuracies in the computational procedure.  Round-off due to finite precision is an example of a computational error. Other examples are truncation in which an infinite process is approximated by a finite process, like [Graphics:Images/nb4_gr_262.gif] or [Graphics:Images/nb4_gr_263.gif]. Also, bugs in the software or hardware errors fall in this category, but these will not be discussed here further.

The type of error that is of most interest to us is the last category: the computational error. This type of error is a necessary evil, responsible for almost never resulting in the exact answer. On the other hand, a high accuracy is feasible when desired, albeit at the expense of a large computational effort. In the previous section the definition was given for the absolute error as the difference of the exact value minus the approximated value, and for the relative error as the quotient of the absolute error and the exact value. From these definitions it follows immediately that the approximated value [Graphics:Images/nb4_gr_264.gif] of an exact value [Graphics:Images/nb4_gr_265.gif] can be written as [Graphics:Images/nb4_gr_266.gif], where [Graphics:Images/nb4_gr_267.gif] is the relative error.
It is important to distinguish data errors from computational errors. Let [Graphics:Images/nb4_gr_268.gif] be some exact value, [Graphics:Images/nb4_gr_269.gif] its machine representation (value with data error) and let [Graphics:Images/nb4_gr_270.gif] be some computational procedure, which maps an input value to an output value. While [Graphics:Images/nb4_gr_271.gif] would be the desired output value, the best result that can be obtained is [Graphics:Images/nb4_gr_272.gif]. This is caused by data errors. The propagated data error is defined as

[Graphics:Images/nb4_gr_273.gif].

Just as the input value [Graphics:Images/nb4_gr_274.gif] could not be represented exactly, the output value will suffer the same problem. Thus, even if the input value is exact, say [Graphics:Images/nb4_gr_275.gif], the output value will in general not be [Graphics:Images/nb4_gr_276.gif] but [Graphics:Images/nb4_gr_277.gif]. Instead of ending up with the result [Graphics:Images/nb4_gr_278.gif] for the input value [Graphics:Images/nb4_gr_279.gif], the final result will be [Graphics:Images/nb4_gr_280.gif].
The accumulated absolute error now becomes

[Graphics:Images/nb4_gr_281.gif].

The first term on the right hand side is called the computational error ([Graphics:Images/nb4_gr_282.gif]). This type of error depends on the implementation. The second term on the right hand side is the propagated data error that depends on the condition of the problem. The condition will be discussed later in this section.
The relation between these errors is shown in the picture below. The picture shows both the exact curve [Graphics:Images/nb4_gr_283.gif] and the curve [Graphics:Images/nb4_gr_284.gif] of computed values. The green dot indicates the intended (exact) function value, but due to different types of errors the result obtained is the one indicated by the red dot.

[Graphics:Images/nb4_gr_285.gif]


 
     
  Lectures | Notebooks | Packages

 
  Copyright © 2003 Wyższa Szkoła Zarządzania i Bankowości. Wszystkie prawa zastrzeżone
webmaster@wszib.edu.pl