SlideShare a Scribd company logo
Chapter 2: Error Analysis
–
–
–
–
–
–
–

Significant Figures
Accuracy & Precision
Error Definitions
Round-off Errors
Truncation Errors
Error Propagation
Formulation Errors & Data
uncertainty
Significant Figures
 The significant figures are the digits that carry meaning to the precision of
the measurement.
 Consider three measurements for the length of a table:

L1=3.2 m

L2: 3.27 m

L3: 3.270 m

 Number of significant figures for L1 is two, for L2 is three, and for L3 is four.
 First digit is the most significant figure, and the last digit is the least
significant digit in the measurement.
 We can assign error associated with each measurement:
L1=3.2 +- 0.2 m L2: 3.27 m +- 0.01 m

L3: 3.270 +- 0.003 m

 Any digit beyond the error carrying digits is meaningless.

 Leading zeros are not significant. They are only used to show the location of
the decimal point. e. g. 0.00052 has only two significant digits . To avoid
confusion, scientists prefer scientific notation (e.g., 5.2x10-4).
Accuracy & Precision
 Accuracy refers to how closely a
computed or measured value
agrees with the true value.
 Inaccuracy (also called bias) is a
systematic deviation from the

truth.
 Precision refers to how closely
individual computed or measured
values agree with each other.
 Imprecision (also called
uncertainty) refers to the
magnitude of the scatter.

accuracy and precision are
independent from each other.
Error Definitions
 In numerical methods both accuracy and precision is required for
a particular problem. We will use the collective term error to
represent both inaccuracy and imprecision in our predictions.
Numerical errors arise from the use of approximation to
represent exact mathematic operations or quantities. Consider
the approximation we did in the problem of falling object in air.
We observed some error between the exact (true) and numerical
solutions (approximation).
The relationship between them:
True value = approximation + error

or
Et = true value – approximation
 Note that in this equation, we included all factors contributing
to the error. So, we used the subscript t to designate that this
is the true error).
 To take into account different magnitudes in different
measurements, we prefer to normalize the error. Then, we
define the fractional relative error:
Fractional relative error = (true value-approximation)/(true value)

or the percent relative error:
t = (true value-approximation)/(true value) x 100

Most of the times, we just say “error” to mean percent relative error.
So, we define true error as :

(true value  approximated value)
t 
100 %
(true value)
 In most cases we don’t have the knowledge of the “true value”,
so we define approximate error as

(approximate error )
a 
100 %
(approximate value)
 Approximate error can be defined in different ways depending
on the problem. For example, in iterative methods, error is
defined with respect to the previous calculation.

(current approx.  previous approx.)
a 
100 %
(current approx.)
Round-off Errors
 Round-off errors result from the omission of the significant figures.
Base-10 (decimal) versus Base-2 (binary) system:
Base-10

Base-2

103 102 101 100

23 22 21 20

a b c d

a b a b

= ax103 + bx102 + cx101 + dx100

= ax23 + bx22 + ax21 + bx20

Positional
Notation

 Computers knows only two numbers (on/off states). So
computers can only store numbers in binary (base-2) system.
e.g. 100101

a bit (binary digit).
1 byte= 8 bits

computer uses 6 bits to store this number.
Integer Representation:
 First bit is used to store the sign (0 for “+” and 1 for “-”);
remaining bits are used to store the number.

 In integer representation, numbers can be defined exactly but
only a limited range of numbers are allowed in a limited
memory. Also fractional quantities can not be represented.
Ex: How -3 is stored in a computer in integer representation?

Ex: Find the range of numbers that you can store in a 16-bit
computer in integer representation. (-32767 to 32767).
Floating Point Representation:
 FPR allows a much wider range of numbers than integer
representation.
 It allows storing fractional quantities.
 It is similar to the scientific notation.
Mantissa (significand)

mb e
e.g.

exponent

base

0.015678  1.5678 10 2

(base-10)

Ex: Assume you have a hypotetical base-10 computer with a 5-digit word size
(one digit for sign, two for exponent with sign, two for mantissa). a) Find the
range of values that can be represented. b) Calculate the error of representing 2-5
using this representation.
IEEE floating point representation standards:
32-bit (single precision) word format:

64-bit (double precision) word format:

 Mantissa takes only a limited number of significant digits 
round-off error
 Increasing the number of digits (32-bit versus 64-bit) decreases
the roundoff error.
Range:
In FPR there is still a limit for the representation numbers but the
range is much bigger.
In 64-bit representiaton in IEEE format:
52 digits

11 digits

Max value= +1.111…1111 x 2 +(1111111111) = 1.7977 x 10+308

