Chapter 1 Basic Concepts of Error Estimation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Basic concepts in

error estimation

1
Characteristics of Numerical Methods

1. The solution procedure is iterative, with the accuracy of the

solution improving with each iteration.

2. The solution procedure provides only an approximation to the true,

but unknown, solution.

3. An initial estimate of the solution may be required.

4. The algorithm is simple and can be easily programmed.

5. The solution procedure may occasionally diverge from rather than

converge to the true solution.


 The solution of a problem obtained by numerical methods contains some
errors.
 To minimize the errors, it is most essential to identify the causes or
sources of the errors and their growth and propagation in numerical
computation.
1.1 Sources of Error
• In general, errors can be classified based on their sources as non-
numerical and numerical errors.

Non numerical Errors:


This type of errors present in the statement of the problem itself, before
determining its solution.
These occur due to the simplified assumptions made in the process of
mathematical modeling of a problem.

3
Non-numerical errors:

(1) modeling errors: generated by assumptions and limitations.

(2) blunders and mistakes: human errors /example:


programming errors, arithmetic errors/

(3) uncertainty in information and data

Some of the sources of Numerical Error:

1) Truncation: - It is a usage of an approximation in place of an


exact mathematical procedure, and hence results an error
called truncation error.
4
Example:-

This is an exact equation.

If is approximated by a finite number of terms of the series;


for example up to 10 terms …

5
2) Rounding: -
It is a process of cutting numbers with large number of digits to a
usable number of figures by some procedures.

There are two common rounding rules, round-by-chop and round-to-


nearest.
The rounding rule, round-to-nearest, leads to less round off error in
general.
Example:

6
Significant Figure
1. Non-zero digits are always significant.

2. Any zeros between two significant digits are significant.

3. A final zero or trailing zeros in the decimal portion ONLY are


significant.
Example:
How many significant figures does the following
numbers have ?
1) 0.010954
2) 100.00
3) 73.2564
4) 36.0050
5) 25000

8
1.2 Approximations of errors
 The errors associated with both
calculations and measurements
can be characterized with regard
to their accuracy and precision.

• Accuracy refers to how closely a


computed or measured value
agrees with the true value.

• Precision refers to how closely


individual computed or
measured values agree with each
other.

9
1.3 Rounding off
The following exact numbers are rounded to 5 significant
figures.

10
Exercise: Round off the following numbers

Rounded to 2 Rounded to 3 Rounded to 5


Number significant digits significant digits significant digits

a) 123.4557

b) 1.00457

c) 2.457456

d) 1240

e) 49.000088

f) 124

g) 0.02

h) 9.94356

11
1.4 Absolute and relative errors
1.4.1 Absolute Error
• It is given as;
is the truth value
is the approximate value.
Note:
• Let be a number such that , then is an upper limit on
the magnitude of the absolute error.

If the number is rounded to decimal places, then


.
Example:
1) Find the maximum absolute error in the approximation of correct up to
4 decimal places.
2) Calculate the maximum absolute error if is rounded to 2
decimal places. And, also find the absolute error.

12
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.
1.4.3 Percentage error (true percent relative error)
• Particular type of relative error.
• It is sometimes called as the relative percentage error.
• It is given as: .
• It gives total error measuring in 100 units.

13
One of the challenges of numerical methods is to determine
error estimates in the absence of knowledge regarding the true
value.

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.

14
• Thus, percent relative error is determined according to

• And the process terminates when .

Example 1:
Suppose that student A scores 9 out of 10 and student B scores 99 out of 100.
compute
(a) the true absolute error and
(b) the true percent relative error in each case.
Which student scores better ? Why?

15
Solution:
• true absolute error for Student A =1
• true absolute error for Student B
• true percent relative error for Student A

• true percent relative error for Student B

As shown by the percentage error, student B performs better.

Example 2:
Suppose the measured value of the temperature is Ta = 37.1, but the true
temperature is T = 36.9.
Then find the:
i) Error
ii) Absolute error
iii) True relative error
iv) True percentage error
16
Exercise:
1) Given
Absolute error =
Relative error =
Then find the (truth value)

2) If then find the .

3) Calculate the absolute, relative and percentage error in the


approximation of
A) 1/3 by 0.3 , 0.333 ,and 0.334
by 3.14, 3.141, 3.142 (Take the true value of as 3.1415)
Which approximation is the best in each case? Why?

17
Suppose you measure some quantities a, b, c . . . with
uncertainties δa, δb, δc, . . .. Now you want to calculate some
other quantity Q which depends on a and b and so forth.

What is the uncertainty in Q?

The answer can get a little complicated, but it should be no


surprise that the uncertainties δa, δb, etc. “propagate” to the
uncertainty of Q.

18
If Q is some combination of sums and differences, i.e.

Then,
Note:
In particular, if Q = a + b or a - b, then

∙∙∙
If
∙∙∙

Then,

N.B
In practice, it is usually simplest to convert all of the
uncertainties into percentages before applying the formula.
19
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 = Q
0.03m. The door has a knob
which is a height h = 0.88 ±
0.04m from the bottom of the H
door. Then the distance from
the doorknob to the top of the
door is Q = H - h = 1.12 m. h
What is the Propagation
error in Q?

20
Example 2:

Let ,
,
, and
.

Then, find the approximation of , absolute and relative errors


and the number of significant digits of the result.

21
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.

22
A method is called stable if small changes in the initial
data produce correspondingly small changes in the final
results.

When it is possible to have small changes in the initial data


producing large changes in the final results, the method is
unstable.

Some methods are stable ONLY for certain choices of


initial data. These methods are called conditionally stable.

23

You might also like