Professional Documents
Culture Documents
Chapter 1
Basic concepts in
error estimation
2
Characteristics of Numerical Methods
4
true value – approximate value
5
The solution of a problem obtained by numerical
methods contains some errors.
6
1.1 Sources of Error
In general, errors can be classified based on their sources as
non-numerical and numerical errors.
8
Some of the sources of Numerical Error:
9
If is approximated by a finite number of terms of the
series; for example up to 10 terms …
10
2) Rounding: -
It is a process of cutting numbers with large number of digits to a usable
number of figures by some procedures.
The rounding rule, round-to-nearest, leads to less round off error in general.
11
Example:
12
Note:
There is a lose of significance during the subtraction of
nearly equal number, which is the great source of round-off
error.
A similar problem arise while dividing by a smaller
number.
13
Significant Figure
15
1.2 Approximations of errors
16
Accuracy refers to how closely a computed or measured
value agrees with the true value.
17
18
1.3 Rounding off
19
Example:
Round the following numbers to 3 and 5 significant digits.
i) 123.4557
ii) 1.00457
iii) 2.457456
iv) 1240
v) 49.000088
20
1.4 Absolute and relative errors
21
Note:
Let be a number such that , then is an upper limit on
the magnitude of the absolute error.
22
Example:
Find the maximum absolute error in the approximation of
correct up to 4 decimal places.
23
1.4.2 Relative error (true fractional relative error)
It is given as; provided that .
It gives total error measuring in 1 unit.
It measures both the quantity and quality of the
calculation and measurement. And hence it is a better
measurement for error than absolute error.
24
1.4.3 Percentage error (true percent relative error)
25
One of the challenges of numerical methods is to
determine error estimates in the absence of knowledge
regarding the true value.
26
For example:
certain numerical methods use an iterative approach to
compute answers.
In such an approach, a present approximation is made
on the basis of a previous approximation.
For such cases, the error is often estimated as the
difference between previous and current
approximations.
27
Thus, percent relative error is determined according to
28
Example 1:
Suppose that student A scores 9 out of 10 and student B scores
99 out of 100.
compute
(a) the true error and
(b) the true percent relative error in each case.
Which student scores better ? How?
29
Solution:
true error for Student A = 1
true error for Student B
true percent relative error for Student A
30
31
Example 2:
32
Exercise:
1) Given
Absolute error =
Relative error =
Then find the (truth value)
33
Exercise:
34
Why do we use base 10 number system ?
35
We use base 10 number system as we have 10 fingers and 10
toes. And it uses 10 digits namely 0,1,2,3,4,5,6,7,8,and 9.
36
Computer representation of Numbers
Computers use base-2 or binary number system which
consists of 0 and 1.
The standard numerical data types available in most
programming languages are integers, reals and double
precision reals.
37
Floating – point Representation
Fractional quantities are typically represented in
computers using floating – point form.
In this approach, a number is expressed as a fractional
part, called MANTISSA or SIGNIFICAND, and an integer
part, called the EXPONENT or CHARACTERISTIC, as in
38
Example:
The number 123.45 could be represented as in a floating – point
base – 10 system.
Machine epsilon
We know that a computer has a finite word length, so only a fixed
number of digits is stored and used during computation.
Hence, even in storing an exact decimal number in its converted
form in the computer memory, an error is introduced.
This error is machine dependent and is called machine epsilon.
39
Propagation error
40
Addition or Subtraction
If Q is some combination of sums and differences, i.e.
Then,
Note:
In particular, if Q = a + b or a - b, then
41
Multiplication and Division
If
Then,
N.B
In practice, it is usually simplest to convert all of the
uncertainties into percentages before applying the
formula.
42
Example:
1) Suppose you measure the height H of a door and get 2.00
± 0.03 m. This means that H = 2.00 m and δH = 0.03m.
The door has a knob which is a height h = 0.88 ± 0.04m
from the bottom of the door. Then the distance from the
doorknob to the top of the door is Q = H - h = 1.12 m.
What is the Propagation error in Q?
2) Let , , , .
Then, find the approximation of , absolute and relative errors
and the number of significant digits of the result.
43
Numerical Stability
In numerical algorithms the concern is the growth of round-off errors
and/or small fluctuations in initial data which might cause a large
deviation of final answer from the exact solution.
Some numerical algorithms may damp out the small fluctuations (errors)
in the input data; others might magnify such errors. Calculations that can
be proven not to magnify approximation errors are called numerically
stable.
One of the common tasks of numerical analysis is to try to
select algorithms which are robust – that is to say, do not
produce a wildly different result for very small change in the
input data.
44
A method is called stable if When it is possible to have small
small changes in the initial changes in the initial data producing
data produce large changes in the final results, the
correspondingly small method is unstable.
changes in the final results.
Some methods are stable ONLY for
certain choices of initial data. These
methods are called conditionally
stable.
45
End
46