Min value= 1.000…0000 x 2 -(1111111111) = 2.2251 x 10 -308
Numbers larger than the max. value cannot be represented by
the computer  overflow error.
>> realmax
ans=
1.7976931e+308

Any value bigger than this is set to infinity

 Numbers smaller than the min. value cannot be represented.
There is a “hole” at zero.  underflow error.
>> realmin
ans=
2.22500738e-308

Any value smalller than this is set to zero
Precision:
52 bits used for the mantissa correspond to about 15-16 base-10
significant units.
>> pi
ans=
3.142857
>> formatlong
>> pi
ans=
3.1428571428571

32-bit representation (single precision)

64-bit representation (double precision)

Ex: Find the smallest possible value floating point number for a hypothetical
base-2 machine that stores information using 7-bits words (first bit for the sign
of the number, next three for the sign and magnitude of the exponent , and the
last three for the magnitude of the mantissa). (1x2-3)
Chopping versus Rounding:
Assume a computer that can store 7 significant digits:
Rounding

Chopping
error

error

4.2428576428......

4.2428576428......

4.242857

4.242858

Rounding is a better choice since the sign of error can be either
positive and negative leading to smaller total numerical error.
Whereas error in chopping is always positive and adds up.
Rounding costs an extra processing to the computer, so most
computers just chops off the number.
Error associated with rounding/chopping  Quantization error
Machine epsilon:
As a result of quantization of numbers, there is a finite length of
interval between two numbers in floating point representation.

x
Machine epsilon (or machine precision) is the upper bound on
the relative error due to chopping/rounding in floating point
arithmetic.

x



For a 64-bit
x
representation, b=2, t=53
 =2-52
The machine epsilon can be computed as =2.22044.. x 10-16

 b

1t

b=number base
t= number of digits in
mantissa

>> eps
ans=
2.2204460e-16
Arithmetic operations:
Besides the limitations of the computer for storage of numbers,
arithmetic operations of these numbers also contribute to the
round-off error.
Consider a hypotetical base-10 computer with 4-digit mantissa and 1-digit
exponent:
1.345 + 0.03406 = 0.1345 x 101 + 0.003406 x 101 = 0.137906 x 101
in arithmetic operations numbers are converted as with same exponents

chopped-off

Ex: a) Evaluate the polynomial

y  x 3  5 x 2  6 x  0.55
at x=1.73. Use 3-digit arithmetic with chopping. Evaluate the error.
b) If the function is expressed as

y  x( x  5)  6x  0.55

What is the percent relative error? Compare with part a.
Subtractive cancellation:
Subtructive cancellation occurs when subtracting two nearly
equal number.
0.7549 x 103 - 0.7548 x 103 = 0.0001 x 103
4 S.D.

4 S.D.

Also called
loss of significance

1 S.D.

Many problems in numerical analysis are prone to subtractive
cencallation error. They can be mitigated by manipulations in the
formulation of the problem or by increasing the precision.
Consider finding the roots of a
2nd order polynomial:

 b  b 2  4ac

x2
2a
x1

b  4ac
2

Subtractive
cancellation

- Can use double precision, or
- Can use an alternative
formulation:

x1
x2



 2c
b  b 2  4ac
Truncation Errors
Truncation errors result from using an approximations in place of
exact mathematical representations. Remember the
approximation in the falling object in air problem:
dv v v(ti 1 )  v(ti )


dt t
ti 1  ti

Taylor theorem:
Taylor’s theorem give us insight for estimating the truncation
error in the numerical approximation.
 Taylor’s theorem states that if the function f and its n+1 drivatives
are continous on an interval containing a and x, then the values of
the function at x is given by
f ( 2) (a)
f ( n ) (a)
2
f ( x)  f (a)  f (a)( x  a) 
( x  a)  ... 
( x  a) n  Rn
2!
n!
'
exact solution

In other words, any smooth
function can be
approximated as a
polynomial of order n within
a given interval.
The error gets smaller as n
increases.
base point(a)=1

Ex: Use second order Taylor series expansion to approximate the
function
f ( x)  0.1x 4  0.15 x 3  0.5 x 2  0.25 x  1.2

at x=1 from a=0. Calculate the truncation error from this
approximation.
Suppose you have f(xi ) and want to evaulate f(xi+1):
f 2 ( xi ) 2
f n ( xi ) n
f ( xi 1 )  f ( xi )  f ' ( xi )h 
h  ... 
h  Rn
2!
n!

h  ( xi 1  xi )
Step size

where

f n 1 ( ) n 1
Rn 
h
( n  1)!

  xi , xi 1 

