Professional Documents
Culture Documents
Combined
Combined
Combined
Text:
• Rajaraman V, “Computer Oriented Numerical Methods”, Pearson Education
• Gerald & Wheatley, “Applied Numerical Analyses”, Addison Wesley.
• Jain, Iyengar and Jain, “Numerical Methods for Scientific and Engineering
Computations”, New Age Int.
• Grewal B S, “Numerical methods in Engineering and Science”, Khanna
Publishers, Delhi.
• G. Hadley, Linear Programming, Narosa Publishing House, New Delhi, 2002
2
Amity Institute of Applied Sciences
References:
• T Veerarajan, T Ramachandran, “Theory and Problems in Numerical Methods,
TMH
• Pradip Niyogi, “Numerical Analysis and Algorithms”, TMH.
• Francis Scheld, ” Numerical Analysis”, TMH.
• Sastry S. S, “Introductory Methods of Numerical Analysis”, Pearson
Education.
• Gupta C.B., Vijay Gupta, “Introduction to Statistical Methods”, Vikas
Publishing.
• Goyal, M, “Computer Based Numerical and Statistical Techniques”, Firewall
Media, New Delhi.
• Kantiswarup and Gupta, “Operation Research”, S. Chand, New Delhi. 3
Amity Institute of Applied Sciences
Course Objectives:
By the end of the semester, the students will be able to deal with
the techniques of numerical analysis and optimization, which
gives the solution to applied problem when ordinary analytical
method fails.
4
Amity Institute of Applied Sciences
Learning Outcomes:
5
Errors Amity Institute of Applied Sciences
In numerical analysis the error may occur at any stage of the process of solving a problem.
The most common formula to find error is given by
Error = True value - Approximate value
Types of errors
(i) Inherent Errors: Inherent errors are the errors that pre exist in the problem statement itself
before its solution is obtained. Inherent errors exist because the data being approximate or
due to the limitations of the calculations using digital computers. Inherent errors cannot be
removed completely, but can be minimized.
(ii) Rounding Errors: It occurs from the process of rounding off the numbers during the
computations i.e., it occur when a fixed number of digits are used to represent exact
numbers.
These errors can be reduced however by
(a) Changing the calculation procedures so as to avoid subtraction of nearly equal numbers
or division by a small number.
(b) Retaining atleast one more significant digit at each step and rounding off at last step.
(iii) Truncation errors: They are caused by using approximate results or on replacing an
6
infinite process by a finite one.
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
9
Amity Institute of Applied Sciences
1 x
3 5
x x
Example : Use the seriesloge 2 ( x .......), to compute the value of log(1.2)
1 x 3 5
correctto seven decimal places and find the number of terms retained.
1 x
Solution : Let 1.2 x 1 / 11,
1 x
2 n 1
1
2 n 1 2
2 x 11
If we retain n terms then, ( n 1) th term
2n 1 2n 1
2 n 1
1
2
for seventh decimal accuracy
11 1
10 7
2n 1 2
( 2n 1) 112 n 1 4 107 n 3.
hence retaining the first three terms of the given series, we get
x3 x5 1
loge (1.2) 2( x ) at ( x ) 0.1823215.
3 5 11
10
Amity Institute of Applied Sciences
Thank you
11
Amity Institute of Applied Sciences
Xa
x
Xb
Figure 1 At least one root exists between the two points if the function is
real, continuous, and changes sign.
2
Amity Institute of Applied Sciences
f(x)
x
Xb
Xa
xl
x
xu
4
Amity Institute of Applied Sciences
Step 2
Estimate the root, xm of the equation f (x) = 0 as the
mid point between xl and xu as
f(x)
xl xu
xm =
2
xl xm
x
xu
5
Amity Institute of Applied Sciences
Step 3
Now check the following
Step 4 xl xu
Find the new estimate of the root xm =
2
Repeated the process until, we get the root of the equation upto its
accuracy.
We can also find the absolute relative approximate
error x new x old
a 100
m m
new
x
where m
Advantages
1. Always convergent
2. The root bracket gets halved with each iteration - guaranteed.
Drawbacks
1. Slow convergence
2. If one of the initial guesses is close to the root, the
convergence is slower
8
Drawback Example (continued) Amity Institute of Applied Sciences
f x x 2
f(x)
9
Drawback Example (continued) Amity Institute of Applied Sciences
f x
1
x x
10
Amity Institute of Applied Sciences
2.25 2.5
IIIrd approximat ion : x 3 2.375
2
Now f ( x 3 ) f ( 2.375) ( 2.375) 2.375 11 0.021 i.e. ve
3
12
Amity Institute of Applied Sciences
13
Amity Institute of Applied Sciences
14
Amity Institute of Applied Sciences
15
Amity Institute of Applied Sciences
Thank You
16
Amity Institute of Applied Sciences
B [ x1, f(x1 ) ]
2
Amity Institute of Applied Sciences
Method of false position
3
Amity Institute of Applied Sciences
Method of false position
4
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
Thank you
9
Amity Institute of Applied Sciences
f(x)
f(xi )
x i1 = x i -
f(xi)
x f x
i, i
f ' (x i )
f(xi-1)
xi+2 xi+1 xi X
AB
f(x)
tan(
AC
f (x i )
f(xi) B
f ' ( xi )
x i x i 1
Example: Using Newton Raphson Method, find the real root of x log 10 x 1.2 0
correct to 5 decimal places.
Solution: Let f ( x ) x log x 1.2
10
x
Newton ' s iterationformula gives
f (x i ) 0.43429x i 1.2
x i 1 x i / , i 0,1, 2, 3 .......
f (x i ) log10 x i 0.43429 4
Amity Institute of Applied Sciences
Example : Use Newton’s Method to find the cube root of 24 upto four decimal places.
Solution: Let x k N or x k N 0
taking f ( x ) x k N , we have f / ( x ) k x k 1
f (x i ) x ik N
Then Newton ' s formula gives x i 1 x i / xi
f (x i ) k x ik 1
1 N
x i 1 [ ( k 1) x i k 1 ]
k xi
1 24
Taking N 24, k 3, we have x i 1 [ 2 x i 2 ], i 0,1, 2, 3....
3 xi
Since an approximat e value of ( 24)1 3 ( 27)1 3 , we take x 0 3
1 24 1 24
Then x1 [ 2 x 0 2 ] [6 ] 2.88889
3 x0 3 9
Similarly x 2 2.88451, x 3 2.8845, sin ce x 2 x 3 upto 4 decimal places
We take (24)1 3 2.8845
6
Amity Institute of Applied Sciences
Advantages and Drawbacks of Newton Raphson Method
Advantages
• Converges fast (quadratic convergence), if it converges.
• Requires only one guess
Drawbacks – Division by Zero
Division by zero
For the equation f x x 3 0.03x 2 2.4 106 0 the Newton-Raphson method
reduces to x 3i 0.03x i2 2.4 106
x i 1 x i
3x i2 0.06x i
For x0 0 or x0 0.02 , the denominator will equal to zero.
Amity Institute of Applied Sciences
Thank you
Amity Institute of Applied Sciences
x k 1 l1 y m1 z
y k 2 l2 x m 2 z ...( 2)
z k 3 l3 x m 3 y
2
Amity Institute of Applied Sciences
Note: Condition for using the iterative methods is that the coefficients in the leading
diagonal are large compared to the other. If are not so, then on interchanging the
equation we can make the leading diagonal dominant diagonal.
6
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
Thank you
9
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
6
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
Thank you
9
Amity Institute of Applied Sciences
Finite Differences:
Forward differences
The differences y1 y 0 , y 2 y1 , ..... y n y n 1 when denoted by y 0 , y1 , .....y n 1
respectively are called the first forward differences, where is the forward difference
operator. Thus the forward differences are y r y r 1 y r
Similarly the sec ond forward differences are define by 2 y r y r 1 y r
p 1 p 1
In general y r y r 1 y r defines the pth forward differences.
p
2
Amity Institute of Applied Sciences
Backward differences
The differences y1 y 0 , y 2 y1 , ..... y n y n 1 when denoted by y1 , y 2 , .....y n
respectively are called the first backward differences, where is the backward difference
operator. Thus the backward differences are y r y r y r 1
Similarly the sec ond backward differences are define by 2 y r y r y r 1
In general p y r p 1 y r p 1 y r 1 defines the pth backward differences.
4
Amity Institute of Applied Sciences
Central differences
The differences y1 y 0 , y 2 y1 , ..... y n y n 1 when denoted by y1/ 2 , y 3 / 2 , .....y n 1/ 2
respectively are called the first central differences, where is the central difference
operator. Thus the central differences are y r 1/ 2 y r y r 1
Similarly the sec ond central differences are define by 2 y1 y 3 / 2 y1/ 2
2 y 2 y 5 / 2 y 3 / 2 ..... and third central difference 3 y 3 / 2 2 y 2 2 y1 and so on.
Amity Institute of Applied Sciences
7
Examples Amity Institute of Applied Sciences
1. Evaluate tan 1 x
xhx 1 h
Solution : tan 1 x tan 1 ( x h ) tan 1 x tan 1 tan 2
1 ( x h ) x 1 hx x
5x 12
2. Evaluate 2 2 , int erval of differencing being unity ( i.e. h 1)
x 5x 6
5x 12 5x 12 2 3
Solution : 2 2 2 2 ( by partial fraction)
x 5x 6 ( x 2)(x 3) x 2 x 3
2 3 1 1 1 1
2 3
x 2 x 3 x 3 x 2 x 4 x 3
1 1 1 1
2 3
x3 x 2 x 4 x 3
1 1 1 1 1 1 1 1
2 3
x 4 x 3 x 3 x 2 x 5 x 4 x 4 x 3
solve further by taking LCM 8
Amity Institute of Applied Sciences
Example : Find mis sin g term in the table x : 2 3 4 5 6
y : 45.0 49.2 54.1 .... 67.4
Solution :
x y y 2 y 3 y 4 y
2 45.0 y 0
4 .2
3 49.2 y1 0. 7
4 .9 a 59.7
4 54.1 y 2 a 59.0 240.2 4a
a 54.1 180.5 3a
5 a (let) y 3 121.5 2a
67.4 a
6 67.4 y 4 9
Amity Institute of Applied Sciences
As only four entriesare given , thereforey f ( x ) can be represented by a third deg ree polynomial.
3 y cons tan t or 4 y 0 i.e. (E 1) 4 y 0
By u sin g Binomial exp ension (E 4 4E 3 6E 2 4E 1) y 0
i.e. y 4 4 y 3 6 y 2 4 y1 y 0 0
67.4 4(a ) 6(54.1) 4(49.2) 45.0 0 a 60.05
10
Amity Institute of Applied Sciences
Thank you
11
Amity Institute of Applied Sciences
2
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
4
Amity Institute of Applied Sciences
5
Amity Institute of Applied Sciences
Thank you
6
Amity Institute of Applied Sciences
2
(iii ) 1 E 1
sin ce y x y x y x h y x E 1 y x
y x (1 E 1 ) y x
1 E 1
3
( v) (E1/ 2 E 1/ 2 ) / 2
y x ( y x h / 2 y x h / 2 ) / 2
y x (E1/ 2 y x E 1/ 2 y x ) / 2
y x (E1/ 2 E 1/ 2 ) y x / 2
(E1/ 2 E 1/ 2 ) / 2
4
Amity Institute of Applied Sciences
2
a[( x h ) n x n ] b[( x h ) n 1 x n 1 ] ..... kh
a n h x n 1 b / x n 2 c / x n 3 ..... k / x l / ...(1)
where : b / , c / , .....l / are new cons tan t coefficien ts.
Thus the first difference s of a polynomial of nth deg ree is a polynomial of
deg ree (n 1).
Similarly 2 f ( x ) [ f ( x h ) f ( x )] f ( x h ) f ( x )
anh [( x h ) n 1 x n 1 ] b / [( x h ) n 2 x n 2 ] .... k / h
a n (n 1)h 2 x n 2 b // x n 3 c // x n 4 ..... k // x ...(2) [ by (1) ]
3
the sec ond difference s represent a polynomial of deg ree (n 2).
Continuing the process, for the nth difference s we get a polynomial
of deg ree zero
i.e. n f ( x ) a n (n 1) (n 2)........3.2.1 h n a n!h n
Example : Evaluate 3[ (1 x )(1 2x )(1 3x )]
Solution : 3[ (1 x )(1 2 x )(1 3x )] 3 [1 6x 11x 2 6x 3 ]
3 [1] 63[ x ] 113 [ x 2 ] 63 [ x 3 ]
6 ( 3!) 3 ( x n ) 0 for n 3
36
4
Missing Term technique
Example : Find mis sin g term in the table x : 2 3 4 5 6
y : 45.0 49.2 54.1 .... 67.4
Solution :
x y y 2 y 3 y 4 y
2 45.0 y 0
4.2
3 49.2 y1 0.7
4.9 a 59.7
4 54.1 y 2 a 59.0 240.2 4a
a 54.1 180.5 3a
5 a (let ) y 3 121.5 2a
67.4 a
6 67.4 y 4
5
Since four entry were given in table therefore y 0 4
8
Amity Institute of Applied Sciences
Let the function y f ( x ) takes the value y 0 , y1 , y 2 , ......correspond ing to the values
x 0 , x 0 h, x 0 2h, ...... of x. Suppose it is required to evaluate f ( x ) for x x 0 ph,
where p is any real number .
Since E p f ( x ) f ( x ph ) y p f ( x 0 ph ) E p f ( x 0 ) (1 ) p y 0 { E 1 }
p (p 1) 2 p (p 1)( p 2) 3
y p 1 p .............. y 0 [ u sin g Binomial theorem ]
2! 3!
p (p 1) 2 p (p 1)( p 2) 3
i.e. y p y 0 py 0 y0 y 0 ..............
2! 3!
It is called Newton ' s forward int erpolation formula .
2
Example: The table gives the distance in nautical miles of the visible horizon for the give heights in
feet above the earth’s surface :
x=heights : 100 150 200 250 300 350 400
y=distance : 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find the values of y when x= 160 ft.
Solution :
x 160
Since x 160, lies near starting of the table , therefore u sin g forward int erpolation formula
p (p 1) 2 p (p 1)( p 2) 3
y p y 0 py 0 y0 y 0 ..............
2! 3!
where x x 0 ph ,
x x 0 160 150
Now taking x 0 150, h 50 , p 0.2
h 50
3
x y y 2 y 3 y 4 y 5 y 6 y
100 10.63
2.40
150( x 0 ) 13.03( y 0 ) 0.39
2.01(y 0 ) 0.15
200 15.04 0.24(2 y 0 ) 0.07
1.77 0.08(3 y 0 ) 0.02
250 16.81 0.16 0.05( 4 y 0 ) 0.02( 6 y n )
1.61 0.03 0.04( 5 y n 5 y 0 )
300 18.42 0.13 0.01( 4 y n )
1.48 0.02( 3 y n )
350 19.90 0.11( 2 y n )
1.37(y n )
400 ( x n ) 21.27( y n )
4
From the above table
p (p 1) 2 p (p 1)( p 2) 3
y p y 0 py 0 y0 y 0 ..............
2! 3!
0.2(0.2 1) 0.2(0.2 1)(0.2 2)
13.03 0.2(2.01) (0.24) (0.08)
2! 3!
0.2(0.2 1)(0.2 2)(0.2 3) 0.2(0.2 1)(0.2 2)(0.2 3)(0.2 4)
(0.05) (0.04)
4! 5!
13.46 nautical miles
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Amity Institute of Applied Sciences
Let the function y f ( x ) takes the value y 0 , y1 , y 2 , ......correspond ing to the values
x 0 , x 0 h, x 0 2h, ...... of x. Suppose it is required to evaluate f ( x ) for x x n ph,
where p is any real number .
Since E p f ( x ) f ( x ph ) y p f ( x n ph ) E p f ( x n ) (1 ) p y n { E 1 1 }
p (p 1) 2 p (p 1)( p 2) 3
y p 1 p .............. y n [ u sin g Binomial theorem ]
2! 3!
p (p 1) 2 p (p 1)( p 2) 3
i.e. y p y n py n yn y n ..............
2! 3!
It is called Newton ' s backward int erpolation formula .
2
Example: The table gives the distance in nautical miles of the visible horizon for the give heights in
feet above the earth’s surface :
x=heights : 100 150 200 250 300 350 400
y=distance : 10.63 13.03 15.04 16.81 18.42 19.90 21.27
Find the values of y when x= 410 ft.
Solution :
3
x y y 2 y 3 y 4 y 5 y 6 y
100 10.63
2.40
150( x 0 ) 13.03( y 0 ) 0.39
2.01(y 0 ) 0.15
200 15.04 0.24(2 y 0 ) 0.07
1.77 0.08(3 y 0 ) 0.02
250 16.81 0.16 0.05( 4 y 0 ) 0.02( 6 y n )
1.61 0.03 0.04( 5 y n 5 y 0 )
300 18.42 0.13 0.01( 4 y n )
1.48 0.02( 3 y n )
350 19.90 0.11( 2 y n )
1.37(y n )
400 ( x n ) 21.27( y n )
4
x 410
Since x 410, lies in end of the table , therefore u sin g backward int erpolation formula
p (p 1) 2 p (p 1)( p 2) 3 p (p 1)( p 2)( p 3) 4
y p y n py n yn yn y n ..............
2! 3! 4!
where x x n ph ,
x x n 410 400
Now taking x n 410, h 50 , p 0.2
h 50
From the above table
0.2(0.2 1) 0.2(0.2 1)(0.2 2)
y p 21.27 (0.2)1.37 (0.11) (0.02) ...
2! 3!
21.53 nautical miles
5
Amity Institute of Applied Sciences
2
Gauss forward interpolation formula
3
Example : Find f(22) and from the Gauss forward formula
x y y 2 y 3 y 4 y 5 y
20 354( y 1 )
22(y 1 )
25 332( y 0 ) 19(2 y 1 )
41(y 0 ) 29(3 y 1 )
30 291 ( y1 ) 10 (2 y 0 ) 37(4 y 1 )
31 8 45
35 260 ( y 2 ) 2 8
29 0
40 231 2
27
45 204
4
Taking x 0 25, h 5, we have to find the value of f ( x ) for x 22
x x0 22 25
i.e. , for p 0.6
h 5
Gauss forward int erpolation formula
p (p 1) 2 (p 1)p(p 1) 3 (p 1)p(p 1)( p 2) 4
y p y 0 py 0 y 1 y 1 y 2 .......
2! 3! 4!
0.6(0.6 1) (0.6 1)( 0.6)( 0.6 1)
332 (0.6)( 41) (19) (29)
2! 3!
y p 332 28.2 9.12 1.856 352.936
5
Amity Institute of Applied Sciences
2
Gauss backward interpolation formula
3
Example : Find f(31) from the Gauss backward formula
x y y 2 y 3 y 4 y 5 y
20 354( y 2 )
22(y 2 )
25 332( y 1 ) 19(2 y 2 )
41( y 1 ) 29(3 y 2 )
30 291 ( y 0 ) 10 (2 y 1 ) 37( 4 y 2 )
31 (y 0 ) 8 (3 y 1 ) 45 (5 y 2 )
35 260 ( y1 ) 2( 2 y 0 ) 8 ( 4 y 1 )
29 ( y1 ) 0 (3 y 0 )
40 231 ( y 2 ) 2 (2 y1 )
27 ( y 2 )
45 204 ( y 3 )
4
Gauss Backward int erpolation formula
(p 1)p 2 (p 1)p(p 1) 3 (p 2)( p 1)p(p 1) 4
y p y 0 py 1 y 1 y 2 y 2 .......
2! 3! 4!
where x x 0 ph
x x 0 31 30
Taking x 0 30, x 31, h 5, p 0.2
h 5
(0.2 1)0.2 (0.2 1)0.2(0.2 1)
y p 291 (0.2)( 41) (10) (29)
2 6
(0.2 2)(0.2 1)0.2(0.2 1)
(37) .
24
y 293(approx.)
5
6
7
Amity Institute of Applied Sciences
2
Example : Given the values x : 5 7 11 13 17
f ( x ) : 150 392 1494 2366 5202
evaluate f (9), u sin g Lagrange formula .
Solution : The Lagrange formula is given by
( x x1 )( x x 2 )( x x 3 )( x x 4 ) ( x x 0 )( x x 2 )( x x 3 )( x x 4 )
f (x) y0 y1
( x 0 x1 )( x 0 x 2 )( x 0 x 3 )( x 0 x 4 ) ( x1 x 0 )( x1 x 2 )( x1 x 3 )( x1 x 4 )
( x x 0 )( x x1 )( x x 3 )( x x 4 ) ( x x 0 )( x x1 )( x x 2 )( x x 4 )
y2 y3
( x 2 x 0 )( x 2 x1 )( x 2 x 3 )( x 2 x 4 ) ( x 3 x 0 )( x 3 x1 )( x 3 x 2 )( x 3 x 4 )
( x x 0 )( x x1 )( x x 2 )( x x 3 )
y4
( x 4 x 0 )( x 4 x1 )( x 4 x 2 )( x 4 x 3 )
Taking x 0 5, x1 7, x 2 11, x 3 13, x 4 17, y 0 150, y1 392, y 2 1492,
y 3 2366, y 4 5202 and putting x 9, in above formula , we get f (9) 810
3
4
5
6
7
8
9
Amity Institute of Applied Sciences
2
Newton Divided difference formula
Text:
• Rajaraman V, “Computer Oriented Numerical Methods”, Pearson Education
• Gerald & Wheatley, “Applied Numerical Analyses”, Addison Wesley.
• Jain, Iyengar and Jain, “Numerical Methods for Scientific and Engineering
Computations”, New Age Int.
• Grewal B S, “Numerical methods in Engineering and Science”, Khanna
Publishers, Delhi.
• G. Hadley, Linear Programming, Narosa Publishing House, New Delhi, 2002
• N. P. Bali, Engineering Mathematics, University Science Press, New Delhi,
2015
2
Amity Institute of Applied Sciences
References:
• T Veerarajan, T Ramachandran, “Theory and Problems in Numerical Methods,
TMH
• Pradip Niyogi, “Numerical Analysis and Algorithms”, TMH.
• Francis Scheld, ” Numerical Analysis”, TMH.
• Sastry S. S, “Introductory Methods of Numerical Analysis”, Pearson
Education.
• Gupta C.B., Vijay Gupta, “Introduction to Statistical Methods”, Vikas
Publishing.
• Goyal, M, “Computer Based Numerical and Statistical Techniques”, Firewall
Media, New Delhi.
• Kantiswarup and Gupta, “Operation Research”, S. Chand, New Delhi. 3
Amity Institute of Applied Sciences
Learning Outcomes:
4
Amity Institute of Applied Sciences
Numerical Differentiation:
It is the method of computing the derivatives of an explicitly
unknown function, with given discrete set of data points ( xi , yi ) : i 1, 2, ...., n.
For differentiating numerically, we first determine an
interpolating polynomial and then compute the approximate
derivative at the given point.
5
Amity Institute of Applied Sciences
6
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
Thanks
8
Amity Institute of Applied Sciences
u (u 1) 2 u (u 1)(u 2) 3
y y0 uy0 y0 y0 (1)
2! 3!
where
( x a)
u (2)
h
We now that
dy dy du 1 2u 1 2 3u 2 6u 2 3
. y0 y 0
y 0 (5)
dx du dx h 2 6
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
dy
Ex: Find dx
at x=0.1 from the following table.
9
Amity Institute of Applied Sciences
x y y 2 y 3 y
0.1 .9975 -.0075 -.0049 .0001
0.2 .9900 -.0124 -.0048
0.3 .9776 -.0172
0.4 .9604
11
Amity Institute of Applied Sciences
12
Amity Institute of Applied Sciences
dy dy du 1 2u 1 2 3u 2 6u 2 3
. y0 y 0
y 0
dx du dx h 2 6
13
Amity Institute of Applied Sciences
14
Amity Institute of Applied Sciences
x y y 2 y 3 y 4 y 5 y
1.0 0.0 .1280 .298 .018 .06 -.01
1.2 0.1280 .4260 .316 .078 -.04
1.4 0.5540 .7420 .394 .038
1.6 1.2960 1.1360 .432
1.8 2.4320 1.5680
2.0 4.000
( x a ) 1.1 1.0 1
At x=1.1, u
h 0.2 2
15
Amity Institute of Applied Sciences
2u 1 2 3u 2 6u 2 3 2u 3 9u 2 11u 3 4
y 0 y 0
y 0
y 0
dy 1 2 6 12
dx h 5u 4 40u 3 105u 2 100u 24 5
y0
120
dy
066724
dx x 1.1
d2y
8.13125
dx 2 x 1.1
16
Amity Institute of Applied Sciences
u (u 1) 2 u (u 1)(u 2) 3
y yn uyn yn yn (1)
2! 3!
where
( x xn )
u (2)
h
We now that
dy dy du 1 2u 1 2 3u 2 6u 2 3
. yn y n
y n (5)
dx du dx h 2 6
Ex: The distance covered by an athlete for the 50m race is given
by the following table:
Time 0 1 2 3 4 5 6
(sec)
Distance 0 2.5 8.5 15.5 24.5 36.5 50
(metre)
x y y 2 y 3 y 4 y 5 y 5 y
0 0 2.5 3.5 -2.5 3.5 -3.5 1
1 2.5 6 1 1 0 -2.5
2 8.5 7 2 1 -2.5
3 15.5 9 3 -1.5
4 24.5 12 1.5
5 36.5 13.5
6 50
Speed is given as
dy 1 1 1 1 1
yn 2 yn 3 yn 4 y n 5 yn
dx x 5 h 2 3 4 5
1 1 1 1 1
12 .3 .1 .0 .( 3.5)
1 2 3 4 5
13.13 m / s
f ' ( x) is given by
f ' ( x) f ( x0 , x1 ) [2 x ( x0 x1 )] f ( x0 , x1 , x2 ) [3x 2 2 xx0 x1 x2
( x0 x1 x1 x2 x2 x0 )] f ( x0 , x1 , x2 , x3 ) (2)
2
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
Ex: Find dy
at x=3.5 andd2y at x=4 by considering the following
dx dx 2
values:
f(0)=2, f(1)=3, f(2)=12, f(5)=147.
4
Amity Institute of Applied Sciences
f ' ( x) 3x 2 2 x 1
f ' ' ( x) 6 x 2
f ' (3.5) 42.75, f ' ' (4) 26
6
Amity Institute of Applied Sciences
dy
Ex: Compute at x=1.5 for the following data using Lagranges
dx
Interpolation formula.
x 0 1 3
y 1 3 55
1 2
3
x 4x 3 2
3 2
x 3x
55 2
6
x x
7
Amity Institute of Applied Sciences
f ' ( x) 2 x 4 2 x 3 2 x 1
1 3 55
3 2 6
f ' (1.5) 18
8
Amity Institute of Applied Sciences
f / ( x ) x 0 , x1 (2 x x 0 x1 ) x 0 , x1 , x 2 [3x 2 2 x ( x 0 x1 x 2 )
( x 0 x1 x1x 2 x 2 x 0 )] x 0 , x1 , x 2 , x 3 [4 x 3 3x 2 ( x 0 x1 x 2 x 3 )
2 x ( x 0 x1 x1x 2 x 2 x 3 x 0 x 3 x 3 x1 x 0 x 2 )
( x 0 x1x 2 x1x 2 x 3 x 0 x 2 x 3 x 0 x1x 3 )]x 0 , x1 , x 2 , x 3 , x 4 ......
f / (9) 121 (2 9 5 7)( 24) [3 9 2 9(5 7 11) (5 7 7 11 5 11)](1)
f / (9) 121 144 [27 414 167] 45
10
11
Amity Institute of Applied Sciences
x y 1st divi . diff . 2nd divi . diff . 3rd divi . diff .
5 150
𝑏−𝑎
• Let the interval (a,b) be divided into n equal sub intervals, each of width h =
𝑛
𝑥0 +𝑛ℎ
so that 𝑥0 = a, 𝑥1 = 𝑥0 + h, 𝑥2 = 𝑥0 +2h,.., 𝑥𝑛 = 𝑥0 + nh = b ∴ I = 𝑥0
𝑓 𝑥 𝑑𝑥
𝑟2 1 𝑟3 𝑟2 1 𝑟4
I = h 𝑟𝑦0 + ∆𝑦0 + − ∆2 𝑦0 + − 𝑟 3 + 𝑟 2 ∆3 𝑦0 + ⋯
2 2 3 2 6 4
𝑛 𝑛(2𝑛−3) 2 𝑛(𝑛−2)2 3
I = nh 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0 + ⋯ ..(1)
2 12 24
Amity Institute of Applied Science
Amity Institute of Applied Science
Amity Institute of Applied Science
Newton cote’s Quadrature Amity Institute of Applied Science
It is assumed that the value of a function f defined on [a,b] is known at
equally spaced points 𝑥𝑖 for I = 0,1,2,…,n, where 𝑥0 = a and 𝑥𝑛 = b.
n Polynomial Formula
1 Linear Trapezoidal
It helps to
• Find the area.
• Locate the centroid.
• Find the arc length of a graph.
• Find the surface area of a solid.
• Find the volume of a solid figure.
• Solve for the work done.
• Solve the moment of inertia.
Numerical integration Amity Institute of Applied Science
THANK
YOU
Amity Institute of Applied Science
Trapezoidal Rule
The Trapezoidal rule to estimate areas
underneath a curve
Trapezoidal Rule Amity Institute of Applied Science
Putting n = 1 in above equation and taking the curve y = f (x) between the points
(𝑥0 , 𝑦0 ) and (𝑥1 , 𝑦1 ) as a straight line i.e., as polynomial of degree one so that
difference of order high than one vanish, we get
𝑥0 +ℎ 1 1
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 1.h 𝑦0 + ∆𝑦0 =h 𝑦0 + (𝑦1 −𝑦0 )
2 2
h
= 𝑦0 + 𝑦1
2
Similarly for next interval (𝑥0 + h, 𝑥0 + 2h), we get
Trapezoidal Rule Amity Institute of Applied Science
𝑥0 +2ℎ h
I= 𝑥0 +ℎ
𝑓 𝑥 𝑑𝑥 = 𝑦1 + 𝑦2
2
𝑥0 +3ℎ h
I= 𝑥0 +2ℎ
𝑓 𝑥 𝑑𝑥 = 𝑦2 + 𝑦3
2
…………. ………….
…………. ………….
𝑥0 +𝑛ℎ h
I = 𝑥 +(𝑛−1)ℎ 𝑓 𝑥 𝑑𝑥 = 𝑦𝑛−1 + 𝑦𝑛
0 2
Now adding above integrals
𝑥0 +𝑛ℎ h
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 𝑦0 + 2(𝑦1 + 𝑦2 + 𝑦3 + ⋯ + 𝑦𝑛−1 ) + 𝑦𝑛
2
Notation Amity Institute of Applied Science
5 2
Evaluate y = 1
1+𝑥 𝑑𝑥
𝑏−𝑎 5−1
Solution: h = = = 1
𝑛 4
2
Here f(x) = 1+𝑥
1
Trapezoidal Rule = [ {f(1)+f(5)}+2{f(2)+f(3)+f(4)}]
2
1 1
= [ (2)+(26) +2{5+10+17}] = [ 92] = 46
2 2
Example Amity Institute of Applied Science
5.2
Find the integral of y = 4
logx 𝑑𝑥 by Trapezoidal Rule.
Solution. Divide the interval (4, 5.2) into six parts.
𝑏−𝑎 5.2−4 1.2
h= = = = 0.2
𝑛 6 6
5.2 ℎ
y= 4
logx 𝑑𝑥 = 𝑦0 +2(𝑦1 + 𝑦2 +𝑦3 +𝑦4 + 𝑦5 )+ 𝑦6
2
0.2
= [1.38629 + 2(1.43508+1.48160+1.52605+1.56861+1.60943)+1.64865]
2
= 0.1[18.27648] = 1.827648
Practice Questions Amity Institute of Applied Science
11
1. Find 1
𝑓(𝑥)𝑑𝑥 , where f(x) is given by the following
table, using trapezoidal rule.
1.5 𝑥
2. Compute y = 0
𝑒 𝑑𝑥 by Trapezoidal Rule.
𝜋
3. Find the approximate value of integral 0
2 𝑠𝑖𝑛𝑥 𝑑𝑥.
1
4. Evaluate 0
(4𝑥− 3𝑥 2 )𝑑𝑥 by taking 10 subintervals
using Trapezoidal Rule.
Amity Institute of Applied Science
Amity Institute of Applied Science
Amity Institute of Applied Science
Amity Institute of Applied Science
THANK
YOU
Amity Institute of Applied Science
𝑥0 +2ℎ 2 2(4−3) 2
𝑥0
𝑓 𝑥 𝑑𝑥 = 2h 𝑦0 + ∆𝑦0 + ∆ 𝑦0
2 12
2ℎ 1
= 6𝑦0 + 6(𝑦1 − 𝑦0 ) + (𝑦2 − 2𝑦1 + 𝑦0 )
6 6
ℎ
= (𝑦0 +4𝑦1 + 𝑦2 )
3
𝑥0 +4ℎ ℎ
Similarly 𝑥 +2ℎ 𝑓 𝑥 𝑑𝑥 = (𝑦2 +4𝑦3 + 𝑦4 )
0 3
𝑥0 +𝑛ℎ
ℎ
𝑓 𝑥 𝑑𝑥 = (𝑦𝑛−2 +4𝑦𝑛−1 + 𝑦𝑛 )
𝑥0 +(𝑛−2)ℎ 3
Adding the above integrals we get
𝑥0 +𝑛ℎ
Simpson's One Third Rule Amity Institute of Applied Science
ℎ
𝑓 𝑥 𝑑𝑥 = (𝑦0 +𝑦𝑛 ) + 4(𝑦1 +𝑦3 + ⋯ 𝑦𝑛−1 ) + 2(𝑦2 + 𝑦4 + ⋯ 𝑦𝑛−2 )
𝑥0 3
𝑥0 +𝑛ℎ
𝑥0
𝑓 𝑥 𝑑𝑥 =
ℎ
(𝑦0 +𝑦𝑛 ) + 4(𝑠𝑢𝑚 𝑜𝑓 𝑜𝑑𝑑 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠) + 2(𝑠𝑢𝑚 𝑜𝑓 𝑒𝑣𝑒𝑛 𝑜𝑟𝑑𝑖𝑛𝑎𝑡𝑒𝑠)
3
Notation Amity Institute of Applied Science
Where…
𝑥0 = initial value of x,
𝑦0 = initial value of y
𝑥𝑛 = final value of x,
𝑦𝑛 = final value of y,
h = interval distance,
h = 𝑏−𝑎 /𝑛
n = no. of intervals.
Simpson's one-third (1/3) rule Amity Institute of Applied Science
v 0 3.60 10.08 18.90 21.60 18.54 10.26 5.40 4.50 5.40 9.00
Ex.
Sol. Contd.. Amity Institute of Applied Science
Practice Questions Amity Institute of Applied Science
6 𝑑𝑥
2. Using Simpson’s one third rule, find 0 (1−𝑥)2
.
THANK
YOU
Amity Institute of Applied Science
Putting n = 3 in above equation and taking the curve y = f (x) between the points
(𝑥0 , 𝑦0 ), (𝑥1 , 𝑦1 ), (𝑥2 , 𝑦2 ) and (𝑥3 , 𝑦3 ). Since, the polynomial is of degree three, fourth
difference onward terms vanish, and we get
𝑥0 +3ℎ 3 3 2 1 3
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 3h 𝑦0 + ∆𝑦0 + ∆ 𝑦0 + ∆ 𝑦0
2 4 8
𝑥0 +3ℎ
Simson 3/8 rule
3 3 1
Amity Institute of Applied Science
I= 𝑥0
𝑓 𝑥 𝑑𝑥 = 3h 𝑦0 + ∆𝑦0 + ∆2 𝑦0 + ∆3 𝑦0
2 4 8
3 3 1
= 3h 𝑦0 + (𝑦1 −𝑦0 ) + (𝑦2 −2𝑦1 + 𝑦0 ) + (𝑦3 − 𝑦2 +3𝑦1 − 𝑦0 )
2 4 8
3h
= 𝑦0 + 3𝑦1 + 3𝑦2 + 𝑦3
8
𝑥0 +6ℎ 3h
Similarly 𝑥0 +3ℎ
𝑓 𝑥 𝑑𝑥= 𝑦3 + 3𝑦4 + 3𝑦5 + 𝑦6 and so on.
8
Simson 3/8 rule Amity Institute of Applied Science
𝑥0 +𝑛ℎ
3h
𝑓 𝑥 𝑑𝑥= 𝑦𝑛−3 + 3𝑦𝑛−2 + 3𝑦𝑛−1 + 𝑦𝑛
𝑥0 +(𝑛−3)ℎ 8
𝑥0 +𝑛ℎ
3h
𝑓 𝑥 𝑑𝑥 = (𝑦0 +𝑦𝑛 ) + 3(𝑦1 + 𝑦2 + 𝑦4 + 𝑦5 + ⋯ + ⋯ + 𝑦𝑛−2 + 𝑦𝑛−1
𝑥0 8
+ 2(𝑦3 + 𝑦6 + ⋯ + 𝑦𝑛−3 )
THANK
YOU
Amity Institute of Applied Sciences
Lecture 1: Introduction
1
Numerical Solution of Ordinary Differential Equations
5
Euler’s Method
6
Euler’s Method
7
Euler’s Method
8
Thank You
9
Amity Institute of Applied Sciences
Sol:
2
Example 1
3
Example 1
4
Example 1
5
Example 1
6
Example 1
7
Example 1
8
Example 2
Q2:
Find the approximate value of y(1)
Sol:
9
Example 2
10
Example 2
11
Example 2
12
Thank You
13
Amity Institute of Applied Sciences
Sol:
2
Example 1
3
Example 1
4
Example 1
5
Example 1
6
Runga Kutta Method
• We are using Runga kutta Method formula as:
7
Example 2
Example : Apply Runge Kutta method to find an approximat e value of y when x 0.2
given that dy dx x y with y(0) 1.
Solution : Here x 0 0, y 0 1, h 0.2, f ( x, y) x y
Calculate successive ly k1 h f ( x 0 , y 0 ) 0.2f (0,1) 0.2(0 1) 0.2000
h k1
k 2 h f ( x 0 , y 0 ) 0.2f (0.1,1.1) 0.2400
2 2
h k
k 3 h f ( x 0 , y 0 2 ) 0.2f (0.1,1.12) 0.2440
2 2
k 4 h f ( x 0 h, y 0 k 3 ) 0.2f (0.2,1.244) 0.2888
1 1
k (k1 2 k 2 2 k 3 k 4 ) (0.2 2 0.24 2 0.244 0.2888) 0.2468
6 6
Hence y( x 0 h ) y 0 k y(0.2) 1.2468
8
Example 3
Q3: Using Runge kutta method of 4th order, solve dy/dx = y2 – x2 / y2 +x2 with y(0) = 1 at x= 0.2, 0.4
To find y(0.2) :
Here , x0 = 0, y0 = 1 , h=0.2
K = 1/6 ( k1 + 2k2 + 2k3+ k4) = 1/6([ 0.2 + 2(0.19672) +2 (0.1967) + 0.1891] = 0.19599
K = 1/6 ( k1 + 2k2 + 2k3+ k4) = 1/6([ 0.1891 + 2(0.1795) +2 (0.1793) + 0.1688] = 0.1792
11
Amity Institute of Applied Sciences
Course Objectives:
2
Amity Institute of Applied Sciences
Learning Outcomes:
3
Amity Institute of Applied Sciences
Definition of Probability
Probability that the event E will happen is given by
p=P(E)= favorable number of cases = m/n
exhaustive number of cases
where ‘n’ is exhaustive, mutually exclusive and equally likely cases and ‘m’ of them
are favorable cases to the happening of event E.
Probability that the event E will not happen is given by
q=P(1-E)= unfavorable number of cases = (n-m)/n
exhaustive number of cases
where ‘n’ is exhaustive, mutually exclusive and equally likely cases and ‘m’ of them
are unfavorable cases to the happening of event E. Also p+q=1.
6
Amity Institute of Applied Sciences
Q1. A bag contains 7 white, 6 red and 5 black balls. Two balls are drawn
at random. Find the probability that they will both be white.
Sol. Total number of balls=7+6+5=18
Out of 18 balls, two balls are drawn at random in ways.
Therefore exhaustive number of cases= =153.
Out of 7 white balls, two balls are drawn at random in ways.
Therefore favorable number of cases= =21.
Thus, probability of getting two white balls=21/153= 7/51 Ans.
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
Conditional Probability
• Statement: Let A and b be two events associated with the same sample space
of a random experiment. Then the probability of happening of an event A
when it is given that event B has already happened is called conditional
probability denoted by P(A/B).
• We define
9
Amity Institute of Applied Sciences
Q3. Data on the readership of a certain magazine show that the proportion of male
readers under 35 is 0.40 and over 35 is 0.20. If the proportion of readers under 35 is
0.70, find the proportion of subscribers that are ‘females over 35 years’. Also
calculate the probability that a randomly selected male subscriber is under 35 years
of age.
Sol. Consider the events- A: reader of magazine is a male
B: reader of magazine is over 35 years of age
(i) The proportion of subscribers that are female over 35 years is:
11
Amity Institute of Applied Sciences
Q3. Contd… (ii) The probability that a randomly selected male subscriber is under 35
years is:
Q4. If the probability that a communication system will have high fidelity is 0.81 and
the probability that it will have high fidelity and selectivity is 0.18. What is the
probability that a system with high fidelity will also have selectivity?
Sol. Consider A: event that represent a communication system will have high fidelity
: event that represent high fidelity and selectivity
Thus, the probability that a system with high fidelity will also have selectivity is given by
12
Amity Institute of Applied Sciences
Baye’s Theorem
• Statement: Let S be the sample space and let E1, E2, …, En be ‘n’
mutually exclusive events associated with a random experiment . If A be
the common event which occurs with E1, E2, …, En , then
• P(Ei/A)= P(Ei)P(A/Ei)
[P(E1)P(A/E1)+ P(E2)P(A/E2)+…..+ P(En)P(A/En)]
where i=1,2,…,n
13
Amity Institute of Applied Sciences
Q5. Bag A contains 2 white, 1 black and 3 red balls, bag B contains 3 white, 2 black
and 4 red balls and bag C contains 4 white, 3 black and 2 red balls. One bag is
selected at random and 2 balls are drawn at random. If the selected balls happen to
be red and black, what is the probability that both balls come from bag B?
Sol. Consider the events-E1: bag A is selected; E2= bag B is selected; E3= bag C is
selected. Let event A: two balls drawn at random are red and black.
Then P(E1)=P(E1)=P(E1)=1/3.
P(A/E1)=
• Q5 Contd…
Then
• P(E2/A)= P(E2)P(A/E2)
[P(E1)P(A/E1)+ P(E2)P(A/E2)+P(E3)P(A/E3)]
= 20
53
15
Source: Applied Mathematics IV by Dr Hari Arora
16
Amity Institute of Applied Sciences
Binomial Distribution
Amity Institute of Applied Sciences
Example
Solution
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
Example
Solution
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
Example
Solution
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
MEAN OF A BINOMIAL DISTRIBUTION
Example
If the mean and variance of a binomial distribution are 4 and 2, respectively. Then, find
the probability of at least 7 successes.
Solution
Example
Solution
𝑆𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
Random Variables
A random variable is a rule that assigns a numerical value to each possible outcome of a
probabilistic experiment.
Ex- Consider the probability density function shown in the graph below. Suppose we
wanted to know the probability that the random variable X was less than or equal to a.
The probability that X is less than or equal to a is equal to the area under the curve
bounded by a and minus infinity - as indicated by the shaded area.
Amity Institute of Applied Sciences
Expected value
Discrete case:
E( X ) x p(x )
all x
i i
Continuous case:
E( X ) x p(x )dx
all x
i i
Amity Institute of Applied Sciences
x i n
i 1 1
X xi ( )
n i 1 n
The probability (frequency) of each person in the sample is 1/n.
We also call E[X] the expected value or mean of X. Since the expected value is
determined by the probability distribution of X only, we also speak of the expectation or
mean of the distribution.
Amity Institute of Applied Sciences
Example
Let X be the discrete random variable that takes the values 1, 2, 4, 8, and 16, each with
probability 1/5. Compute the expectation of X.
Solution
E[ X ] ai P( X ai ) ai p( ai )
i i
Amity Institute of Applied Sciences
Var ( X ) E[ X 2 ] E[ X ]2
E[ X 2 ] is called the second moment of X.
x f ( x )dx 2E[ X ] xf ( x )dx ( E[ X ]) f ( x )dx E[ X 2 ] 2( E[ X ]) 2 ( E [ X ]) 2
2 2
( E[ X 2 ]) ( E[ X ]) 2
Amity Institute of Applied Sciences
Example
Let X takes the values 2, 3, and 4 with probabilities 0.1, 0.7, and 0.2. Find the Variance and mean.
Solution
Var ( X ) E[( X E[ X ]) 2 ]
Var ( X ) E[ X 2 ] E[ X ]2
Amity Institute of Applied Sciences
E[ X ] ai P( X ai ) ai p( ai )
i i
Example
Let X be uniform U(a, b). Then f(x)= 1/(b-a) for x in [a, b] and zero outside this interval.
Find the mean and variance.
Solution
E[ X ] xf ( x )dx
1 b2 a 2 b a
b b
1 1 2 1
E ( X ) xf ( x )dx x dx x
a
ba 2 b a a 2 b a 2
(b a ) 2
Var ( X ) E ( X ) E ( X )
2 2
12
Amity Institute of Applied Sciences
Example
Consider the rolling of a fair six-sided die, with X the number on the
uppermost face. Find the mean and variance.
Solution
We know that the probability function of 𝑋 is
1
𝑃 𝑥 = , 𝑥 = 1,2,3,4,5,6
6
1 1 1 1 1 1
𝑀𝑒𝑎𝑛 = 1 × + 2 × + 3 × + 4 × + 5 × + 6 × = 3.5
6 6 6 6 6 6
Amity Institute of Applied Sciences
Amity Institute of Applied Sciences
Normal Distribution
2
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
4
Amity Institute of Applied Sciences
5
Amity Institute of Applied Sciences
6
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
9
Amity Institute of Applied Sciences
10
Amity Institute of Applied Sciences
11
Amity Institute of Applied Sciences
12
Amity Institute of Applied Sciences
Poisson Distribution
2
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
4
5
Amity Institute of Applied Sciences
6
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
9
Amity Institute of Applied Sciences
10
Amity Institute of Applied Sciences
1
Amity Institute of Applied Sciences
2
To FIT UP A PARABOLA
…(i)
According to the principle of least squares,
is minimum … (ii)
Amity Institute of Applied Sciences
Example :
Fit a parabola y = a x2 + b x + c to the following data taking x as independent variable.
6
Amity Institute of Applied Sciences
7
Change of Origin and Scale
Sometimes the given data is so large that the calculation becomes
very tedious.
If the values are equally spaced, then the size of data can be
reduced by assuming some origin for x and y.
Example :
Fit a straight line to the following data:
x: 71 68 73 69 67 65 66 67
y: 69 72 70 70 68 67 68 64
Thank you
14
Amity Institute of Applied Sciences
1
Amity Institute of Applied Sciences
The process of finding the equation of the “curve of best fit” which
may be most suitable for predicting the unknown values is known
as curve fitting.
2
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
Some of the errors e1, e2 , e3, …en will be positive and others
negative.
In finding the total errors, the errors are added.
In addition, some negative and some positive errors may cancel
and, in some cases, sum of all the errors may be zero.
Make all the errors positive by squaring
Sum = e12+ e22+…+ en2
The curve of the best fit is that for which this sum is minimum.
This is called the principle of least square
METHOD OF LEAST SQUARES
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
Example:
Find a relation of the form y = a bx for the following data by the method of
least squares:
x 2 3 4 5 6
y 8.3 15.4 33.1 65.2 127.4
9
Solution: The curve to be fitted is y = a bx
11
Amity Institute of Applied Sciences
12
Amity Institute of Applied Sciences
Example:
Answer: y = 1 + 1.9 x
13
Thankyou
14
Amity Institute of Applied Sciences
Module 4:Dispersion
Lecture 2:Mean deviation and its coefficient, Standard deviation
1
Amity Institute of Applied Sciences
Mean deviation
• In statistics and mathematics, the deviation is a measure which is used to
find the difference between the observed value and the expected value of
a variable.
• In simple words, the deviation is the distance from the centre point.
• Similarly, the mean deviation is used to calculate how far the values fall
from the middle of the data set.
3
Amity Institute of Applied Sciences
M.D
Example 1:
Determine the mean deviation for the data values 5, 3,7, 8, 4, 9.
Solution:
First, find the mean for the given data:
Mean, µ = ( 5+3+7+8+4+9)/6
µ = 36/6
µ =6
Therefore, the mean value is 6.
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
Example 2:
In a foreign language class, there are 4 languages and the frequencies of
students learning the language and the frequency of lectures per week is
given as:
(Calculate the mean deviation about the mean for the given data.)
Language Sanskrit Spanish French English
No. of
6 5 9 12
students(xi)
Frequency
of 5 7 4 9
lectures(fi) 9
Amity Institute of Applied Sciences
So the M.D.=70.64/25
10
Amity Institute of Applied Sciences
Mean deviation about median for grouped data: we need to find out the
median of the given set of data with the help of cumulative frequency, which
is given as-
Ex: Find the mean deviation about median for the given data.
Cumulative
Class Frequency Mid-Point |xi − M| fi|xi − M|
Frequency
32 390.32
13
Amity Institute of Applied Sciences
Since N/2 = 16. Therefore the class 25−35 is the median class.
Using the formula of median ⇒25 + ((16 − 14)/7) × 10 = 27.42
The mean deviation about median = 390.32/32 = 12.19
14
Amity Institute of Applied Sciences
15
Amity Institute of Applied Sciences
Standard deviation:
• It is a measure of the amount of variation or dispersion of a set of
values.
• A low standard deviation indicates that the values tend to be close to
the mean of the set, while a high standard deviation indicates that the
values are spread out over a wider range.
• Standard deviation may be abbreviated SD, and is most commonly
represented by the Greek letter sigma σ, for the population standard
deviation, or the Latin letter s, for the sample standard deviation.
• The standard deviation is the square root of variance.
16
Amity Institute of Applied Sciences
18
Amity Institute of Applied Sciences
19
Amity Institute of Applied Sciences
Ex: The number of televisions sold in each day of a week are 13,
8, 4, 9, 7, 12, 10.
Find its standard deviation.
Solution
20
Amity Institute of Applied Sciences
Mean method
Another convenient way of finding standard deviation is to use the
following formula.
Standard deviation (by mean method) σ =
If di = xi – are the deviations, then
21
Amity Institute of Applied Sciences
Ex: The amount of rainfall in a particular season for 6 days are given as
17.8 cm, 19.2 cm, 16.3 cm, 12.5 cm, 12.8 cm and 11.4 cm. Find its
standard deviation.
Solution Arranging the numbers in ascending order we
get, 11.4, 12.5, 12.8, 16.3, 17.8, 19.2.
Number of observations n = 6
22
Amity Institute of Applied Sciences
23
Amity Institute of Applied Sciences
24
Amity Institute of Applied Sciences
25
Amity Institute of Applied Sciences
Ex: 48 students were asked to write the total number of hours per
week they spent on watching television. With this information find the
standard deviation of hours spent for watching television.
Solution:
26
Amity Institute of Applied Sciences
27
Amity Institute of Applied Sciences
28
Amity Institute of Applied Sciences
29
Amity Institute of Applied Sciences
Ex: Marks of the students in a particular subject of a class are given below.
Find its standard deviation.
30
Amity Institute of Applied Sciences
31
Amity Institute of Applied Sciences
Standard deviation=
33
Amity Institute of Applied Sciences
34
Amity Institute of Applied Sciences
35
Amity Institute of Applied Sciences
36
Amity Institute of Applied Sciences
Ex: 220 students were asked the number of hours per week they spent
watching television. With this information, calculate the mean and
standard deviation of hours spent watching television by the 220 students.
Number of students
Hours
10 to 14 2
15 to 19 12
20 to 24 23
25 to 29 60
30 to 34 77
35 to 39 38
40 to 44 8
37
Amity Institute of Applied Sciences
38
Amity Institute of Applied Sciences
standard deviation.
39
Amity Institute of Applied Sciences
Thankyou
40
Amity Institute of Applied Sciences
Module 4: Dispersion
Moments
• Moment word is very popular in mechanical sciences.
• In science moment is a measure of energy which generates the
frequency.
• In Statistics, moments are the arithmetic means of first, second,
third and so on, i.e. rth power of the deviation taken from either
mean or an arbitrary point of a distribution.
3
Amity Institute of Applied Sciences
4
Amity Institute of Applied Sciences
5
Amity Institute of Applied Sciences
6
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
9
Amity Institute of Applied Sciences
10
Amity Institute of Applied Sciences
11
Relation between moment about origin and moment about mean
12
Amity Institute of Applied Sciences
13
Amity Institute of Applied Sciences
Marks x f d=(x- fd
20)/5
5 4 -3 -12 36 -108 324
10 10 -2 -20 40 -80 160
15 20 -1 -20 20 -20 20
20 36 0 0 0 0 0
25 16 1 16 16 16 16
30 12 2 24 48 96 192
35 2 3 6 18 54 162
⅀fd=-6
14
Amity Institute of Applied Sciences
15
Amity Institute of Applied Sciences
Practice questions
1. The first four moments of a distribution about the value 5 of a variable
are 1, 10, 20 and 25. Find the central moments. Ans: 1,10,20,25
2. For the following distribution, find central moments
Class 1.5-2.5 2.5-3.5 3.5-4.5 4.5-5.5 5.5-6.5
Frequency 1 3 7 3 1
Ans:
16
Thanks
17
Amity Institute of Applied Sciences
Module 4: Dispersion
Course Objectives:
By the end of the semester, the students will be able to deal with
the techniques of numerical analysis and optimization, which
gives the solution to applied problem when ordinary analytical
method fails.
2
Amity Institute of Applied Sciences
Learning Outcomes:
Dispersion
• In statistics, dispersion (also called variability, scatter, or spread)
is the extent to which a distribution is stretched or squeezed.
•Standard deviation
•Interquartile range (IQR)
•Range
•Mean absolute difference (also known as Gini mean absolute
difference)
•Median absolute deviation (MAD)
•Average absolute deviation (or simply called average deviation)
•Distance standard deviation
5
Amity Institute of Applied Sciences
6
Amity Institute of Applied Sciences
Quartiles:
Definition: Quartiles are values that divide your data into quarters.
However, quartiles aren’t shaped like pizza slices; Instead they divide
your data into four segments according to where the numbers fall on
the number line.
The four quarters that divide a data set into quartiles are:
• The lowest 25% of numbers.
• The next lowest 25% of numbers (up to the median).
• The second highest 25% of numbers (above the median).
• The highest 25% of numbers.
7
Amity Institute of Applied Sciences
8
Amity Institute of Applied Sciences
9
Amity Institute of Applied Sciences
10
Amity Institute of Applied Sciences
11
Amity Institute of Applied Sciences
Quartile Deviation :
• The difference between the upper quartile Q3
and the lower quartile Q1 is called the inter quartile range.
12
Amity Institute of Applied Sciences
Quartile for ungrouped data: Arrange the data in ascending order, then
Qi=(i⋅(n+1)/4)th value of the observation, where i=1,2,3
15
First Quartile Q1
The first quartile Q1 can be computed as follows:
Second Quartile Q2
The second quartile Q2 can be computed as follows:
18
Amity Institute of Applied Sciences
19
Amity Institute of Applied Sciences
where,
•l is the lower limit of the ith quartile class
•N=∑f total number of observations
•f frequency of the ith quartile class
•F< cumulative frequency of the class previous to ith quartile class
•h is the class width
20
Amity Institute of Applied Sciences
Ex: A class teacher has the following data about the number of
absences of 35 students of a class. Compute five number
summary for the following frequency distribution.
No.of days (x) 2 3 4 5 6
No. of Students
1 15 10 5 4
(f)
Solution
21
Amity Institute of Applied Sciences
Quartiles
The formula for ith quartile is
Qi=(i(N)/4)th value, i=1,2,3
where N is the total number of observations.
First Quartile Q1 can be calculated using quartile
formula for grouped data as below
22
Amity Institute of Applied Sciences
23
Amity Institute of Applied Sciences
Ex: The following table gives the amount of time (in minutes) spent on the
internet each evening by a group of 56 students. Compute five number
summary for the following frequency distribution. Find the Quartile
deviation also.
Time spent on
10-12 13-15 16-18 19-21 22-24
Internet (x)
No. of students
3 12 15 24 2
(f)
Solution
Let X denote the amount of time (in minutes) spent on the internet.
Here the classes are inclusive. To make them exclusive type subtract
0.5 from the lower limit and add 0.5 to the upper limit of each class. 24
Amity Institute of Applied Sciences
26
Amity Institute of Applied Sciences
Thus
•l=12.5, the lower limit of the 1st quartile class
•N=56, total number of observations
•f=12, frequency of the 1st quartile class
•F<=3, cumulative frequency of the class previous to 1st quartile
class
•h=3, the class width
27
Amity Institute of Applied Sciences
30
Amity Institute of Applied Sciences
32
Amity Institute of Applied Sciences
Module 4: Dispersion
Skewness
It is the degree of distortion from the symmetrical bell curve or the normal
distribution. It measures the lack of symmetry in data distribution. It
differentiates extreme values in one versus the other tail. A symmetrical
distribution will have a skewness of 0.
There are two types of Skewness: Positive and Negative
Positive Skewness means when the tail on the right side of the distribution
is longer or fatter. The mean and median will be greater than the mode.
Negative Skewness is when the tail of the left side of the distribution is
longer or fatter than the tail on the right side. The mean and median will be
less than the mode.
2
Amity Institute of Applied Sciences
3
Amity Institute of Applied Sciences
Kurtosis
Kurtosis is all about the tails of the distribution — not the peakedness or flatness.
It is used to describe the extreme values in one versus the other tail.
Mesokurtic: This distribution has kurtosis statistic similar to that of the normal distribution.
It means that the extreme values of the distribution are similar to that of a normal distribution
characteristic. This definition is used so that the standard normal distribution has a kurtosis of
three.
Leptokurtic (Kurtosis > 3): Distribution is longer, tails are fatter. Peak is higher and sharper
than Mesokurtic, which means that data are heavy-tailed or profusion of outliers.
Platykurtic: (Kurtosis < 3): Distribution is shorter, tails are thinner than the normal
distribution. The peak is lower and broader than Mesokurtic, which means that data are light-
tailed or lack of outliers.
4
Amity Institute of Applied Sciences
5
Amity Institute of Applied Sciences
7
Amity Institute of Applied Sciences
=2.7499
8
Amity Institute of Applied Sciences
Thankyou