Analysis - of - Numerical - Errors Chapter 1
Analysis - of - Numerical - Errors Chapter 1
Analysis - of - Numerical - Errors Chapter 1
SIGNIFICANT FIGURES
By visual inspection of the speedometer in Fig 3.1, could you tell at what speed is this car traveling?
A: between 48 and 49 and most people would claim is traveling close to 49 km/h.
Let’s estimate the speed to one decimal place: Some will say 48.8 others 49.9. Difficult due to the
limitations of the instrument. Estimates of the third digit (or higher) must be viewed as approximations.
It would be ridiculous to claim, on the basis of this speedometer, that the automobile is traveling at
48.8642138 km/h.
The concept of a significant figure, or digit, has been developed to formally designate the reliability of a
numerical value. The significant digits of a number are those that can be used with confidence. They
correspond to the number of certain digits plus one estimated digit. For example, the speedometer and
the odometer in Fig. 3.1 yield readings of three and seven significant figures, respectively.
For the speedometer, the two certain digits are 48. It is conventional to set the estimated digit at one-
half of the smallest scale division on the measurement device, therefore:
Trailing zeros
Trailing zeros may create confusion, e.g. 45,300
This number may have three, four, or five significant digits, depending on whether the zeros are known
with confidence.
Scientific notation
Provides a convenient way where the above number can be expressed as
4.53 × 104,
4.530 × 104,
4.5300 × 104
Designate that the number is known to three, four, and five significant figures, respectively.
Numerical methods yield approximate results. Therefore, developing criteria to specify how confident
we are in the approximate result is necessary. One way to do this is in terms of significant figures. For
example, we might decide that our approximation is acceptable if it is correct to five significant figures.
TYPES OF ERRORS
ROUND-OFF
computer limitation to store most floating point numbers
a terminating decimal fraction can be nonterminating in base 2:
e.g.
0.610 0.10011001100112
some computers round the final answer others just chop off extra digits
TRUNCATION ERROR
results from the truncation of a series or number:
𝑥 𝑥2 𝑥3
𝑒𝑥 = 1 + + + + ⋯
1! 2! 3!
truncation
2 3
𝑥 𝑥 𝑥
𝑒 𝑥 = 1 + + + + 𝜗(𝑥 4 )
1! 2! 3!
PROPAGATION
Errors propagate in multiple operations if intermediate results are not expressed or stored with
a significant number of digits
To avoid propagation, intermediate calculations should be done with more significant digits than
the number of digits of the data. Computed values should only be rounded at the end of the
computation process
Examples
These concepts can be illustrated graphically using an analogy from target practice. The bullet holes
on each target in the figure below can be thought of as the predictions of a numerical technique,
whereas the bull’s-eye represents the true value. A shooter has different performance in the
following targets.
Target PRECISION ACCURACY BIAS
A High High None (unbiased)
B High Low High
C Low Low None (unbiased)
D Low Low Moderate
ERROR DEFINITIONS
By rearranging we find that the numerical error is equal to the discrepancy between the truth and the
approximation, as in
The following expression takes into account the magnitude of quantities being evaluated
Also
Eq 3.3
where εt is the true percent relative error
The availability of an analytical solution allow us to compute the error exactly. For many problems, we
cannot obtain analytical solutions. Therefore, we cannot compute exactly the errors associated with our
numerical methods. In these cases, we must settle for approximations or estimates of the errors.
In real-world applications, many times we don’t not know the true answer a priori. For these situations,
an alternative is to normalize the error using the best available estimate of the true value as in
Certain numerical methods use an iterative approach to compute answers. A current approximation is
made on the basis of a previous approximation. This process is performed repeatedly, or iteratively, to
successively compute better and better approximations. For such cases, the error is often estimated as
the difference between previous and current approximations. Thus, percent relative error is determined
according to
Eq 3.5
Often, when performing computations, we may not be concerned with the sign of the error, but we are
interested in whether the percent absolute value is lower than a prespecified percent tolerance Ɛt. For
such cases, the computation is repeated until
` Eq 3.6
It is also important to relate these errors to the number of significant figures in the approximation. It
can be shown (Scarborough, 1966) that if the following criterion is met, we can be assured that the
result is correct to at least n significant figures.