Here Rn represents the remainder (or the error) from the n-th
order approximation of the function. It provides and exact
determination of the error.
We can estimate the order of the magnitude of the error in
terms of step size (h):
Rn  O (h n 1 )
we can change ‘h’ to control the magnitude of the error in the calculation!
Falling object in air problem:
We can evalate the truncation error for the “falling object in
air” problem. Express v(ti+1 ) in Taylor series:
v '' (ti ) 2
v n (ti ) n
v(ti 1 )  v(ti )  v (ti )h 
h  ... 
h  Rn
2!
n!
'

h  (ti 1  ti )

Taylor series to n=1:
v(ti 1 )  v(ti )  v ' (ti )h  R1

R1  O(h 2 )

or
v ' (ti ) 

v(ti 1 )  v(ti ) R1

h
h

Finite difference appr.

Truncation error

R1 O(h 2 )

 O ( h)
h
h

Error

Then the error associated with
finite difference approximation
is in the order of h.
Error Propogation
Error propagation concerns how an error in x is propagated to the
function f(x).
x=true v.
xo= approx. v.

x  x  x

f ( x )  f ( x)  f ( x )
Propagation
of error

Taylor expansion can be used to estimate the error propagation.
Lets evaluate f(x) near f(xo):
f ( x)  f ( x  )  f ' ( x)x  ...
f ( x)  f ( x)  f ( x  )  f ' ( x)x

dropping 2nd and
higher order terms

f ( x )  f ' ( xo ) x

Ex 2.3: Given a measured value of x0= 2.50.01, estimate the
resulting error in the function f(x)=x3.
Functions of more than one variable:
x  x  x

y  y  y 

x  z  z 

f ( x  , y o , z o ,..)
Propagation of
error

...
error in

error out

Error propagation for functions of more than one variable can be
understood as the generalization of the case of functions with a
single variable:
f
f
f
f ( x , y , z ,..) 
x 
y 
z  ...
x
y
z


o

o

Ex 2.3: Open channel flow formula for a rectangular channel is given by :

1 (bh) 5 / 3
Q
n (b  2h) 2 / 3

s

(Q=flow rate , n=roughness coff.,)
(b=width, h=depth, s=slope)

Assume that b=20 m and h=0.3 m for the channel. If you know that
n=0.030±0.002 and s=0.05±0.01, what is the resulting error in calculation of Q?
Condition and stability:
Condition of a mathematical computation is the sensitivity to the
input values. It is a measure of how much an uncertainity is
magnified by the computation.
Condition
Number

=

Error in the output
Error in the input

f ( x)  f ( x o )
f ' ( x o )( x  x o )
Condition
xo f ' ( xo )
f ( xo )
f ( xo )



o
o
Number
(x  x )
(x  x )
f ( xo )
xo
xo

 If the uncertainty in the input results in gross changes in the
output, we say that the problem is unstable or ill-conditioned.

C.N.1

C.N.>>1 (ill-conditioned)
Total numerical error:
Total
Numerical
Error

= Round-off
Error

+ Truncation
Error

Round-off errors can be minimized by increasing the number of
significant digits. Subtractive cancellations and number of
computations increases the roundoff-error.
Truncation errors can be reduced by decreasing the step size (h).
But this may result in subtractive cancellation error too.
 So, there is a trade-off between
truncation error and round-off error in
terms of step size (h).
Note that there is no systematic and
general approach to evaluating
numerical errors for all problems.
Formulation Errors & Data Uncertainity
These errors are totally independant from numerical errors, and
are not directly connected to most numerical methods.
Blunders:
In other words: stupid mistakes. They can only be mitigated by
experience, or by consulting to experienced persons.
Formulation (model) errors:
Formulation (or model) errors are causes by incomplete
formulation of the mathematical model. (e.g., in “the falling object
in air problem”, not taking the effect of air fricton into account).
Data uncertainity:
If your data contain large inaccuracies or imprecisions (may be
due to problems with measurement device), this will directly
affect the quality of the results.
 Statistical analyses on the data helps to minimize these errors.

More Related Content

What's hot

Curve fitting
Curve fitting Curve fitting
Curve fitting
shopnohinami
 
Applications of linear algebra
Applications of linear algebraApplications of linear algebra
Applications of linear algebra
Prerak Trivedi
 
Interpolation
InterpolationInterpolation
Interpolation
Bhavik A Shah
 
Eigen values and eigenvectors
Eigen values and eigenvectorsEigen values and eigenvectors
Eigen values and eigenvectorsAmit Singh
 
Newton's forward & backward interpolation
Newton's forward & backward interpolationNewton's forward & backward interpolation
Newton's forward & backward interpolation
Harshad Koshti
 
