Statistical-Methods
Statistical-Methods
UNIT-I
Algebraic and Transcendental Equations
Learning Material
Course Objectives:
Syllabus:
Solution of Algebraic and Transcendental Equations- Introduction –
Bisection Method – Method of False Position Method – Newton-Raphson
Method.
Learning Outcomes:
x2
1 2 2 4
2 4
2 8 10
1.666
6 6
f 1.666 1.666 1.666 4
3
1.042
Now, the root lies between 1.666 and 2
1.666 2 2 1.042
x3 1.780
2 1.042
f 1.780 1.780 1.780 4
3
0.1402
Now, the root lies between 1.780 and 2
1.780 2 2 0.1402
x4 1.794
2 0.1402
f 1.794 1.794 1.794 4
3
0.0201
Now, the root lies between 1.794 and 2
1.794 2 2 0.0201
x5 1.796
2 0.0201
f 1.796 1.796 1.796 4 0.0027
3
The Newton- Raphson method is a powerful and elegant method to find the root
of an equation. This method is generally used to improve the results obtained
by the previous methods.
Let x0 be an approximate root of f x 0 and let x1 x0 h be the correct root
which implies that f x1 0 .
By Taylor’s theorem neglecting second and higher order terms
f x1 f x0 h 0
f x0 hf 1 x0 0
f x0
h
f 1 x0
Substituting this in x1 we get
x1 x0 h
f x0
x0
f 1 x0
x1 is a better approximation than x0
Successive approximations are given by
f xn
xn 1 xn
f 1 xn
Problem:- 1.Find by Newton’s method, the real root of the equation xe x 2 0
Correct to three decimal places.
Sol. Let f x xe x 2 1
Then f 0 2 and f 1 e 2 0.7183
So root of f x lies between 0 and 1
It is near to 1. so we take x0 1 and f 1 x xe x e x and f 1 1 e e 5.4366
By Newton’s Rule
f x0
First approximation x1 x0
f 1 x0
0.7183
1 0.8679
5.4366
f x1 0.0672 f 1 x1 4.4491
f x1
The second approximation x2 x1
f 1 x1
0.0672
0.8679
4.4491
0.8528
Required root is 0.853 correct to 3 decimal places.
Convergence of the Iteration Methods
We now study the rate at which the iteration methods converge to the exact
root, if the initial approximation is sufficiently close to the desired root.
UNIT-II
INTERPOLATION
Objectives:
Develop an understanding of the use of numerical methods in modern
scientific computing.
To gain the knowledge of Interpolation.
Syllabus:
Interpolation- Introduction – Finite differences- Forward Differences –
Backward differences –Central differences – Symbolic relations – Newton
formulae for interpolation – Lagrange’s interpolation.
Learning Outcomes:
Introduction:-
Consider the eqation y =f(x) , x0 x xn we understand that we can
find the value of y, corresponding to every value of x in the range x0 x xn. If
the function f(x) is single valued and continuous and is known explicitly, then
the values of f(x) for certain values of x like x0, x1,……., xn can be calculated.
The problem now is if we are given the set of tabular values
∆
4. Backward Differences:-
Let be the values of a function corresponding to the
values of x respectively. Then,
are called the first backward differences
In general
The symbol is called the backward difference operator, like the
operator , this operator is also a linear operator
Comparing expression (1) above with the expression (1) of section we
immediately note that
The first backward differences of the first background differences are
called second differences and are denoted by i.e.,..
……….
In general similarly, the nth backward
differences are defined by the formula
If is a constant function , then y = c is a constant, for all
x, and we get the symbol is referred to as the nth backward
difference operator
6. Central Differences:-
With as the values of a function corresponding to
the values , we define the first central differences
as follows
The symbol is called the central differences operator. This operator is a linear
operator. Comparing expressions (1) above with expressions earlier used on
forward and backward differences we get
In general
The first central differences of the first central differences are called the
second central differences and are denoted by
Thus
Higher order central differences are similarly defined. In general the nth
central differences are given by
for odd
for even
while employing for formula (4) for , we use the notation
If y is a constant function, that is if a constant, then
7. Central Difference Table
Symbolic Relations :
E-operator:- The shift operator E is defined by the equation . This
shows that the effect of E is to shift the functional value to the next higher
value . A second operation with E gives
Generalizing
Averaging operator:- The averaging operator is defined by the equation
Relationship Between
We have
i) ii) iii)
iv) v)
•Differential operator:
From the given data we can conclude that the given function is . To
find , we have to assume that y is a polynomial function, which is not so.
Thus we are not getting .
2. Evaluate
This polynomial passes through all the points ( for i = 0 to n. Therefore, we can
obtain the by substituting the corresponding as
This implies
From (1) and (2), we get
and impose the condition that y and should agree at the tabulated points
We obtain
Where
This uses tabular values of the left of . Thus this formula is useful
formula is useful for interpolation near the end of the tabular values
Q:-1. Find the melting point of the alloy containing 54% of lead, using
appropriate interpolation formula
Percentage of
50 60 70 80
lead(p)
Temperature
205 225 248 274
x Y
50 205
20
60 225 3
23 0
70 248 3
26
80 274
Let temperature =
1 14 15 5 6 19
Sol. Given
Here then
NUMERICAL AND STATISTICAL METHODS
UNIT - III
NUMERICAL SOLUTION OF FIRST ORDER ORDINARY DIFFERENTIAL
EQUATIONS
Objectives:
• To the numerical solutions of a first ordered Ordinary Differential Equation
together with initial condition.
Syllabus:
Taylor’s Series Method - Euler Method - Modified Euler Method - Runge – Kutta
Fourth order Method.
Subject Outcomes:
At the end of the unit, Students will be able to
• Solve Ordinary Differential equations using Numerical methods.
Euler’s method
x2 xn n
y ( x) y (0) x. y(0) y(0) ...... y (0) ........ (4)
2! n!
Note: We know that the Taylor’s expansion of y(x) about the point x0 in a
power of (x – x0)is.
( x x0 ) I ( x x0 ) 2 II ( x x0 )3 III
y(x) = y(x0) + y (x0) + y (x0) + y (x0) + … (1)
1! 2! 3!
Or
( x x0 ) I ( x x0 ) 2 II ( x x0 )3 III
y(x) = y0 + y0 + y0 + y0 + …..
1! 2! 3!
If we let x – x0 = h. (i.e. x = x0 + h = x1) we can write the Taylor’s series as
h I h 2 II h3 III h 4 IV
y(x) = y(x1) = y0 + y0 + y0 + y0 + y0 + ….
1! 2! 3! 4!
h I h 2 II h3 III h IV IV
i.e. y1 = y0 + y0 + y0 + y0 + y0 + ….. (2)
1! 2! 3! 4!
Similarly expanding y(x) in a Taylor’s series about x = x1. We will get.
h I h 2 II h3 III h 4 IV
y2 = y1 + y1 + y1 + y1 + y1 + ……. (3)
1! 2! 3! 4!
Similarly expanding y(x) in a Taylor’s series about x = x2 We will get.
h I h 2 II h3 III h 4 IV
y3 = y2 + y2 + y2 + y2 + y2 + …... (4)
1! 2! 3! 4!
In general, Taylor’s expansion of y(x) at a point x= xn is
h I h 2 II h3 III h 4 IV
yn+1 = yn + yn + yn + yn + yn + ….. (5)
1! 2! 3! 4!
x2 x3 x4 x5
y ( x) y(0) xy(0) y(0) y(0) y(0) y(0) ....
2! 3! 4! 5!
Substituting the values of y (0), y(0), y(0), y(0),..........
9 2 21 3 45 4 93 5
y ( x) 0 3x x x x x ........
2 6 24 120
9 2 7 3 15 4 31 5
y ( x) 3x x x x x ........ equ1
2 2 8 40
Now put x 0.1 in equ1
9 7 15 31
y (0.1) 3(0.1) (0.1) 2 (0.1) 3 (0.1) 4 (0.1) 5 0.34869
2 2 8 40
Now put x 0.2 in equ1
9 7 15 31
y (0.2) 3(0.2) (0.2) 2 (0.2) 3 (0.2) 4 (0.2) 5 0.811244
2 2 8 40
9 7 15 31
y (0.3) 3(0.3) (0.3) 2 (0.3)3 (0.3) 4 (0.3) 5 1.41657075
2 2 8 40
Analytical Solution:
dy
The exact solution of the equation 2 y 3e x with y (0) 0 can be found
dx
as follows
dy
2 y 3e x Which is a linear in y.
dx
Here P 2, Q 3e x
pdx 2 dx
I.F = e24
e e
EULER’S METHOD
It is the simplest one-step method and it is less accurate. Hence it has a
limited application.
dy
Consider the differential equation = f(x,y) (1)
dx
With y(x0) = y0 (2)
Consider the first two terms of the Taylor’s expansion of y(x) at x = x0
y(x) = y(x0) + (x – x0) y1(x0) (3)
from equation (1) y1(x0) = f(x0,y(x0)) = f(x0,y0)
Substituting in equation (3)
y(x) = y(x0) + (x – x0) f(x0,y0)
At x = x1, y(x1) = y(x0) + (x1 – x0) f(x0,y0)
y1 = y0 + h f(x0,y0) where h = x1 – x0
Similarly at x = x2 , y2 = y1 + h f(x1,y1),
Proceeding as above, yn+1 = yn + h f(xn,yn)
This is known as Euler’s Method
dy
Example 1. Using Euler’s method solve for x = 2 from = 3x2 + 1,y(1) =
dx
2,taking step size (I) h = 0.5 and (II) h=0.25
Sol: Here f(x,y) = 3x2 + 1, x0 = 1,y0 = 2
Euler’s algorithm is yn+1 = yn + h f(xn,yn), n = 0,1,2,3,….. (1)
h = 0.5 x1 = x0 + h = 1+0.5 = 1.5
Taking n = 0 in (1) , we have x2 = x1 + h = 1.5 + 0.5 = 2
y1 = y0 + h f(x0,y0)
i.e. y1 = y(0.5) = 2 + (0.5) f(1,2) = 2 + (0.5) (3 + 1) = 2 + (0.5)(4)
Here x1 = x0 + h = 1 + 0.5 = 1.5
y(1.5) = 4 = y1
Taking n = 1 in (1),we have
y2 = y1 + h f(x1,y1)
i.e. y(x2) = y2 = 4 + (0.5) f(1.5,4) = 4 + (0.5)[3(1.5)2 + 1] = 7.875
Here x2 = x4 + h = 1.5 + 0.5 = 2
y(2) = 7.875
h = 0.25 x1 = 1.25, x2 = 1.50, x3 = 1.75, x4 = 2
Taking n = 0 in (1), we have
y1 = y0 + h f(x0,y0)
i.e. y(x1) = y1 = 2 + (0.25) f(1,2) = 2 + (0.25) (3 + 1) = 3
y(x2) = y2 = y1 + h f(x1,y1)
i.e. y(x2) = y2 = 3 + (0.25) f(1.25,3)
= 3 + (0.25)[3(1.25)2 + 1]
= 4.42188
Here x2 = x1 + h = 1.25 + 0.25 = 1.5
y(1.5) = 5.42188
Taking n = 2 in (1), we have
i.e. y(x3) = y3 = h f(x2,y2)
= 5.42188 + (0.25) f(1.5,2)
= 5.42188 + (0.25) [3(1.5)2 + 1]
= 6.35938
Here x3 = x2 + h = 1.5 + 0.25 = 1.75
y(1.75) =7. 35938
Taking n = 4 in (1),we have
y(x4) = y4 = y3 + h f(x3,y3)
i.e. y(x4) = y4 = 7.35938 + (0.25) f(1.75,2)
= 7.35938 + (0.25)[3(1.75)2 + 1]
= 8.90626
Note that the difference in values of y(2) in both cases
(i.e. when h = 0.5 and when h = 0.25).The accuracy is improved
significantly when h is reduced to 0.25 (Exact solution of the equation is y = x3
+ x and with this y(2) = y2 = 10.
1
y1 y0 h / 2 f x0 , y0 f x1 , y1
0
2
y1 y0 h / 2 f x0 , y0 f x1 , y1
1
------------------------
y1
k 1
y0 h / 2 f x0 , y0 f x1 , y1
k
If two successive values of y1 k , y1 k 1 are sufficiently close to one another, we will
Here f x, y x y, x0 0, and y0 1
yk 1 y0 h / 2 f x0 y0 f x1 , y1
i
i 1
2
when i = 1 in eqn (2)
i
y1 y0 h / 2 f x0 , y0 f x1 , y1
0
(0)
First apply Euler’s method to calculate y 1
= y1
y1 0 y0 h f x0 , y0
= 1+(0.1)f(0.1)
= 1+(0.1)
= 1.10
now x0 0, y0 1, x1 0.1, y1 0 1.10
y11 y0 0.1/ 2 f x0 , y0 f x1 , y10
= 1+0.1/2[f(0,1) + f(0.1,1.10)
= 1+0.1/2[(0+1)+(0.1+1.10)]
= 1.11
When i=2 in equation (2)
2
y1 y0 h / 2 f x0 , y0 f x1 , y1
1
= 1+0.1/2[f(0.1)+f(0.1,1.11)]
= 1 + 0.1/2[(0+1)+(0.1+1.11)]
= 1.1105
3
y1 y0 h / 2 f x0 , y0 f x1 , y1
2
= 1+0.1/2[f(0,1)+f(0.1 , 1.1105)]
= 1+0.1/2[(0+1)+(0.1+1.1105)]
= 1.1105
Since y1 2 y13
y1 = 1.1105
= 1.1105 +0.1/2[0.1+1.1105+0.2+1.2316]
= 1.2426
2
y2 y1 h / 2 f x1 , y1 f x2 y2
1
= 1.1105 + 0.1/2[f(0.1 , 1.1105) , f(0.2 . 1.2426)]
= 1.1105 + 0.1/2[1.2105 + 1.4426]
= 1.1105 + 0.1(1.3266)
= 1.2432
3
y2 y1 h / 2 f x1 , y1 f x2 y2
2
= 1.1105+0.1/2[f(0.1,1.1105)+f(0.2 , 1.2432)]
= 1.1105+0.1/2[1.2105+1.4432)]
= 1.1105 + 0.1(1.3268)
= 1.2432
Since y23 y23
Hence y2 = 1.2432
Step:3
To find y3 = y(x3) = y y(0.3)
Taking k =2 in equation (1) we get
y3 y2 h / 2 f x2 , y2 f x3 , y3
1
i 1
4
For i = 1 ,
1
y3 y2 h / 2 f x2 , y2 f x3 , y3
0
y3
0
is to be evaluated from Euler’s method .
y3 y2 h f x2 , y2
0
UNIT IV
Syllabus :
(a) Axioms of probability (Non-negativity, Totality, and Additivity)
(b) Conditional and Unconditional probabilities (Definitions and simple problems)
(c) Additive law of probability ( simple applications)
(d) Multiplicative law of probability (simple applications)
(e) Baye’s Theorem (without proof and applications)
(f) Concept of a Random variable (one dimensional case definition only and simple
examples)
(g) Types of random variables (Discrete and Continuous cases)
(h) Probability mass function and probability density function – their properties (without
proofs)
(i) Distribution Function and its properties (without proofs)
(j) Evaluation of mean and variance (problems)
Learning Outcomes:
Students will be able to
(a) understand the usage of axioms of probability
(b) apply various laws of probability (like additive, multiplicative, and Baye’s) in real-life
problems
(c) distinguish between discrete random variable (DRV) and continuous random variable
(CRV)
(d) understand the complexity in finding the mean and the variance of DRV and CRV.
Learning Material
Random experiment: If an experiment or trial can be repeated any number of times under
similar conditions and it is possible to enumerate the total number of outcomes, but an
individual outcome is not predictable, such an experiment is called a random experiment. For
instance, if a fair coin is tossed three times, it is possible to enumerate all the possible eight
sequences of head (H) and tail (T). But it is not possible to predict which sequence will occur at
any occasion.
Outcome: A result of an experiment is termed as an outcome. Head (H) and tail (T) are the
outcomes when a fair coin is flipped.
Sample Space: Each conceivable outcome of a random experiment under consideration is said
to be a sample point. The totality of all conceivable sample points is called a sample space. In
other words, the list of all possible outcomes of an experiment is called a sample space. For
example, the set HH , HT , TH , TT constitutes a sample space when two fair coins tossed at a
time.
(i) Discrete Sample Space: A sample space which consists of countably finite or infinite
elements or sample points is called discrete sample space. It is abbreviated as DSS.
(ii) Continuous Sample Space: A sample space which consists of continuum of values is called
continuous sample space. It is abbreviated as CSS.
Event: Any subset of the sample space is an event. In other words, the set of sample points
which satisfy certain requirement(s) is called an event. For example, in the event, there are
exactly two heads in three tossing’s of a coin, it would consist of three points (H, H, T), (H, T,
H), and (T, H, H). Each point is called an event. i.e. an outcome which further cannot be divided
is called an event. Events are classified as:
Elementary Event: An event or a set consists only one element or sample point is called an
elementary event. It is also termed as simple event.
Complementary Event: Let A be the event of S. The non-occurrence of A and contains those
points of the sample space which do not belong to A.
Exhaustive Events: All possible events in any trial are known as exhaustive events. In tossing a
coin, there are two exhaustive elementary events namely, head and tail.
Equally Likely Events: Events are said to be equally when there is no reason to expect anyone
of them rather than anyone of the others in a single trial of the random experiment. In other
words, all the sample units or outcomes of sample space are having equal preference to each
other, then the events are said to be equally likely events. In a tossing a coin, the outcomes head
(H) and tail (T) are equally likely events.
Mutually Exclusive Events: Events A and B are said to be mutually exclusive events if the
occurrence of A precludes the occurrence of B and vice-versa. In other words, if there is no
sample point in A which is common to the sample point in B, i.e. A∩B = ϕ, the events A and B
are said to be mutually exclusive. For example, if we flip a fair coin, we find either H or T in a
trial, but not both. i.e. happening of H that prevents the happening of T in a trial, then H and T
are mutually exclusive events. (No two events can happen simultaneously in a trial, such events
are mutually exclusive.)
Independent events: Two events A and B are said to be independent if the occurrence of A has
no bearing on the occurrence of B i.e. the knowledge that the event A has occurred gives no
information about the occurrence of the event B.
Formally, two events A and B are independent if and only if,
P( A B) P( A) P( B) .
For example, a bag contains balls of two different colours say, red and white. The two balls are
drawn successively. First a ball is drawn from one bag and replaced after noting its color. Let us
presume that it is white and is denoted by the event A. Another ball is drawn from the same bag
and its colour is noted. Let this event noted by the event B. The result of the second drawn is not
influenced by the first drawn. Hence the events A and B are said to be independent.
The classical definition of probability breaks down when we do not have a complete priori
analysis i.e. when the outcomes of the trial are not equally or when the total number of trials is
infinite or when the enumeration of all equally likely events is not possible. So the necessity of
the statistical definition of probability arises.
The statistical definition of probability, although is of great use from practical point of
view, is not conductive for mathematical approach since an actual limiting number may not
really exist. Hence another definition is thought of based on axiomatic approach. This definition
leads to the development of calculus of probability.
P(E) = Favourable number of cases / Total cases
For example, police department needs new tires for its patrol cars and the probabilities are 0.17,
0.22, 0.03, 0.29, 0.21, and 0.08 that it will buy Uniroyal tires, Goodyear tires, Michelin tires,
General tires, Goodrich tires or Armstrong tires. Then the probabilities that the combinations of
(Goodyear, Goodrich), (Uniroyal, General, Goodrich), (Michelin, Armstrong), and (Goodyear,
General, Armstrong) tires respectively are 0.43, 0.67, 0.11, and 0.59 respectively.
Note: Axioms of probability do not determine probabilities. But the axioms restrict the
assignments of probabilities in a manner that enables us to interpret probabilities as relative
frequencies without inconsistencies.
Unconditional Probability:
The individual probabilities of the events of A and B are termed as unconditional probabilities.
i.e. unconditional probabilities are the probabilities which are not influenced by other events in
the sample space, S. These are also termed as priori probabilities.
Result : If A is any event in s, then P A 1 P( A)
Result : For any two events A and B then
(i)
P A B P( B) P( A B)
(ii) PA B P( A) P A B
Proof:
A B A A B
P A B PA A B
= P A P A B
= P A PA B P A B P A B
= P A PA B A B P A B
= P A PB P A B
Example: A card is drawn from a well shuffled pack of cards. What is the probability that it is
either a spade or an ace?
Solution: We know that (WKT), a pack of playing cards consists 52 in number. i.e. the sample
space of pack of cards, n(S) = 52.
Let A denoted the event of getting a spade and B denotes the event of getting an ace. Then the
probability of the event of getting either a spade or an ace is
P( A B) P( A) P( B) P( A B)
Since all the cards are equally likely, mutually exclusive, we have
13 4 1
P( A) , P( B) , P( A B)
52 52 52
By addition theorem of probability,
13 4 1 4
P( A B) .
52 52 52 13
Conditional Probability: In many situations arises in our day to day life about the occurrence
of an event A (for instance, getting treatment) is influenced by the occurrence of the event B
(availability of doctor) and the event is known a conditional event, denoted by A | B and hence
the probability of the conditional event is known as ‘conditional probability’ and is denoted by
P( A | B) .
Definition: Let A and B be two events. The conditional probability of event B , if an event A
has occurred, is defined by the relation,
P( A B)
P( B | A) , if P( A) 0 .
P( A)
i.e. the conditional probability of the event B is the ratio of the probability of the joint
occurrence of the events A and B to the unconditional probability of the event A.
P( A B)
Similarly, we can define P( A | B) , if P( B) 0 .
P( B)
Example: In a group consisting of men and women are equal in number. 10% of the men and
45% of the women are unemployed. If a person is selected randomly from the group then find
the probability that the person is an unemployed.
Solution: Since the men and women are equal in number in a group, we take
P ( M ) 1 / 2 and P(W ) 1 / 2
Let E be the event of employed person. Then E be the event of unemployed.
Then we have, P( E | M ) 10% 0.10 , P( E | W ) 40% 0.45
implies, P( E | M ) 0.90 , P( E | W ) 0.55
The probability that the person (either male or female) is an unemployed is
P( E ) P(M ) P( E | M ) P(W ) P( E | W )
1 1
= (0.90) (0.55) 0.725
2 2
Example: Two marbles are drawn in succession from a box containing 10 red, 30 white, 20 blue
and 15 orange marbles with replacement being made after each draw. Find the probability that
(i) both are white (ii) first is red and second is white.
Solution: From the given information, we noticed that
the number of marbles in the box = 75.
i. Let us define E1 be the event of 1st drawn marble is white and E2 be the event of 2nd
drawn marble is also white.
Since we are using with replacement to select marbles in succession, we have
30 30
P ( E1 ) and P ( E 2 )
75 75
Therefore, the probability that both marbles are white is
30 30 4
P( E1 E2 ) P( E1 ) P( E2 | E1 ) = .
75 75 25
ii. Let us define E1 be the event of 1st drawn marble is red and E2 be the event of 2nd
drawn marble is white.
Since we are using with replacement to select marbles in succession, we have
10 2 30 2
P( E1 ) and P ( E 2 )
75 15 75 5
Therefore, the probability that the first draw marble is red and the second draw marble
is white is
2 2 4
P( E1 E2 ) P( E1 ) P( E2 | E1 ) = . .
15 5 75
Multiplicative Law of Probability:
Statement: For any events A and B in the sample space S, we have
P ( A B ) P ( A) P ( B | A) , P ( A) 0
P( B) P( A | B) , P( B) 0
Where P ( B | A) is the conditional probability of B provided A has already happened
and P ( A | B ) is the conditional probability of A provided B has already happened.
Baye’s Theorem:
Statement: Suppose E1 , E2 , ......, En be ‘n’ mutually exclusive events in S with
P( Ei ) 0 ; i 1, 2,....., n. Let A be any arbitrary event which is a subset of S and P( A) 0.
P ( Ei ) P ( A | Ei )
Then, we have P ( Ei | A) n , i 1, 2,......, n .
i 1
P ( Ei ) P ( A | Ei )
Where P( Ei )' s are called ‘a priori probabilities’, P( A | Ei )' s are called ‘likelihoods’ and
P( Ei | A)' s are called ‘posterior probabilities’.
n
Note: P( E ) P( A | E ) = P(A) is called Total probability
i 1
i i
A random variable X is a real function of the events of a given sample space S. Thus for a
given experiment defined by a sample space S with events s, the random variable is a function
of s. It is denoted by X(s). A random variable X can be considered to be a function that maps
all events of the sample space into points on the real axis.
For example, an experiment consists of tossing two coins. Let the random variable be a
function X chosen as the number of heads shown. So X maps the real numbers of the event
“showing no head” as zero, the event “any one is head” as one and “both heads” as two.
Therefore, the random variable is X = 0,1, 2. The elements of the random variable X are
x1 0, x2 1, and x3 2 .
3. Mixed Random Variable: A random variable which is defined on both DSS and CSS
partially, then the random variable is said to be a mixed random variable.
2. The probability density f(x) of a continuous random variable is given by f(x) = C.e-|x|, -
x . S.T C = ½ and find (i) mean (ii) variance of the distribution. Also find
P0 X 4.
Sol: We have f ( x)dx 1
C 1/ 2
1
(i) Mean xf ( x)dx. x.e |x| dx
2
= 0 [integrand is odd]
2 x
2
(ii) f ( x)dx
=2
(iii) P0 X 4=0.49
4
f ( x)dx 0.49
0
UNIT-5
Probability distribution and Correlation & Regression
Objectives:
To know the importance of correlation coefficient & lines of regression.
Syllabus:
Review on Binomial and Poisson Distributions; normal distribution and its
properties (statements only); applications of uniform and exponential
distributions; introduction to Correlation and Linear Regression.
Outcomes:
measure of correlation between variables and obtain lines of regression
Learning Material
There are two types of probability distributions namely (1) Discrete probability
distributions (Binomial and Poisson distributions) and (2) Continuous
probability distributions (Normal distribution).
Binomial distribution: Binomial distribution was discovered by James
Bernoulli in the year 1700 and it is a discrete probability distribution.
Where a trial or an experiment results in only two ways say ‘success’ or
‘failure’.
Some of the situations are: (1) Tossing a coin – head or tail (2) Birth of a baby
– girl or boy (3) Auditing a bill – contains an error or not.
Definition: A random variable X is said to be Binomial distribution if it assumes
only non-negative values and its probability mass function is given by
P( X x) p( x) nCx p x q n x , x 0,1, 2, ....., n
0, otherwise
where q 1 p, p q 1. Here n, p are called parameters.
Example: (1) The number of defective bolts in a box containing ‘n’ bolts.
(2) The number of post-graduates in a group of ‘n’ men.
Conditions:
(1) The trials are repeated under identical conditions for a fixed number of
times, say ‘n’ times.
(2) There are only two possible outcomes, for example success or failure for
each trial.
(3) The probability of success in each trial remains constant and does not
change from trail to trail.
(4) The trails are independent i.e. the probability of an event in any trail is not
affected by the results of any other trail.
var iance E ( X ) [ E ( X )]
2 2
[ x( x 1) x] p ( x) x( x 1) p( x) xp( x)
n(n 1) n
x( x 1) n 2 C x 2 p x q n x np n(n 1) p 2 n 2 C x 2 p x 2 q n x np
x( x 1) x2
x2
e2
( x 1)!
x2
2
2 e .e 2 .
Example: Fit a Poisson distribution for the following data and calculate the
expected frequencies.
X 0 1 2 3 4
f(x) 109 65 22 3 1
Solution: By the given data, total frequency = f i =200
Mean =
f x i(0)(109) (1)(65) (2)( 22) (3)(3) (4)(1)
i
0.61
f i 200
Therefore, the theoretical frequencies = N p(x); x = 0,1,2,3,4.
e 0.61 (0.61) x
i.e. 200. where x = 0,1,2,3,4.
x!
When x = 0, 200 p(0) = 108.67
x = 1, 200 p(1) = 66.29
x= 2, 200 p(2) = 20.22
x= 3, 200 p(3) = 4.11
x= 4, 200 p(4) = 0.63
Characteristics:
(1). The graph of the Normal distribution y = f(x) in the xy-plane is known as
the normal curve.
(2). The curve is a bell shaped curve and symmetrical with respect to mean i.e.,
about the line x =µ and the two tails on the right and the left sides of the mean
(µ) extends to infinity. The top of the bell is directly above the mean µ.
(3). Area under the normal curve represents the total population.
(4). Mean, median and mode of the distribution coincide at x = µ as the
distribution is symmetrical. So normal curve is unimodal (has only one
maximum point).
(5). x-axix is an asymptote to the curve.
(6). Linear combination of independent normal variates is also a normal variate.
(7). The points of inflexion of the curve are at x = µ ± σ and the curve changes
from concave to convex at x = µ + σ to x = µ - σ.
(8). The probability that the normal variate X with mean µ and standard
deviation σ lies between x1 and x2 is given by
1 x
2
x2
1
2 x
2
P( x1 X x 2 ) e dx ……….(1)
1
Since (1) depends on the two parameters µ and σ, we get different normal
curves for different values of µ and σ and it is an impracticable task to plot all
such normal curves. Instead, by putting z=(x-µ)/σ, the R.H.S. of equation (1)
becomes independent of the two parameters µ and σ. Here z is known as the
standard variable.
(9). Area under the normal curve is distributed as follows:
P(µ - σ<X< µ + σ) = 0.6826 ; P(µ - 2σ<X< µ + 2σ) = 0.9543; P(µ - 3σ<X< µ +
3σ) = 0.9973.
Uniform distribution:
The uniform or rectangular distribution has a random variable X restricted to a
finite interval [a,b] and has a constant over the interval.
1
The function f(x) can be defined as f x b a , a x b
0, otherwise
The mean of the uniform distribution is (b+a)/2.
The variance of the uniform distribution is (b-a)2/12.
Problem: The current measured in a piece of copper wire is known to follow a
uniform distribution over the interval [0, 25]. Write down the formula for the
probability density function f(x) of a random variable X representing the
current. Calculate the mean and variance of the distribution.
Solution:
The probability density function f(x) over the interval [0, 25] given by
1
, 0 x 25
f x 25 0 then Mean = 12.5 and Variance = 52.08
0 , otherwise
Exponential Distribution:
The exponential distribution of a continuous random variable X is defined as
e x , 0
f x
0, otherwise
The mean and standard deviation of an exponential distribution is 1/λ.
1 1 x
P( X = x) = f x 5 e , 0
5
0, otherwise
1
1 11 x
i) Consider P(0 < X < 1) = f x dx e
1
5 dx 1 .
0 50 e5
1
10 1 10 5 x
ii) Consider P( -∞ < X< 10) = f x dx
1
e dx 1 2 .
5 e
Correlation: It is a statistical analysis which measures and analysis the degree
or extent to which two variables fluctuates with reference to each other. It
expresses the relationship or independence of two sets of variables upon each
other.
If change in one variable affects the change in other variable then
the two vriable are said to be correlated.
Types of Correlation:
Positive and negative
Single and multiple
Partial and total
Linear and non linear
NUMERICAL AND STATISTICAL METHODS
UNIT VI
Syllabus:
Basic terminology in sampling, sampling techniques (with and without
replacements), sampling distribution and its applications.
Introduction to statistical inference –Test for means and proportions ( one
sample and two samples when the sample size is large) ; Exact sample tests-
Chi-Square test ( Goodness of fit) and F-test ( Test for population variances)
,Introduction to t-test.
Learning Outcomes:
Basic Terms:
Population: In statistics population does not only refers to people but it may
defined as any collection of individuals or objects or units which can be
specified numerically.
Population may be mainly classified into two types.
(i) Finite population (ii) Infinite population
(i) Finite population: The population contains finite number of individuals is
called ‘finite population’. For example, total number of students in a class.
(ii) Infinite population: The population which contains infinite number of
individuals is known as ‘infinite population’. For example, the number of
stars in the sky.
Parameter: The statistical constants of a population are known as parameter.
For example, mean (µ) and variance (σ2).
Sample: A portion of the population which is examined with a view to
determining the population characteristics is called a sample. Or A sample is a
subset of the population and the number of objects in the sample is called the
size of the sample size of the sample is denoted by ‘n’.
Statistic: Any function of sample observations is called sample statistic or
statistic.
Standard error: The standard deviation of the sampling distribution of a
statistic is known as its ‘standard error’.
Classification of samples: Samples are classified in 2 ways.
(i) Large sample: The size of the sample (n) ≥ 30, the sample is said to be large
sample.
(ii) Small sample: If the size of the sample (n) < 30, the sample is said to be
small sample or exact sample.
Types of sampling: There are mainly 5 types of sampling as follows.
(i) Purposive sampling: It is one in which the sample units are selected with
definite purpose in view. For example, if you want to give the picture that
the standard of living has increased in the town of ‘Gudivada’, we may take
individuals in the sample from Satyanarayana puram, Rajendra nagar etc
and ignore the localities where low income group and middle class families
live.
(ii) Random sampling: In this case sample units are selected in one in which
each unit of population has an equal chance of being included in it.
Suppose we take a sample of size ‘n’ from finite population of size ‘N’. Then
there are NCn possible samples. A sampling technique in which each of the
NCn samples has an equal chance of being selected is known as ‘Random
sampling’ and the sample obtained by this is termed as ‘random sample’.
(iii) Stratified Random Sampling: It is defined as the entire heterogeneous
population is sub divided into homogeneous groups. Such groups are called
‘strata’. The size of each strata may differ but they are homogeneous within
themselves. A sample is drawn randomly from these strata’s is known as
‘stratified random sampling’.
(iv) Systematic sampling: In this sampling we select a random number to
draw a sample and the remaining samples are automatically selected by a
predetermined patterns such a sampling is called ‘systematic sampling’.
(v) Simple sampling: Simple sampling is random sampling in which each unit
of the population has an equal chance. For example, if the population
consists of N units then we select a sample n units then each unit having
equal probability 1/N.
Problems:
(1) Find the value of the finite population correction factor for n = 10 and N =
1000.
Given N = the size of the finite population = 1000
n = size of the sample = 10
Therefore, correction factor = (N-n)/(N-1) = 0.991
(2) A population consists of five numbers 2, 3, 6, 8 and 11. Consider all
possible samples of size two which can be drawn with replacement from this
population. Find
(a) The mean of the population (b) standard deviation of the population (c)
mean of the sampling distribution of means (d) standard deviation of
the sampling distribution of means.
Solution: (a) Mean of the population
µ = (2+3+6+8+11)/5 = 6
(b) Variance (σ2) is σ2 = (x i x)2 / n
= (2-6)2+(3-6)2+(6-6)2+(8-6)2+(11-6)2 / 5 =
10.8
µ=
x = (5+10+14+18+13+24)/6 = 14
n
= (5-14)2+(10-14)2+…+(11-6)2 / 6 = 35.67
(c) All possible samples of size 2 i.e. the number os samples = 16C2 = 15
The deviation between the observed sample statistics and the hypothesis
parameter value (or)
The deviation between two independent sample statistics is significant.
𝐻1 :µ<µ0 ------------------(ii)
𝐻1 :µ>µ0 -------------------(iii)
Then the alternative hypothesis in (i) is known as Two-tailed test and the
alternatives in (ii)and (iii) are known as left and right tailed tests respectively.
Type-I error:
One tailed and two tailed tests: If the alternative hypothesis is of the type (<
or >) and the entire critical region lies in the normal probability curve on one
side then it is said to be one tailed tests (OTT)
Again the one tailed test is two types (i) Right one tailed test (ii) Left one tailed
test
critical region lies in the normal probability curve on both sides then it is said
to be two tailed tests (TTT)
Level of 1% 5% 10%
significance
Case (1): When the S.D ( ) of population is known. Then the test statistic is Z =
X µ
~ 𝑁(0,1)
𝑆.𝐸( x )
n=Sample size.
Case (2): When the S.D (𝜎) of population is unknown. The test statistic is
X µ
Z=
𝑆.𝐸( x )
n=Sample size.
Problem:
Step (4): Test statistic: When the S.D ( ) of population is known. Then the test
X µ
statistic is Z= Where S.E ( x ) =𝜎/√𝑛
𝑆.𝐸( x )
=4
H1 : 1 2 / H1 : 1 2 / H1 : 1 2
x1 x 2
Step (4): Test statistic: Z=
𝜎 2 𝜎2
√ 1 + 2
𝑛1 𝑛2
Problem:
The mean of two large samples of sizes 1000 and 2000 members are 67.5
inches and 68.0 inches respectively. Can the samples be regarded as drawn
from same population of s.d 2.5 inches?
𝐻1 : 𝜇1 ≠ 𝜇2
x1 x 2
Step (4): Test statistic: Z= 𝜎 2 𝜎2
=5.16
√ 1 + 2
𝑛1 𝑛2
∴ The samples have not been drawn from same population of S.D 2.5 inches.
N=sample size
Problem:
In a sample of 1000 people in Karnataka 540 are rice eaters and the rest
are wheat eaters. Can we assume that both rice and wheat are equally popular
in this state at 1% LOS?
Given n=1000
Step (1): Null hypothesis:𝐻0 : both rice and wheat are equally popular in the
state.i.,e P=0.5
𝐻1 :p≠ 0.5
H1 : P1 P2 / H1 : P1 P2 / H1 : P1 P2
Step (4): Test statistic: (a) when the population proportion 1 and 2 are
known.
1− 2
The test statistic is Z= ∼ (0,1)
.(1− 2 )
1 1 2 2
Where S.E (1 -2 ) =√ +√ 1 =1-1
1 2
2 =1-2
(i)Method of substitution:
1 1 +2 2
∴ S.E (1 - 2 )= √
1 +2
1 −2
∴ Test statistic is Z= . (1 −2 )
1 −2
∴ Test statistic is Z= 1 1
√( + )
1 2
Problem:
In two large populations, there are 30% and 25% respectively of fair
haired people. Is this difference likely to be hidden in samples of 1200 and 900
respectively from the two populations?
Step (1): Null hypothesis:0 : The two sample proportions are equal 1 =2
1 : 1 ≠ 2
Problem:
(1) Random samples of 400 men and 600 women were asked whether they
would like to have a flyover near their residence. 200 men and 325 women in
favour of the proposal. Test the hypothesis that proportion of men and women
in favour of the proposal at 5% LOS?
𝑝2 = proportion of women=250/600=0.541
𝐻1 : 𝑝1 ≠ 𝑝2
𝑝1 −𝑝2
∴ Test statistic is Z= 1 1
=1.28
√𝑝𝑞(𝑛 +𝑛 )
1 2
Solution:
Null hypothesis, H0: The digits occur equally frequently in the directory.
Alternative hypothesis, H1: The digits do not occur equally frequently under
the null hypothesis, H0 the test statistics is,
2
n
Oi Ei 2 ~ 2 ( n1)
i 1 Ei
Where Oi is the observed frequency, Ei is expected frequency
Ei is caliculated as ∑oi /n
then expected frequency for each observed frequency Ei=10000/10 =1000
Caliculated 2 =58.542 , 2 critical value at 5% LOS with 9 d.f is 16.919.
Since Caliculated 2 > 2 critical value, reject H0
The digits do not occur equally frequently in the directory
Problem :A sample analysis of examination results of 500 students was made.
It was found that 220 students had failed, 170 had secured a third class, 90
were placed in second class and 20 got a first class. Do these figures
commensurate with the general examination result which is in the ratio 4 : 3 :
2 : 1 for the various categories respectively.
Solution: Null hypothesis, H0:The observed results commensurate with the
general examination results
Alternative hypothesis, H1: The observed results do not commensurate with the
general examination results
under the null hypothesis, H0 the test statistics is,
2
n
Oi Ei 2 ~ 2 ( n1)
i 1 Ei
Where E = (no. of share pertaining to Oi/total no. of shares) N
i
Total no. of shares=10, total frequency N=1000
No. of students who failed, O1=220
No. of students who secured third class, O2=170
No. of students who secured second class, O3=90
No. of students who secured first class, O4=20
Then E1= (4/10)500=200, E2= (3/10)500=150, E3= (2/10)500=100, E4=
(1/10)500=50
Such that E1+E2+E3+E4=500
Calculated 2 =23.667, 2 critical value at 5% LOS with 4-1=3 d.f is 7.81
Since Calculated 2 > 2 critical value, reject H0
i.e. The observed results do not commensurate with the general examination
results
Problem: Given the following contingency table for hair colour and eye colour.
Find the value of 2 ? Can we expect good association between hair colour and
eye colour?
Hair colour
Blue 15 5 20 40
Eye
colour Gray 20 10 20 50
Brown 25 15 20 60
Total 60 30 60 150
Null hypothesis, H0:The two attributes hair colour and eye colour are
independent
Alternative hypothesis, H1: hair colour and eye colour are not independent
under the null hypothesis, H0 the test statistics is,
m n O Eij
2
2
i 1
j 1
ij
Eij
~ 2 ( m1)( n1)
F-test is used to
xi
Where s 2
x
1 n1
n1 1 i1
xi x with x n
2
i 1
1
n
y
i
1 n2
yi y
2
And s 2
with y i 1
n2 1 i1
y
n2
Besides t-test, we can also apply a F-test for testing equality of two population
means.
Note: (1) F determines whether the ratio of two sample variances s1 and s2 is
too small or too large.
(2) When F is close to 1, the two sample variances s1 and s2 are likely
same
(3) F-distribution also known as variance ratio distribution
(4) Dividing S12 and S 22 by their corresponding population variances
standardizes the sample variance, and hence on the average both
numerator and denominator approach. Therefore, its customer, to
take the large sample variance as the numerator.
(5) F-distribution depends not only on the two parameters, V1and V2 but
also on the order in which they are slated.
1900 42. 43.7 34.0 39.2 46.1 48.7 49.4 45.9 55.3 - -
7
1970 54. 50.4 44.2 49.7 55.4 57.0 58.2 56.6 61.9 57.5 53.4
2
x
1 n1
i
2
Where s12 xi x with x i 1
n1 1 i1 n1
n
y
i
1 n2
yi y
2
And s 2
with y i 1
n2 1 i1
2
n2
405 598.5
Calculation: x 45, y 5441 (approximate)
9 11
9
x 45 = 5.29+1.69+121+33.64+1.21+13.69+0.9+106.9
2
i
i 1
= 288.51+19.36=302.87
302.87
s12 37.85
8
11
y 54.41 =
2
i 0.04+16+104.04+22.09+1+6.76+14.44+4.84+56.25+9.61+1
i 1
=236.07
236.07
s22 23.607
10
Since s12 s22 , the value of test statistics is:
37.85
F 1.603
23.607
The table value of F at 5% los with (8, 10) degrees of freedom for two tailed test
is 3.85 (From F-tables).
Since F-Calculated value is less than f-tabulated value, we accept H0. i.e. The
sample data confirms the equality of variances in 1900 and 1970 in various
regions of brazil or 12 22 .
Practice.
Problem: The house-hold net expenditure on health care in south and north
India, in two samples of households, expressed as percentage of total income is
shown the following table:
Do the data show that the variances of time distribution of population from
which these samples are drawn do not differ significantly?
Solution:
Null hypothesis, H0: There is no significant difference between the variances of
time distribution of populations. i.e. 12 22 .
Alternative hypothesis, H1: 12 22 (Two-tailed test)
Level of significance : Choose 5% 0.05
Under the null hypothesis, H0, the test statistics is :
s12 s22
F ~ Fv1 ,v2 (OR) F ~ Fv2 ,v1
s22 s12
When s12 s22 OR s22 s12 respectively
Calculation: we are given n1 = 6, n2 = 7
134 241
x 22.3, y 34.4
6 7
6 7
i 1 i 1
81.34 133.72
s12 16.26 and s22 22.29
5 6
The value of test statistics is
22.29
F 1.3699 1.37
16.26
F-critical value at 5% los with (5, 6) degrees of freedom for two tailed test is
4.39 (From F-tables)
Since F-Calculated value is less than F-tabulated value t 5% los, we accept H0.
i.e. there is no significant deference between the variances of the time
distribution by the workers.
Can it be said that the two samples have come from the same normal
population?
Hint: When testing the significance of the difference of the means of two
samples, we assumed that the two samples came from the same population or
from populations with same variances. If the variances of the population are
not equal, a significant difference in the means may arise. Hence, to test the
two samples have come from the same population or not, we need to apply
both t-test and F-test. But here we note that first apply F-test, as usual
manner.
Properties of t- distribution:
(1). To test the significance of the difference between two sample means or to
compare two samples.
(2). To test the significance of an observed sample correlation coefficient and
sample correlation coefficient.
(3). To test the significance of difference between two sample means or to
compare two samples.
Assumptions about t- test: t- test is based on the following five assumptions.
(1). The random sample has been drawn from a population.
(2). All the observations in the sample are independent.
(3). The sample size is not large. (One should note that at least five
observations are desirable for applying a t- test.)
(4). The assumed value 0 of the population mean is the correct value.
(5). The sample values are correctly taken and recorded.
(6).The population standard deviation σ is unknown
In case the above assumptions do not hold good, the reliability of the test
decreases.