Presentation is loading. Please wait.

Presentation is loading. Please wait.

Errors in Numerical Methods

Similar presentations


Presentation on theme: "Errors in Numerical Methods"— Presentation transcript:

1 Errors in Numerical Methods
Chapter 2 Errors in Numerical Methods and Their Impacts

2 Objectives Know the difference between accuracy&precision
Understand round-off error Understand approximation error and know how to apply

3 Content Introduction Errors Round-off errors Approximate errror
Total errors Conclusion

4 Introduction Why we need to know ?
Computers are great tools, however, without fundamental understanding of engineering problems, they will be useless.

5 Errors We ask for numerical methods since we cannot get exact solution !! Numerical methods only provide approximate results, not exact ones. So how we confident our results obtained from numerical methods ???? See in next slide how can we cope this with?

6 Errors (cont’d) Accuracy. How close is a computed or measured value to the true value Precision (or reproducibility). How close is a computed or measured value to previously computed or measured values. Inaccuracy (or bias). A systematic deviation from the actual value. Imprecision (or uncertainty or variance). Magnitude of scatter.

7 Errors (cont’d)

8 Errors (cont’d) Number of “significant figures” indicates precision. Significant digits of a number are those that can be used with confidence, e.g., the number of certain digits plus one estimated digit. 53,800 How many significant figures? 5.38 x 5.380 x 5.380 x Zeros are sometimes used to locate the decimal point not significant figures.

9 Errors (cont’d) Error Definitions True Value = Approximation + Error
Et = True value – Approximation (+/-) MATLAB Example True error

10 Errors (cont’d) What u can see is we can’t estimate the true error for all cases !! (why ?) So we use the following error definition instead. Approximation error …

11 Errors (cont’d) Apply approximation error to numerical approach (iterative) (+ / -) Meaning that the result is correct at least n significant figures Define criteria :- Compute until

12 Errors (cont’d) DIY: MATLAB (Parachutist problem)
From your previous assignment, compare the approximation errors at t = 1,2,..,12 seconds for two cases, Δt = 0.5 and 0.1 respectively. Crticize why the approximation errors from these two cases are different !!

13 Round-off … Why round-off errors occur ?
1) There are numbers that can’t be expressed by a fixed number of significant figures 2) Base-2 number can’t precisely represent base-10 number (completely). 3) Fraction number in computer is represent using a floating point form, e.g. Integer part exponent mantissa Base of the number system used where

14 Round-off … (cont’d) How floating numbers ‘re stored in a computer ??
Integer part exponent mantissa Base of the number system used 11 bits 52 bits

15 Round-off … (cont’d) How floating numbers ‘re stored in a computer
(base-2 number) ??

16 Round-off … (cont’d) Examples:  x103 Suppose only 4 decimal places to be stored 0.1567x103 Rounding/Chopping 0.1568x103 Now u can see how the round-off error occurs due to the limited room for mantissa !!!!

17 Round-off … (cont’d) Examples: MATLAB Double precision case
Type format long a= what you expect Now try more example: learn round(0.5) Type round(0.75*0.3/0.01) what you expect

18 Approxi … Example: To get the cos(x) for small x: If x=0.5
From the supporting theory, for this series, the error is no greater than the first omitted term.

19 Approxi … Using Taylor’s series approximation

20 Approxi … Example: f(x) = -0.1x4-0.15x3-0.5x2-0.25x+1.2
(estimate this function at x = 1 with h = 1, given that x(0)=1.2) Try to derive your own and also write a program to show for number of order n =1,2,3,…,5

21 Approxi … U can use Taylor series to avoid the round off errors
For example: try to calculate ex at x = 0 X

22 Total … There is a trade-off

23 Others… Blunders Human mistakes Model errors Incomplete mathematical
Data uncertainty Bias, variance from measurements


Download ppt "Errors in Numerical Methods"

Similar presentations


Ads by Google