GAUSS ELIMINATION METHOD
 GAUSS ELIMINATION METHOD GAUSS ELIMINATION METHOD
GAUSS ELIMINATION METHOD
reach2arkaELECTRICAL
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
Tarun Gehlot
 
Relaxation method
Relaxation methodRelaxation method
Relaxation method
Parinda Rajapaksha
 
B.tech ii unit-1 material curve tracing
B.tech ii unit-1 material curve tracingB.tech ii unit-1 material curve tracing
B.tech ii unit-1 material curve tracing
Rai University
 
Application of interpolation in CSE
Application of interpolation in CSEApplication of interpolation in CSE
Application of interpolation in CSE
Md. Tanvir Hossain
 
Newton Raphson
Newton RaphsonNewton Raphson
Newton Raphson
Nasima Akhtar
 
Bisection method
Bisection methodBisection method
Bisection method
Md. Mujahid Islam
 
Methods of solving ODE
Methods of solving ODEMethods of solving ODE
Methods of solving ODE
kishor pokar
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson method
Bijay Mishra
 
Unit i ppt (1)
Unit i   ppt (1)Unit i   ppt (1)
Unit i ppt (1)
SILVIYA jillu
 
Multiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical MethodsMultiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical Methods
Meenakshisundaram N
 
Interpolation with Finite differences
Interpolation with Finite differencesInterpolation with Finite differences
Interpolation with Finite differences
Dr. Nirav Vyas
 
03 truncation errors
03 truncation errors03 truncation errors
03 truncation errorsmaheej
 

What's hot (20)

Curve fitting
Curve fitting Curve fitting
Curve fitting
 
Applications of linear algebra
Applications of linear algebraApplications of linear algebra
Applications of linear algebra
 
Interpolation
InterpolationInterpolation
Interpolation
 
Numerical Method
Numerical Method Numerical Method
Numerical Method
 
Eigen values and eigenvectors
Eigen values and eigenvectorsEigen values and eigenvectors
Eigen values and eigenvectors
 
newton raphson method
newton raphson methodnewton raphson method
newton raphson method
 
Newton's forward & backward interpolation
Newton's forward & backward interpolationNewton's forward & backward interpolation
Newton's forward & backward interpolation
 
GAUSS ELIMINATION METHOD
 GAUSS ELIMINATION METHOD GAUSS ELIMINATION METHOD
GAUSS ELIMINATION METHOD
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
 
Relaxation method
Relaxation methodRelaxation method
Relaxation method
 
B.tech ii unit-1 material curve tracing
B.tech ii unit-1 material curve tracingB.tech ii unit-1 material curve tracing
B.tech ii unit-1 material curve tracing
 
Application of interpolation in CSE
Application of interpolation in CSEApplication of interpolation in CSE
Application of interpolation in CSE
 
Newton Raphson
Newton RaphsonNewton Raphson
Newton Raphson
 
Bisection method
Bisection methodBisection method
Bisection method
 
Methods of solving ODE
Methods of solving ODEMethods of solving ODE
Methods of solving ODE
 
Newton raphson method
Newton raphson methodNewton raphson method
Newton raphson method
 
Unit i ppt (1)
Unit i   ppt (1)Unit i   ppt (1)
Unit i ppt (1)
 
Multiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical MethodsMultiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical Methods
 
Interpolation with Finite differences
Interpolation with Finite differencesInterpolation with Finite differences
Interpolation with Finite differences
 
03 truncation errors
03 truncation errors03 truncation errors
03 truncation errors
 

Viewers also liked

Decimal arithmetic in Processors
Decimal arithmetic in ProcessorsDecimal arithmetic in Processors
Decimal arithmetic in ProcessorsPeeyush Pashine
 
Numerical approximation
Numerical approximationNumerical approximation
Numerical approximationMileacre
 
Approximation and error
Approximation and errorApproximation and error
Approximation and errorrubenarismendi
 
Math1003 1.17 - Truncation, Rounding, Overflow, & Conversion Error
Math1003 1.17 - Truncation, Rounding, Overflow, & Conversion ErrorMath1003 1.17 - Truncation, Rounding, Overflow, & Conversion Error
Math1003 1.17 - Truncation, Rounding, Overflow, & Conversion Errorgcmath1003
 
Numerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagationNumerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagation
Scilab
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
ESUG
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
BBDITM LUCKNOW
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
ASHOK KUMAR REDDY
 
Error analysis presentation
Error analysis presentationError analysis presentation
Error analysis presentation
Nnuuy Rosyidah
 
Chapter 5 international compensation
Chapter   5 international compensationChapter   5 international compensation
Chapter 5 international compensation
Preeti Bhaskar
 
Error analysis presentation
Error analysis presentationError analysis presentation
Error analysis presentation
Geraldine Lopez
 

Viewers also liked (12)

Chap 1
Chap 1Chap 1
Chap 1
 
Decimal arithmetic in Processors
Decimal arithmetic in ProcessorsDecimal arithmetic in Processors
Decimal arithmetic in Processors
 
Numerical approximation
Numerical approximationNumerical approximation
Numerical approximation
 
Approximation and error
Approximation and errorApproximation and error
Approximation and error
 
Math1003 1.17 - Truncation, Rounding, Overflow, & Conversion Error
Math1003 1.17 - Truncation, Rounding, Overflow, & Conversion ErrorMath1003 1.17 - Truncation, Rounding, Overflow, & Conversion Error
Math1003 1.17 - Truncation, Rounding, Overflow, & Conversion Error
 
Numerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagationNumerical analysis using Scilab: Error analysis and propagation
Numerical analysis using Scilab: Error analysis and propagation
 
Numerical Methods
Numerical MethodsNumerical Methods
Numerical Methods
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
 
Top down parsing
Top down parsingTop down parsing
Top down parsing
 
Error analysis presentation
Error analysis presentationError analysis presentation
Error analysis presentation
 
Chapter 5 international compensation
Chapter   5 international compensationChapter   5 international compensation
Chapter 5 international compensation
 
Error analysis presentation
Error analysis presentationError analysis presentation
Error analysis presentation
 

Similar to Es272 ch2

error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
SALU18
 
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGAScientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Ahmed Gamal Abdel Gawad
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
miftah88
 
A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...
A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...
A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...
ijfls
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptx
jovannyflex
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptx
jovannyflex
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
Deepak John
 
Number system part 1
Number  system part 1Number  system part 1
Number system part 1
Excel Technology Lanka (Pvt) Ltd
 
Statistics lab 1
Statistics lab 1Statistics lab 1
Statistics lab 1
University of Salerno
 
Advance algebra
Advance algebraAdvance algebra
Advance algebra
lyra matalubos
 
Count-Distinct Problem
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct Problem
Kai Zhang
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
bmangesh
 
NUMERICA METHODS 1 final touch summary for test 1
NUMERICA METHODS 1 final touch summary for test 1NUMERICA METHODS 1 final touch summary for test 1
NUMERICA METHODS 1 final touch summary for test 1
musadoto
 
Linear regression
Linear regressionLinear regression
Linear regression
Zoya Bylinskii
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
study cse
 
02 Notes Divide and Conquer
02 Notes Divide and Conquer02 Notes Divide and Conquer
02 Notes Divide and Conquer
Andres Mendez-Vazquez
 
Error analysis
Error analysisError analysis
Error analysis
Saloni Singhal
 
1. control structures in the python.pptx
1. control structures in the python.pptx1. control structures in the python.pptx
1. control structures in the python.pptx
DURAIMURUGANM2
 

Similar to Es272 ch2 (20)

error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
 
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGAScientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
Scientific Computing II Numerical Tools & Algorithms - CEI40 - AGA
 
chapter one && two.pdf
chapter one && two.pdfchapter one && two.pdf
chapter one && two.pdf
 
A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...
A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...
A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED O...
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptx
 
Lecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptxLecture 5 – Computing with Numbers (Math Lib).pptx
Lecture 5 – Computing with Numbers (Math Lib).pptx
 
Module 1 number systems and code1
Module 1  number systems and code1Module 1  number systems and code1
Module 1 number systems and code1
 
Number system part 1
Number  system part 1Number  system part 1
Number system part 1
 
bobok
bobokbobok
bobok
 
Statistics lab 1
Statistics lab 1Statistics lab 1
Statistics lab 1
 
Advance algebra
Advance algebraAdvance algebra
Advance algebra
 
Count-Distinct Problem
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct Problem
 
Computer Oraganizaation.pptx
Computer Oraganizaation.pptxComputer Oraganizaation.pptx
Computer Oraganizaation.pptx
 
NUMERICA METHODS 1 final touch summary for test 1
NUMERICA METHODS 1 final touch summary for test 1NUMERICA METHODS 1 final touch summary for test 1
NUMERICA METHODS 1 final touch summary for test 1
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Data representation computer architecture
Data representation  computer architectureData representation  computer architecture
Data representation computer architecture
 
02 Notes Divide and Conquer
02 Notes Divide and Conquer02 Notes Divide and Conquer
02 Notes Divide and Conquer
 
Error analysis
Error analysisError analysis
Error analysis
 
1. control structures in the python.pptx
1. control structures in the python.pptx1. control structures in the python.pptx
1. control structures in the python.pptx
 

More from Batuhan Yıldırım (10)

Es272 ch7
Es272 ch7Es272 ch7
Es272 ch7
 
Es272 ch6
Es272 ch6Es272 ch6
Es272 ch6
 
Es272 ch5b
Es272 ch5bEs272 ch5b
Es272 ch5b
 
Es272 ch5a
Es272 ch5aEs272 ch5a
Es272 ch5a
 
Es272 ch4b
Es272 ch4bEs272 ch4b
Es272 ch4b
 
Es272 ch4a
Es272 ch4aEs272 ch4a
Es272 ch4a
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
Es272 ch0
Es272 ch0Es272 ch0
Es272 ch0
 
Es272 ch3b
Es272 ch3bEs272 ch3b
Es272 ch3b
 
Es272 ch3a
Es272 ch3aEs272 ch3a
Es272 ch3a
 

Recently uploaded

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 

Recently uploaded (20)

GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 

Es272 ch2

  • 1. Chapter 2: Error Analysis – – – – – – – Significant Figures Accuracy & Precision Error Definitions Round-off Errors Truncation Errors Error Propagation Formulation Errors & Data uncertainty
  • 2. Significant Figures  The significant figures are the digits that carry meaning to the precision of the measurement.  Consider three measurements for the length of a table: L1=3.2 m L2: 3.27 m L3: 3.270 m  Number of significant figures for L1 is two, for L2 is three, and for L3 is four.  First digit is the most significant figure, and the last digit is the least significant digit in the measurement.  We can assign error associated with each measurement: L1=3.2 +- 0.2 m L2: 3.27 m +- 0.01 m L3: 3.270 +- 0.003 m  Any digit beyond the error carrying digits is meaningless.  Leading zeros are not significant. They are only used to show the location of the decimal point. e. g. 0.00052 has only two significant digits . To avoid confusion, scientists prefer scientific notation (e.g., 5.2x10-4).
  • 3. Accuracy & Precision  Accuracy refers to how closely a computed or measured value agrees with the true value.  Inaccuracy (also called bias) is a systematic deviation from the truth.  Precision refers to how closely individual computed or measured values agree with each other.  Imprecision (also called uncertainty) refers to the magnitude of the scatter. accuracy and precision are independent from each other.
  • 4. Error Definitions  In numerical methods both accuracy and precision is required for a particular problem. We will use the collective term error to represent both inaccuracy and imprecision in our predictions. Numerical errors arise from the use of approximation to represent exact mathematic operations or quantities. Consider the approximation we did in the problem of falling object in air. We observed some error between the exact (true) and numerical solutions (approximation). The relationship between them: True value = approximation + error or Et = true value – approximation
  • 5.  Note that in this equation, we included all factors contributing to the error. So, we used the subscript t to designate that this is the true error).  To take into account different magnitudes in different measurements, we prefer to normalize the error. Then, we define the fractional relative error: Fractional relative error = (true value-approximation)/(true value) or the percent relative error: t = (true value-approximation)/(true value) x 100 Most of the times, we just say “error” to mean percent relative error.
  • 6. So, we define true error as : (true value  approximated value) t  100 % (true value)  In most cases we don’t have the knowledge of the “true value”, so we define approximate error as (approximate error ) a  100 % (approximate value)  Approximate error can be defined in different ways depending on the problem. For example, in iterative methods, error is defined with respect to the previous calculation. (current approx.  previous approx.) a  100 % (current approx.)
  • 7. Round-off Errors  Round-off errors result from the omission of the significant figures. Base-10 (decimal) versus Base-2 (binary) system: Base-10 Base-2 103 102 101 100 23 22 21 20 a b c d a b a b = ax103 + bx102 + cx101 + dx100 = ax23 + bx22 + ax21 + bx20 Positional Notation  Computers knows only two numbers (on/off states). So computers can only store numbers in binary (base-2) system. e.g. 100101 a bit (binary digit). 1 byte= 8 bits computer uses 6 bits to store this number.
  • 8. Integer Representation:  First bit is used to store the sign (0 for “+” and 1 for “-”); remaining bits are used to store the number.  In integer representation, numbers can be defined exactly but only a limited range of numbers are allowed in a limited memory. Also fractional quantities can not be represented. Ex: How -3 is stored in a computer in integer representation? Ex: Find the range of numbers that you can store in a 16-bit computer in integer representation. (-32767 to 32767).
  • 9. Floating Point Representation:  FPR allows a much wider range of numbers than integer representation.  It allows storing fractional quantities.  It is similar to the scientific notation. Mantissa (significand) mb e e.g. exponent base 0.015678  1.5678 10 2 (base-10) Ex: Assume you have a hypotetical base-10 computer with a 5-digit word size (one digit for sign, two for exponent with sign, two for mantissa). a) Find the range of values that can be represented. b) Calculate the error of representing 2-5 using this representation.
  • 10. IEEE floating point representation standards: 32-bit (single precision) word format: 64-bit (double precision) word format:  Mantissa takes only a limited number of significant digits  round-off error  Increasing the number of digits (32-bit versus 64-bit) decreases the roundoff error.
  • 11. Range: In FPR there is still a limit for the representation numbers but the range is much bigger. In 64-bit representiaton in IEEE format: 52 digits 11 digits Max value= +1.111…1111 x 2 +(1111111111) = 1.7977 x 10+308 Min value= 1.000…0000 x 2 -(1111111111) = 2.2251 x 10 -308 Numbers larger than the max. value cannot be represented by the computer  overflow error. >> realmax ans= 1.7976931e+308 Any value bigger than this is set to infinity  Numbers smaller than the min. value cannot be represented. There is a “hole” at zero.  underflow error. >> realmin ans= 2.22500738e-308 Any value smalller than this is set to zero
  • 12. Precision: 52 bits used for the mantissa correspond to about 15-16 base-10 significant units. >> pi ans= 3.142857 >> formatlong >> pi ans= 3.1428571428571 32-bit representation (single precision) 64-bit representation (double precision) Ex: Find the smallest possible value floating point number for a hypothetical base-2 machine that stores information using 7-bits words (first bit for the sign of the number, next three for the sign and magnitude of the exponent , and the last three for the magnitude of the mantissa). (1x2-3)
  • 13. Chopping versus Rounding: Assume a computer that can store 7 significant digits: Rounding Chopping error error 4.2428576428...... 4.2428576428...... 4.242857 4.242858 Rounding is a better choice since the sign of error can be either positive and negative leading to smaller total numerical error. Whereas error in chopping is always positive and adds up. Rounding costs an extra processing to the computer, so most computers just chops off the number. Error associated with rounding/chopping  Quantization error
  • 14. Machine epsilon: As a result of quantization of numbers, there is a finite length of interval between two numbers in floating point representation. x Machine epsilon (or machine precision) is the upper bound on the relative error due to chopping/rounding in floating point arithmetic. x  For a 64-bit x representation, b=2, t=53  =2-52 The machine epsilon can be computed as =2.22044.. x 10-16  b 1t b=number base t= number of digits in mantissa >> eps ans= 2.2204460e-16
  • 15. Arithmetic operations: Besides the limitations of the computer for storage of numbers, arithmetic operations of these numbers also contribute to the round-off error. Consider a hypotetical base-10 computer with 4-digit mantissa and 1-digit exponent: 1.345 + 0.03406 = 0.1345 x 101 + 0.003406 x 101 = 0.137906 x 101 in arithmetic operations numbers are converted as with same exponents chopped-off Ex: a) Evaluate the polynomial y  x 3  5 x 2  6 x  0.55 at x=1.73. Use 3-digit arithmetic with chopping. Evaluate the error. b) If the function is expressed as y  x( x  5)  6x  0.55 What is the percent relative error? Compare with part a.
  • 16. Subtractive cancellation: Subtructive cancellation occurs when subtracting two nearly equal number. 0.7549 x 103 - 0.7548 x 103 = 0.0001 x 103 4 S.D. 4 S.D. Also called loss of significance 1 S.D. Many problems in numerical analysis are prone to subtractive cencallation error. They can be mitigated by manipulations in the formulation of the problem or by increasing the precision. Consider finding the roots of a 2nd order polynomial:  b  b 2  4ac  x2 2a x1 b  4ac 2 Subtractive cancellation - Can use double precision, or - Can use an alternative formulation: x1 x2   2c b  b 2  4ac
  • 17. Truncation Errors Truncation errors result from using an approximations in place of exact mathematical representations. Remember the approximation in the falling object in air problem: dv v v(ti 1 )  v(ti )   dt t ti 1  ti Taylor theorem: Taylor’s theorem give us insight for estimating the truncation error in the numerical approximation.  Taylor’s theorem states that if the function f and its n+1 drivatives are continous on an interval containing a and x, then the values of the function at x is given by f ( 2) (a) f ( n ) (a) 2 f ( x)  f (a)  f (a)( x  a)  ( x  a)  ...  ( x  a) n  Rn 2! n! '
  • 18. exact solution In other words, any smooth function can be approximated as a polynomial of order n within a given interval. The error gets smaller as n increases. base point(a)=1 Ex: Use second order Taylor series expansion to approximate the function f ( x)  0.1x 4  0.15 x 3  0.5 x 2  0.25 x  1.2 at x=1 from a=0. Calculate the truncation error from this approximation.
  • 19. Suppose you have f(xi ) and want to evaulate f(xi+1): f 2 ( xi ) 2 f n ( xi ) n f ( xi 1 )  f ( xi )  f ' ( xi )h  h  ...  h  Rn 2! n! h  ( xi 1  xi ) Step size where f n 1 ( ) n 1 Rn  h ( n  1)!   xi , xi 1  Here Rn represents the remainder (or the error) from the n-th order approximation of the function. It provides and exact determination of the error. We can estimate the order of the magnitude of the error in terms of step size (h): Rn  O (h n 1 ) we can change ‘h’ to control the magnitude of the error in the calculation!
  • 20. Falling object in air problem: We can evalate the truncation error for the “falling object in air” problem. Express v(ti+1 ) in Taylor series: v '' (ti ) 2 v n (ti ) n v(ti 1 )  v(ti )  v (ti )h  h  ...  h  Rn 2! n! ' h  (ti 1  ti ) Taylor series to n=1: v(ti 1 )  v(ti )  v ' (ti )h  R1 R1  O(h 2 ) or v ' (ti )  v(ti 1 )  v(ti ) R1  h h Finite difference appr. Truncation error R1 O(h 2 )   O ( h) h h Error Then the error associated with finite difference approximation is in the order of h.
  • 21. Error Propogation Error propagation concerns how an error in x is propagated to the function f(x). x=true v. xo= approx. v. x  x  x f ( x )  f ( x)  f ( x ) Propagation of error Taylor expansion can be used to estimate the error propagation. Lets evaluate f(x) near f(xo): f ( x)  f ( x  )  f ' ( x)x  ... f ( x)  f ( x)  f ( x  )  f ' ( x)x dropping 2nd and higher order terms f ( x )  f ' ( xo ) x Ex 2.3: Given a measured value of x0= 2.50.01, estimate the resulting error in the function f(x)=x3.
  • 22. Functions of more than one variable: x  x  x y  y  y  x  z  z  f ( x  , y o , z o ,..) Propagation of error ... error in error out Error propagation for functions of more than one variable can be understood as the generalization of the case of functions with a single variable: f f f f ( x , y , z ,..)  x  y  z  ... x y z  o o Ex 2.3: Open channel flow formula for a rectangular channel is given by : 1 (bh) 5 / 3 Q n (b  2h) 2 / 3 s (Q=flow rate , n=roughness coff.,) (b=width, h=depth, s=slope) Assume that b=20 m and h=0.3 m for the channel. If you know that n=0.030±0.002 and s=0.05±0.01, what is the resulting error in calculation of Q?
  • 23. Condition and stability: Condition of a mathematical computation is the sensitivity to the input values. It is a measure of how much an uncertainity is magnified by the computation. Condition Number = Error in the output Error in the input f ( x)  f ( x o ) f ' ( x o )( x  x o ) Condition xo f ' ( xo ) f ( xo ) f ( xo )    o o Number (x  x ) (x  x ) f ( xo ) xo xo  If the uncertainty in the input results in gross changes in the output, we say that the problem is unstable or ill-conditioned. C.N.1 C.N.>>1 (ill-conditioned)
  • 24. Total numerical error: Total Numerical Error = Round-off Error + Truncation Error Round-off errors can be minimized by increasing the number of significant digits. Subtractive cancellations and number of computations increases the roundoff-error. Truncation errors can be reduced by decreasing the step size (h). But this may result in subtractive cancellation error too.  So, there is a trade-off between truncation error and round-off error in terms of step size (h). Note that there is no systematic and general approach to evaluating numerical errors for all problems.
  • 25. Formulation Errors & Data Uncertainity These errors are totally independant from numerical errors, and are not directly connected to most numerical methods. Blunders: In other words: stupid mistakes. They can only be mitigated by experience, or by consulting to experienced persons. Formulation (model) errors: Formulation (or model) errors are causes by incomplete formulation of the mathematical model. (e.g., in “the falling object in air problem”, not taking the effect of air fricton into account). Data uncertainity: If your data contain large inaccuracies or imprecisions (may be due to problems with measurement device), this will directly affect the quality of the results.  Statistical analyses on the data helps to minimize these errors.