0% found this document useful (0 votes)
8 views

Statistical-Methods

The document provides a comprehensive overview of numerical methods for solving algebraic and transcendental equations, focusing on the Bisection method, False Position method, and Newton-Raphson method. It outlines the course objectives, syllabus, and expected learning outcomes, emphasizing the ability to find approximate solutions using numerical techniques. Additionally, it includes detailed explanations and examples of each method, demonstrating their application in finding roots of equations.

Uploaded by

hodiga4101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Statistical-Methods

The document provides a comprehensive overview of numerical methods for solving algebraic and transcendental equations, focusing on the Bisection method, False Position method, and Newton-Raphson method. It outlines the course objectives, syllabus, and expected learning outcomes, emphasizing the ability to find approximate solutions using numerical techniques. Additionally, it includes detailed explanations and examples of each method, demonstrating their application in finding roots of equations.

Uploaded by

hodiga4101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 71

NUMERICAL AND STATISTICAL METHODS

UNIT-I
Algebraic and Transcendental Equations

Learning Material

Course Objectives:

Student should be able to

 Know about the algebraic and Transcendental Equations.


 Understand the Bisection method , method of False Position and Newton
-Raphson Method.

Syllabus:
Solution of Algebraic and Transcendental Equations- Introduction –
Bisection Method – Method of False Position Method – Newton-Raphson
Method.

Learning Outcomes:

Students will be able to

 Find an approximate solution to Algebraic and Transcendental


equations using Numerical Methods (with the aid of calculator)

Algebraic and Transcendental equations

Introduction: A problem of great importance in science and engineering is that


of determining the roots/ zeros of an equation of the form f(x) = 0
 Polynomial function: A function f(x) is said to be a polynomial function
if f(x) is a polynomial in x.
i.e. f(x)  a0 x n  a1 x n 1  ............  a n 1 x  an where a0  0 , the coefficients
a0 , a1...........an are real constants and n is a non-negative integer.
 Algebraic function: A function which is a sum (or) difference (or) product of
two polynomials is called an algebraic function. Otherwise, the function is
called a transcendental (or) non-algebraic function.
Eg: f  x   c1ex  c2e x
x3
f  x   e5 x 
3
2
 Algebraic Equation: If f(x) is an algebraic function, then the equation f(x) =0
is called an algebraic equation.
 Transcendental Equation: An equation which contains polynomials,
exponential functions, logarithmic functions and Trigonometric functions
etc. is called a Transcendental equation.

Ex:- xe2x– 1 = 0, cos x – x ex= 0, tan x = x are transcendental equations.

 Root of an equation: A number α is called a root of an equation f(x) = 0 if


f(α) =0.
we also say that α is a zero of the function.
Note: (1) The roots of an equation are the abscissas of the points where
the graph y = f(x) cuts the x-axis.
(2) A polynomial equation of degree n will have exactly n roots,
Real or complex, simple or multiple. A transcendental equation may have
one root or infinite number of roots depending on the form of f(x).

Methods for solving the equation


•Direct method:
We know the solution of the polynomial equations such as linear equation
ax  b  0 and quadratic equation ax 2  bx  c  0 , will be obtained using direct
methods or analytical methods. Analytical methods for the solution of cubic
and quadratic equations are also well known to us .
There are no direct methods for solving higher degree algebraic equations or
equations involving transcendental functions. Such equations are solved by
numerical methods.
In these methods we find an interval in which the root lies.
We use Intermediate value theorem of calculus to determine the interval in
which the real root of the equation exists.

•Intermediate value theorem: If f(x) is continuous function in the interval


[a, b] and f(a)f(b)< 0, then there exists at least one real root ‘c’ in the interval
(a, b) such that f(c) = 0.
In this unit we will study some important methods of solving algebraic and
transcendental equations.

•Bisection method: Bisection method is a simple iteration method to solve an


equation. This method is also known as" Bolzano method" or “Interval-Halving
method". Suppose an equation of the form f  x   0 has exactly one real root
between two real numbers x0 , x1 . The numbers are chosen such that f  x0  and
f  x1  will have opposite signs. Let us bisect the interval  x0 , x1  and midpoint
x0  x1
x2  . If f  x2   0 then x2 is a root.
2
If f  x1  and f  x2  have same sign then the root lies between x0 and x2. The
interval is taken as  x0 , x2  Otherwise the root lies in the interval  x2 , x1  .
Repeating the process of bisection , we obtain successive subintervals which
are smaller. At each iteration, we get the mid-point as a better approximation of
the root. This process is terminated when interval is smaller than the desired
accuracy.

Problems:-1) Find a root of the equation x3  5 x  1  0 using the bisection


method in 5 – stages
Sol: Let f  x   x3  5x  1
we note that f(0) 0 and f(1)
 Root lies between 0 and 1
Consider x0  0 and x1  1
By bisection method the next approximation is
x x 1
x2  0 1   0  1  0.5
2 2
 f  x2   f  0 : 5   1.375  0 and f  0   0
We have the root lies between 0 and 0.5
0  0.5
Now x3   0.25
2
We find f  x3   0.234375  0 and f  0  0
Since f  0  0 , we conclude that root lies between x0 and x3
The third approximation of the root is
x x 1
x4  0 3   0  0.25
4 2
 0.125
We have f  x4   0.37495  0
Since f  x4   0 and f  x3   0 , the root lies between
x4  0.125 and x3  0.25
Considering the 4th approximation of the roots
x  x4 1
x5  3   0.125  0.25   0.1875
2 2
f  x5   0.06910  0 ,
since f  x5   0 and f  x3   0 the root must lie between x5  0.18758 and
x3  0.25
Here the fifth approximation of the root is
1
x6   x5  x3 
2
1
  0.1875  0.25 
2
 0.21875
We are asked to do up to 5 stages.
We stop here 0.21875 is taken as an approximate value of the root and it
lies between 0 and 1

False Position Method ( Regula – Falsi Method)


In the false position method we will find the root of the equation f  x   0 .
Consider two initial approximate values x0 and x1 near the required root so
that f  x0  and f  x1  have different signs. This implies that a root lies between
x0 and x1 . The curve f  x  crosses x- axis only once at the point x2 lying
between the points x0 and x1 , Consider the point A   x0 , f  x0   and B   x1 , f  x1  
on the graph and suppose they are connected by a straight line, Suppose this
line cuts x-axis at x2 , We calculate the values of f  x2  at the point. If
f  x0  and f  x2  are of opposite sign, then the root lies between x0 and x2 and
value x1 is replaced by x2
Otherwise the root lies between x2 and x1 and the value of x0 is replaced by x2
Another line is drawn by connecting the newly obtained pair of values.
Again the point here the line cuts the x-axis is a closer approximation to the
root. This process is repeated as many times as required to obtain the desired
accuracy. It can be observed that the points x2 , x3 , x4 .....obtained converge to
the expected root of the equation y  f  x  .

To obtain the equation to find the next approximation to the root


Let A   x0 , f  x0   and B   x1 , f  x1   be the points on the curve
y  f  x0  f  x1   f  x0 
y  f  x  Then the equation to the chord AB is  1

x  x0 x  x0
At the point C where the line AB crosses the x – axis, we have f(x) =0 i.e. y =0
x1  x0
From (1), we get x  x0  f  x0    2 
f  x1   f  x0 
x is given by (2) serves as an approximated value of the root, when the interval
in which it lies is small. If the new values of x is taken as x2 then (2) becomes
 x1  x0  f x
x2  x0   0
f  x1   f  x0 
x f  x1   x1 f  x0 
 0  3
---------------3
f  x1   f  x0 
Now we decide whether the root lies between
x0 and x2  or  x2 and x1
We name that interval as  x1 , x2  The line joining  x1 , y1  x2 , y2  meets x – axis at
x1 f  x2   x2 f  x1 
x3 is given by x3 
f  x2   f  x1 
This will in general, be nearest to the exact root we continue this procedure till
the root is found to the desired accuracy. The iteration process based on (3) is
known as the method of false position. The successive intervals where the root
lies, in the above procedure are named as  x0 , x1  ,  x1 , x2  ,  x2 , x3  etc
Where xi  xi  1 and f  x0  , f  xi  1 are of opposite signs
xi 1 f  xi   xi f  xi 1 
Also xi 1 
f  xi   f  xi 1 
Problems:-
1.Find out the roots of the equation x3  x  4  0 using false position method
sol: Let f  x   x3  x  4  0
f  0  4, f 1  4, f  2  2
Since f 1 and f  2 have opposite signs the root lies between 1 and 2
x0 f  x1   x1 f  x0 
By false position method x2 
f  x1   f  x0 

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

Now, the root lies between 1.796 and 2


1.796  2  2   0.0027 
x6   1.796
2   0.0027 
The root is 1.796.

Newton- Raphson Method:-

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.

Define the error of approximation at the k th iterate as = – α, k = 0, 1, 2,...


Definition: An iterative method is said to be of order p or has the rate of
convergence p, if p is the largest positive real number for which there exists a
finite constant C≠0 , such that

The constant C, which is independent of k, is called the asymptotic error


constant and it depends on the derivatives of f(x) at x = α.
NUMERICAL AND STATISTICAL METHODS
Learning Material

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:

Student should be able to


 Know about the Interpolation, and Finite Differences.
 Utilize the Newton’s formula for interpolation.
 Operate Lagrange’s Interpolation formula.

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

Satisfying the relation y = f(x) and the explicit definition of f(x) is


not known, is it possible to find a simple function say f(x) such that f(x) and
 (x ) agree at the set of tabulated points. This process of finding  (x ) is called
interpolation. If  (x ) is a polynomial then the process is called polynomial
interpolation and  (x ) is called interpolating polynomial. In our study we are
concerned with polynomial interpolation
Finite Differences:-
1. Introduction:- Here we introduce forward, backward and central
differences of a function y = f(x). These differences play a fundamental role in
the study of differential calculus, which is an essential part of numerical
applied mathematics
2. Forward Differences:-
Consider a function y = f(x) of an independent variable x. let
y0,y1,y2…….yr be the values of y corresponding to the values x0,x1,x2…….xr of x
respectively. Then the differences y1-y0, y2 – y1.............. are called the first
forward differences of y, and we denote them by y0 , y1 ,........ that is
In general
Here the symbol is called the forward difference operator
The second forward differences and are denoted by that is

In general similarly, the nth forward differences are


defined by the formula.

The symbol is referred as the nth forward difference operator.


3. Forward Difference Table:-
The forward differences are usually arranged in tabular columns
as shown in the following table called a forward difference table
Values Values First order Second order Third order Fourth order
of x of y differences differences differences differences


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

5. Backward Difference Table:-


X Y

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

Some more relations

•Inverse operator: Inverse operator is defined as


In general
We can easily establish the following relations

i) ii) iii)

iv) v)

•Differential operator:

The operator D is defined as


Relation between the Operators D and E

Using Taylor’s series we have,


This can be written in symbolic form

We obtain in the relation


•Theorem: If is a polynomial of degree n and the values of x are equally
spaced then is constant
Note:-
As is a constant, it follows that
The converse of above result is also true that is, if is tabulated at equal
spaced intervals and is a constant, then the function is a polynomial of
degree n

1. Find the missing term in the following data


X 0 1 2 3 4
Y 1 3 9 - 81
Why this value is not equal to . Explain
Sol. Consider

Substitute given values we get

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

Sol. Let h be the interval of differencing


Proceeding on, we get

Newton’s Forward Interpolation Formula:-


Let be a polynomial of degree n and taken in the following form

This polynomial passes through all the points ( for i = 0 to n. Therefore, we can
obtain the by substituting the corresponding as

Let ‘h’ be the length of interval such that represent

This implies
From (1) and (2), we get

Solving the above equations for , we get


Similarly, we can see that

If we use the relationship


Then

Equation (3) becomes

Newton’s Backward Interpolation Formula:-


If we consider

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

Sol. The difference table is

x Y
50 205
20
60 225 3
23 0
70 248 3
26
80 274

Let temperature =

By Newton’s forward interpolation formula

Melting point = 212.6


2.Using Newton’s Gregory backward formula, find e 1.9 from the following
data
x 1.00 1.25 1.50 1.75 2.00
e x 0.3679 0.2865 0.2231 0.1738 0.1353

Lagrange’s Interpolation Formula:-


Let be the values of x which are not necessarily
equally spaced. Let be the corresponding values of let
the polynomial of degree n for the function passing through the
points be in
the following form

Where an are constants


Since the polynomial passes through , .
The constants can be determined by substituting one of the values of
in the above equation
Putting in (1) we get,

Putting in (1) we get,

Similarly substituting in (1), we get

Continuing in this manner and putting in (1) we get

Substituting the values of , we get


Q 1. Using Lagrange's formula calculate from the following table
x 0 1 2 4 5 6

1 14 15 5 6 19

Sol. Given

From lagrange’s interpolation


formula

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.

The important methods of solving ordinary differential equations of first order


numerically are as follows
 Taylors series method

 Euler’s method

 Modified Euler’s method of successive approximations

 Runge- kutta method

To describe various numerical methods for the solution of ordinary differential


equations we consider the general 1st order differential equation
dy/dx = f(x,y) ------- (1)
with the initial condition y(x0) = y0
The methods will yield the solution in one of the two forms:
i) A series for y in terms of powers of x, ,from which the value of y can be
obtained by direct substitution.
ii ) A set of tabulated values of y corresponding to different values of x.
TAYLOR’S SERIES METHOD
To find the numerical solution of the differential equation
dy
 f ( x, y ) (1)
dx
With the initial condition y( x0 )  y0  (2)

y ( x) can be expanded about the point x0 in a Taylor’s series in powers of ( x  x0 )


as
( x  x0 ) ( x  x0 ) 2 ( x  x0 ) n n
y( x)  y ( x0 )  y( x0 )  y( x0 )  ............  y ( x0 ) (3)
1 2! n!
In equation3, y ( x0 ) is known from Initial Condition . The remaining coefficients

y( x0 ), y( x0 ),......... y n ( x0 ) etc are obtained by successively differentiating equation1

and evaluating at x0 . Substituting these values in equation3, y ( x) at any point

can be calculated from equation3. Provided h  x  x0 is small.

When x0  0 , then Taylor’s series equ3 can be written as

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!

Example1. Using Taylor’s expansion evaluate the integral of y  2 y  3e x , y(0)  0


at x  0.2 . Hence compare the numerical solution obtained with exact solution.
Sol: Given equation can be written as 2 y  3e x  y, y(0)  0
Differentiating repeatedly w.r.t to ‘x’ and evaluating at x  0
y( x)  2 y  3e x , y(0)  2 y (0)  3e0  2(0)  3(1)  3
y( x)  2 y  3e x , y(0)  2 y(0)  3e0  2(3)  3  9
y( x)  2. y( x)  3e x , y(0)  2 y(0)  3e0  2(9)  3  21
y iv ( x)  2. y( x)  3e x , y iv (0)  2(21)  3e0  45
y v ( x)  2. y iv  3e x , y v (0)  2(45)  3e0  90  3  93

In general, y ( n1) ( x)  2. y ( n) ( x)  3e x or y ( n1) (0)  2. y ( n ) (0)  3e0

The Taylor’s series expansion of y ( x) about x0  0 is

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 =    e24
e e

General solution is y.e2 x   3e x .e2 x dx  c  3e  x  c

 y  3e x  ce2 x where x  0, y  0 0  3  c  c  3

The particular solution is y  3e2 x  3e x or y( x)  3e2 x  3e x


Put x  0.1 in the above particular solution,
y  3.e0.2  3e0.1  0.34869

Similarly put x  0.2 , y  3e0.4  3e0.2  0.811265

put x  0.3 , y  3e0.6  3e0.3  1.416577

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.

Modified Euler’s method


i 1
It is given by y k 1  yk  h / 2 f  xk , yk   f  xk 1 ,1k 1  , i  1, 2....., ki  0,1.....
i
 
Working rule :
i) Modified Euler’s method
i 1
y k 1  yk  h / 2 f  xk , yk   f  xk 1 ,1k 1  , i  1, 2....., ki  0,1.....
i
 
ii) When i  1 y 0 k 1 can be calculated from Euler’s method

iii) k=0, 1……… gives number of iteration. i  1, 2...


gives number of times, a particular iteration k is repeated
Suppose consider dy/dx=f(x, y) -------- (1) with y(x0) =y0----------- (2)2
To find y(x1) =y1 at x=x1=x0+h
Now take k=0 in modified Euler’s method
1
 
We get y1   y0  h / 2  f  x0 , y0   f x1 , y1
i 1
 ……………………… (3)
Taking i=1, 2, 3...k+1 in equation (3), we get
y1   y0  h / 2  f  x0 , y0   (By Euler’s method)
0

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

take the common value as y2  y  x2   y  x1  h 

We use the above procedure again


Example1. Using modified Euler’s method, find the approximate value of
x when x  0.3 given that dy / dx  x  y and y  0  1

Sol: Given dy / dx  x  y and y  0  1

Here f  x, y   x  y, x0  0, and y0  1

Take h = 0.1 which is sufficiently small


Here x0  0, x1  x0  h  0.1, x2  x1  h  0.2, x3  x2  h  0.3

The formula for modified Euler’s method is given by


i
 
yk 1   yk  h / 2  f  xk  yk   f xk 1 , yk 1
i 1
  1
Step1: To find y1= y(x1) = y (0.1)
Taking k = 0 in eqn(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 


 y11  y0  0.1/ 2  f  x0 , y0   f x1 , y10 
  
= 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  y13

 y1 = 1.1105

Step:2 To find y2 = y(x2) = y(0.2)


Taking k = 1 in equation (1) , we get
i
 
y2   y1  h / 2  f  x1 , y1   f x2 , y2
i 1
  3
I = 1,2,3,4,…..
For i = 1
1
 
y2   y1  h / 2  f  x1 , y1   f x2 , y2
0

y2  is to be calculate from Euler’s method
0
y2   y1  h f  x1 , y1 
0

= 1.1105 + (0.1) f(0.1 , 1.1105)


= 1.1105+(0.1)[0.1+1.1105]
= 1.2316

= 1.1105  0.1/ 2  f  0.1,1.1105  f  0.2,1.2316  


(1)
 y 2

= 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 y23  y23

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

= 1.2432 +(0.1) f(0.2 , 1.2432)


= 1.2432+(0.1)(1.4432)
= 1.3875
 y31 = 1.2432+0.1/2[f(0.2 , 1.2432)+f(0.3, 1.3875)]
= 1.2432 + 0.1/2[1.4432+1.6875]
= 1.2432+0.1(1.5654)
= 1.3997
2
 
y3   y2  h / 2  f  x2 , y2   f x3 , y3  
1
 
= 1.2432+0.1/2[1.4432+(0.3+1.3997)]
= 1.2432+ (0.1) (1.575)
= 1.4003
3
 
y3   y2  h / 2  f  x2 , y2   f x3 , y3
2

= 1.2432+0.1/2[f(0.2 , 1.2432)+f(0.3 , 1.4003)]
= 1.2432 + 0.1(1.5718)
= 1.4004
4
 
y3   y2  h / 2  f  x2 , y2   f x3 , y3  
3
 
= 1.2432 + 0.1/2[1.4432+1.7004]
= 1.2432+(0.1)(1.5718)
= 1.4004
Since y33  y3 4

 The value of y at x = 0.3 is 1.4004

Runge – Kutta Methods


I. Second order R-K Formula
yi+1 = yi+1/2 (K1+K2),
Where K1 = h (xi, yi)
K2 = h (xi+h, yi+k1) for i= 0,1,2-------
II. Third order R-K Formula
yi+1 = yi+1/6 (K1+4K2+ K3),
Where K1 = h (xi, yi)
K2 = h (xi+h/2, y0+k1/2)
K3 = h (xi+h, yi+2k2-k1)
For i= 0,1,2-------
III. Fourth order R-K Formula
yi+1 = yi+1/6 (K1+2K2+ 2K3 +K4),
Where K1 = h (xi, yi)
K2 = h (xi+h/2, yi+k1/2)
K3 = h (xi+h/2, yi+k2/2)
K4 = h (xi+h, yi+k3)
For i= 0,1,2-------
Example 1. Apply the 4th order R-K method to find an approximate value of y
when x=1.2 in stepsof 0.1, given that y1 = x2+y2, y (1)=1.5
sol. Given y1= x2+y2,and y(1)=1.5
Here f(x,y)= x2+y2, y0 =1.5 and x0=1,h=0.1
So that x1=1.1 and x2=1.2
Step1:
To find y1 :
By 4th order R-K method we have
y1=y0+1/6 (k1+2k2+2k3+k4)
k1= h f(x0,y0) = (0.1) f(1,1.5) = (0.1) [12+(1.5)2] = 0.325
k2= hf (x0+h/2,y0+k1/2) = (0.1) f(1+0.05,1.5+0.325) = 0.3866
and
k3= h f((x0+h/2,y0+k2/2) = (0.1) f(1.05,1.5+0. 3866/2) = (0.1)[(1.05)2+(1.6933)2]
= 0.39698
k4= hf(x0+h,y0+k3) = (0.1)f(1.0,1.89698) = 0.48085
Hence
1
y1  1.5  0.325  2  0.3866   2  0.39698  0.48085
6
 1.8955
Step2:
To find y2, i.e., y  x2   y 1.2

Here x1=0.1,y1=1.8955 and h=0.1


by 4th order R-K method we have
y2 = y1+(1/6) (k1+2k2+2k3+k4)
k1= hf(x1,y1) = (0.1)f(0.1,1.8955) = (0.1) [12+(1.8955)2] = 0.48029
k2 = hf (x1+h/2,y1+k1/2) = (0.1)f(1.1+0.1,1.8937+0.4796) = 0.58834
k3 = hf((x1+h/2,y1+k2/2) = (0.1)f(1.5,1.8937+0.58743) = (0.1)[(1.05)2+(1.6933)2]
= 0.611715
k4 = hf(x1+h,y1+k3) = (0.1)f(1.2,1.8937+0.610728) = 0.77261
Hence
y2 = 1.8937+(1/6) (0.4796+2(0.58834)+2(0.611715)+0.7726) = 2.5043
 y =2.5043 where x  0.2 .
NUMERICAL AND STATISTICAL METHODS

UNIT IV

PROBABILITY AND EXPECTATION OF RANDOM VARIABLE


Objectives:
(a) To understand the concepts of probability and statistics.
(b) To know sampling theory and principles of hypothesis testing
(c) To appreciate Queuing theory and models.

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

Probability and Expectation of Random Variable

Terminology associated with Probability Theory:

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.

Various definitions of probability are 1. Classical definition of probability (or


Mathematical definition of probability) 2. Statistical definition of probability (or Empirical
definition of probability) 3. Axiomatic approach to probability.

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

 Limits of probability 0 ≤ P (E) ≤ 1

Axiomatic approach to Probability: A real valued function p( x) : S ( x)  (0,1) is called a


probability function which satisfies the following rules or statements technically termed as
axioms, where S is a sample space, x is a result of an experiment ranges from   to  .
Axiom 1: (Non-negativity) For any event E of S, P(E) ≥ 0.
Axiom 2: (Totality) S be a sample space of an experiment and P(S) = 1.
Axiom 3: (Additive) Suppose E1 and E2 be mutually exclusive events of S, then
P( E1  E2 )  P( E1 )  P( E2 ) .

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) PA  B   P( A)  P A  B 

Additive Law of Probability:


Statement: If A and B are any two events of a sample space S and are not disjoint then
P A  B  P A  PB  P A  B

Proof:
A B  A A B 
P A  B   PA  A  B 
= P A  P A  B 
= P A  PA  B   P A  B   P A  B 
= P A  PA  B   A  B  P A  B 
= P A  PB  P A  B

Result : If A and B are disjoint events then P( A  B)  P( A)  P( 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.

Result: If A and B are independent events then P( A ∩ B )= P ( A ) P( B )

Result: If A1,A2……..An are n independent events then probability of happening of at least


one of the event= 1- probability of none of the events happening

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

Example: Four computer companies A, B, C and supply transistors to a company. From


previous experience, it is known that the probability of the transistors being bad if it comes
from A is 40%, from B is 2%, from C is 5% and from D is 1%. The probabilities of picking
supplier A is 20%, B is 30%, C is 10% and D is 40%.
(i) Find the probability that a transistor chosen at random is bad.
(ii) Find the probability that the transistor comes from company A, given that the transistor is
bad.
Sol: Probabilities of picking suppliers A,B,C and D are P(E1) = 0.2, P(E2) = 0.3, P(E3) = 0.1,
and P(E4) = 0.4 respectively
Getting suppliers, A,B,C and D when picked are events E1,E2,E3 and E4 respectively
D is the event bad
Given P(D/E1) = 0.4, PD/(E2) = 0.02, P(D/E3) = 0.05, P(D/E4) = 0.01
(i) P(D)= P(E1) P(D/E1) + P(E2) P(D/E2) + P(E3) P(D/E3) + P(E4) P(D/E4)
= 0.895
(ii) P(E1/A)= P(E1) P(D/E1) / P(D) = 0.893
Concept of Random Variable:

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 .

Types of Random Variable:

Random variables are classified into:


1. Discrete Random Variable (DRV): A random variable X which is defined on the discrete
sample space is called discrete random variable.
For example, consider a discrete sample space S  1, 2, 3, 4. Let us define X = S2 be a
random variable. Then discrete values of S map to discrete values of X as 1, 4, 9,16. The
probabilities of the random variable x are equal to the probabilities of set S because of the
one-to-one mapping of the discrete points.
Let X be a discrete random variable with integer events X  x1 , x2 , ......., xn . The
probability of X at any event is a function of xi and is given by
P( X  xi )  p( xi ) , i  1, 2, 3, ........
This function is called probability mass function and is abbreviated as p.m.f. (pmf).

Properties of probability mass function:


Consider a discrete random variable X in a sample space with infinite number of possible
outcomes, that is, X  x1 , x2 , ....... If the probability of X, p( xi ) , i  1, 2, 3, .... satisfies the
following properties then the function p (x ) is called probability mass function.

(i) p( xi )  0 ,  i (ii)  p( x )  1
i 1
i

2. Continuous Random Variable (CRV): A random variable X which is defined on the


continuous sample space is called continuous random variable.
Temperature, time, height and weight over a period of time etc. are examples of CRV.
The probability density function of a random variable X is defined as the variable X falls in
 dx dx   dx dx 
the infinitesimal interval  x  , x   such that P x   X  x    f ( x)dx ,
 2 2  2 2 
 dx dx 
P x   X  x 
i.e. f ( x)  Lt 
2 2 
t 0 dx
Where f (x) is called the probability density function of a random variable X and the
continuous curve y = f(x) is called probability density curve.

Properties of probability density function:


The continuous curve y =f(x) satisfies the following properties, then the function f(x) is called
probability density function of a random variable and is abbreviated as p.d.f. (pdf).

(i) f ( x)  0,  x, (ii)  f ( x)dx 1


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.

Probability distribution function:


Let X be a random variable. Then the probability distribution function associated with X is
defined as the probability that the outcomes of an experiment will be one of the outcomes for
which X ( s)  x, x  R. That is, the function F (x) is defined by
F ( x)  P( X  x)  Ps : X (s)  x,    x   is called the distribution function of X.
Sometimes it is also known as Cumulative Distribution function and is abbreviated as CDF.
Properties of cdf:
1 . If F is the distribution function of a random variable S and a  b, then
(i) P(a  X  b)  F (b)  F (a)
(ii) P(a  X  b)  P( X  a)  F (b)  F (a)
(iii) P(a  X  b)  F (b)  F (a)  P( X  b)
(iv) P(a  X  b)  F (b)  F (a)  P( X  b)  P( X  a)
2. All distribution functions are monotonically increasing and lie between 0 and 1. That is, if F
is the distribution function of the random variable X, then
(i) 0  F ( x)  1 i.e. F is bounded.
(ii) F ( x)  F ( y ) when x  y.
(ii) F ()  0 and F ()  0.

Evaluation of mean and variance:

1. A random variable ‘X’ has the following probability functions:


x 0 1 2 3 4 5 6 7
P(x) 0 K 2K 2K 3K K 2K 7K2+K 2 2

(i) Determine ‘K’ (ii) Evaluate P( X  6), PX  6 & Plo  x  5


(iii) Mean (iv) Variance
7
Sol: Since  P( x)  1
x 0
K = 1/10 = 0.1
P(X<6)=P(X=0)+P(x=1)+……………..+P(x=5)
=0.81
P(0<X<5)=P(X=1)+P(X=2)+P(X=3)+P(X=4)
7
Mean    Pi xi
i 0
= 3.66 (K=1/10)
7
Variance   Pi xi 2   2
i 0
=3.4044

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
P0  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) P0  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

Review on standard probability distribution functions

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.

Constants (mean & variance) of Binomial distribution:


mean  E ( X )   xp( x)
n n n
n
  x nC x p x q n  x   x n  1C x i p x q n  x  np  n  1C x 1 p x 1 q n  x  np(q  p) n 1  np
x 0 x 1 x x 1

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) x2

 n(n  1) p 2 (q  p) n  2  np  n(n  1) p 2  np  npq


Problem: Ten coins are thrown simultaneously. Find the probability of getting
at least 7 heads.
Solution: p = probability of getting a head = ½
q = probability of getting a head = ½
The p.d.f. of binomial distribution is P( X  x)  nCx p x q n x , x  0,1, 2, .....,10
Given n = 10, P( X  x)  10Cx p x q10 x
Probability of getting at least 7 heads is given by
P( X  7)  P( X  7)  P( X  8)  P( X  9)  P( X  10)  0.1719.

Poisson distribution: Poisson distribution due to French mathematician


Denis Poisson in 1837 is a discrete probability distribution.
It is a rare distribution of rare events i.e. the events whose probability of
occurrence is very small but the number of trails which would lead to the
occurrence of the event, are very large.
As n  , p  0 B.D. tends to P.D.
Definition: A random variable X is said to follow a Poisson distribution if it
assumes only non-negative values and its probability mass function is given by
e  x
P( X  x)  ; x  0,1, 2, ....
x!
 0, otherwise.
Here   0 , is called parameter of the distribution.
Example: (1) The number defective bulbs manufactured by a company.
(2) The number of telephone calls per minute at a switch board.
Conditions: (1) The variable or number of occurrences is a discrete variable.
(2) The occurrences are rare.
(3) The number of trails ‘n’ is large.
(4) The probability of success (p) is very small.
(5) np =  is finite.

Constants (mean and variance) of Poisson distribution:


 
e  x 
x1
mean  E ( X )   x p( x)   x  e    e  .e   .
x 0 x 0 x ! x 1 ( x  1)!
var iance  E ( X )  [ E ( X )]
2 2


x2
 e2 
 ( x  1)!    
x2
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

since frequencies are always integers, therefore by converting them to nearest


integers, we get
Observed 109 65 22 3 1
frequency
Expected 109 66 20 4 1
frequency
Example: A car hire firm has two cars which it hires out day by day, The
number of demands for a car on each day is distributed as a Poisson
distribution with mean 1.5. Calculate the proportion of days (i) on which there
is no demand (ii) on which demand is refused.
Solution: Given mean, λ = 1.5
e  x
We have p( x) 
x!
(i) P(no demand) = p(0) = 0.2231
Number of days in a year there is no demand of car = 365 (0.2231) =
81 days.
(ii) P(demand refused) = p(x>2) = 1- [p(0)+p(1)+p(2)] = 0.1913
Number of days in a year when some demand is refused = 365
(0.1913) = 70 days.

Normal Distribution: It was first discovered by English Mathematician De-


Moivre in 17333 and further refined by French Mathematician Laplace in 1744
and independently by Karl Friedrich Gauss. Normal distribution is also known
as ‘Gaussian distribution’.
Definition: A random variable X is said to have a Normal distribution, if its
probability density function is given by
( x )2
1 
f ( x;  ,  2 )  e 2 2
;    x  ,      ,   0
 2
Where µ is mean and σ2 is variance are called parameters.
Notation: X~N(µ, σ2).
Problem: In a normal distribution, 7% of the items are under 35 and 89%
under 63. Determine the mean and variance of the distribution.
Solution: Given P(X<35) = 0.07 and P(X<63) = 0.89
Therefore, P(X>63) = 1- P(X<63) = 1 – 0.89 = 0.11
When X = 35, Z = (X-µ)/σ = (35-µ)/σ = -z1 (say) ……(1)
When X = 63, Z = (X-µ)/σ = (63-µ)/σ = -z2 (say) …….(2)
P(0<Z<z2) = 0.39  z2 = 1.23 (from tables)
and P(0<Z<z1) = 0.43  z1 = 1.48
from(1) we have (35-µ)/σ = -1.48 ……(3)
from (2) we have (63-µ)/σ = 1.23 ……(4)
(4) – (3) gives σ = 10.332
From equation (3), µ = 50.3
Therefore, mean = 50.3 and variance = 106.75

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/λ.

Problem: If x is a exponential varient with mean 5. Then find the following


probabilities
i) P(0 < X < 1) ii) P( -∞ < X< 10)
Solution: Given mean is 10 then λ= 1/5.

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

SAMPLING AND STATISTICAL INFERENCE


Objectives:

Knowing sampling theory and principles of hypothesis testing.

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:

Students should be able to


Construct sampling distribution and calculate its mean and standard
deviation.
Recognize and apply the appropriate tests to give valid inference.

SAMPLING AND STATISTICAL INFERENCE

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

Therefore, standard deviation (s.d.) σ = √10.8 = 3.29


(c) Sampling with replacement:
Total number of samples with replacement is Nn = 52 =25 samples of size
2. i.e.
{(2,2), (2,3),(2,6),(2,8),(2,11),(3,2),
(3,3),(3,6),(3,8),(3,11),(6,2),(6,3),(6,6),(6,8),(6,11)
(8,2), (8,3),(8,6),(8,8),(8,11),(11,2),(11,3),(11,6),(11,8),(11,11)}
Therefore, the distributin of means of the samples known as sampling
distribution of means.
Therefore, the samples means are {2, 2.5, 4, 5, 6.5, 2.5, 3, 4.5, 5.5, 7, 4,
4.5, 6, 7, 8.5, 5, 5.5, 7, 8, 9.5, 6.5, 7, 8.5, 9.5, 11} and the mean of
sampling distribution of means is the mean of these 25 means.
µx = (2+2.5+4+ … +9.5 +11)/25 = 6.
(d) Standard deviation:
σ2 = (2-6)2+(2.5 – 6)2+ … +(9.5 – 6)2+(11 – 6)2 / 25 = 5.40
Therefore , σ = √5.40 = 2.32
(3) A population consists of 5, 10, 14, 18, 13, 24. Consider all possible
samples of size 2 which can be drawn without replacement from the
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

µ=
 x = (5+10+14+18+13+24)/6 = 14
n

(b) Variance (σ2) is σ2 =  (x i  x)2 / n

= (5-14)2+(10-14)2+…+(11-6)2 / 6 = 35.67

Therefore, standard deviation (s.d.) σ = √10.8 = 3.29

(c) All possible samples of size 2 i.e. the number os samples = 16C2 = 15

Sample Sample Total of Sample


No. Values Sample mean
values
1 5, 10 15 7.5
2 5, 14 19 9.5
3 5, 18 23 11.5
4 5, 13 18 9
5 5, 24 29 14.5
6 10, 14 24 12
7 10, 18 28 14
8 10, 13 23 11.5
9 10, 24 34 17
10 14,18 32 16
11 14, 13 27 13.5
12 14, 24 38 19
13 18, 13 31 15.5
14 18, 24 42 21
15 13, 24 37 18.5
Total 210.0

(d) Variance of sampling distribution of means


(7.5  14) 2  (9.5  14) 2  ....  (21  14) 2  (18.5  14) 2
 X2   14.266
15
Therefore, standard deviation,  X  14.266  3.78
Statistical Hypothesis: Hypothesis is a statement or assumption about the
population which may or may not be true

Testing of hypothesis: It is used to testing the hypothesis about the parent


population from which the samples are drawn.

Test of Significance: A very important aspect of the sampling theory is the


study of the test of significance, which enables us to decide on the basis of the
sample results, if

 The deviation between the observed sample statistics and the hypothesis
parameter value (or)
 The deviation between two independent sample statistics is significant.

Null Hypothesis: A definite statement about the population parameter.


Such hypothesis which is usually a hypothesis of no difference is called
‘Null hypothesis’ and is usually denoted by ‘𝐻0 ’.

Alternative Hypothesis: Any hypothesis which is complementary to the


null hypothesis is called ‘Alternative hypothesis” and is usually denoted by
‘𝐻1 ’.
Eg: If we want to test the null hypothesis that the population has a specified
mean µ0 (say) i.e., 𝐻1 :µ≠ µ0 -----------------(i)

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

Critical Region: The region of rejection of null hypothesis 𝐻0 when 𝐻0 is true is


that region of the outcomes at where 𝐻0 is rejected. If the sample points falls in
that region is called the ‘critical region’, size of the critical region is 𝛼.

Type-I error:

P( rejecting 𝐻0 /𝐻0 is true) i.e., when H0 is true it is to be accepted but it is a


rejected. Therefore there is a error

Type-II error: P(Accepting 𝐻0 /𝐻0 is false) i.e., when H0 is false it is to be


rejected but it is accepted. Therefore there is a 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

If the alternative hypothesis is of the type (  ) and the

critical region lies in the normal probability curve on both sides then it is said
to be two tailed tests (TTT)

Level of significance (LOS): The probability of committing Type-I error is


known as the level of significance which is denoted by ‘𝛼’. Usually LOS are 10%
, 5% or 1%.

Degrees of freedom: Suppose there are N observations and k conditions on


these then the degrees of freedom is N-k. The degrees of freedom is used in
small sample tests.

Procedure for testing of hypothesis:

Step (1): Set up Null hypothesis (𝐻0 )


Step (2): Set up Alternative hypothesis (𝐻1 ) Which enables us to apply one
tailed test/ Two tailed test.

Step (3): Choose Level of significance (LOS) 𝛼


𝑡−𝐸(𝑡)
Step (4): Under the null hypothesis 𝐻0 , the test statistic Z=𝑆.𝐸 𝑜𝑓(𝑡) ~ 𝑁(0,1)
where ‘t ‘ is a statistic

Step (5): Conclusion: If calculated Z < (tabulated) 𝑍𝛼 at α % LOS then accept


null hypothesis otherwise reject null hypothesis.

The rejection rule for 𝐻0 : x=µ (or) µ=µ0 is given below.

Table: Critical value of Z when n≥30

Level of 1% 5% 10%
significance

Two-Tailed test 2.58 1.96 1.645

Right-Tailed test 2.33 1.645 1.28

Left-Tailed test -2.33 -1.645 -1.28

Test of significance for a single mean: Working Rule

Step (1): Null hypothesis:𝐻0: µ=𝜇0

Step (2): Alternative hypothesis: 𝐻1 :µ≠ µ0 / 𝐻1 :µ<µ0 / 𝐻1 :µ>µ0

Step (3): Level of significance: Choose 5% (or) 1%

Step (4): Test statistic: We have the following two cases.

Case (1): When the S.D ( ) of population is known. Then the test statistic is Z =
X µ
~ 𝑁(0,1)
𝑆.𝐸( x )

Where S.E( x ) =𝜎/√𝑛

Where 𝜎 = standard deviation of population

n=Sample size.
Case (2): When the S.D (𝜎) of population is unknown. The test statistic is
X µ
Z=
𝑆.𝐸( x )

Where S.E ( x ) =𝑠/√𝑛

Where 𝑠 = standard deviation of sample

n=Sample size.

Step (5): Conclusion: 𝑍𝑐𝑎𝑙 is compare with 𝑍𝑡𝑎𝑏 value.

If 𝑍𝑐𝑎𝑙 <𝑍𝑡𝑎𝑏 accept 𝐻0 . Otherwise reject 𝐻0 .

Problem:

A sample of 400 items is taken from a population whose standard


deviation is 10. The mean of the sample is 40. Test whether the sample has
come from a population with mean 38.Also calculate 95% confidence interval
for the population?

Given n=400, x =40, µ=38, 𝜎 = 10

Step (1): Null hypothesis:𝐻0: µ=38

Step (2): Alternative hypothesis: 𝐻1 :µ≠ 38

Step (3): Level of significance: 𝛼 = 5%

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

Step (5): Conclusion: 𝑍𝑐𝑎𝑙 =4, 𝑍𝑡𝑎𝑏 =1.96

If 𝑍𝑐𝑎𝑙 > 𝑍𝑡𝑎𝑏 at 5% LOS. So we reject 𝐻0 .

95% confidence interval is ( x ±1.96 𝜎/√𝑛) =(39.02,40.98)

Test of equality of Two means: Let x 1 , x 2 be the sample means of two


independent random samples sizes 𝑛1 and 𝑛2 drawn from two populations
having the means 𝜇1 and 𝜇2 and standard deviation 𝜎1 and𝜎2 . To test whether
the two population means are equal .

Step (1): Null hypothesis: 𝐻0 : 𝜇1 =𝜇2

Step (2): Alternative hypothesis:

H1 : 1   2 / H1 : 1  2 / H1 : 1   2

Step (3): Level of significance: Choose 5% (or) 1%

x1  x 2
Step (4): Test statistic: Z=
𝜎 2 𝜎2
√ 1 + 2
𝑛1 𝑛2

Step (5): Conclusion: 𝑍𝑐𝑎𝑙 is compare with 𝑍𝑡𝑎𝑏 value.

If 𝑍𝑐𝑎𝑙 <𝑍𝑡𝑎𝑏 accept 𝐻0 . Otherwise reject 𝐻0 .

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?

Given 𝑛1 =1000,𝑛2 =2000 and x1 =67.5 x 2 =68 population S.D 𝜎=2.5

Step (1): Null hypothesis:𝐻0: 𝜇1=𝜇2

Step (2): Alternative hypothesis:

𝐻1 : 𝜇1 ≠ 𝜇2

Step (3): Level of significance: Choose 5% (or) 1%

x1  x 2
Step (4): Test statistic: Z= 𝜎 2 𝜎2
=5.16
√ 1 + 2
𝑛1 𝑛2

Step (5): Conclusion: 𝑍𝑐𝑎𝑙 =5.16 𝑍𝑡𝑎𝑏 =1.96

If 𝑍𝑐𝑎𝑙 > 𝑍𝑡𝑎𝑏 then we reject our 𝐻0 .

∴ The samples have not been drawn from same population of S.D 2.5 inches.

Test of significance of single proportion: Suppose a large random sample of


size n has a sample proportion p of members possessing a certain attribute. To
test the hypothesis that the proportion P in the population has a specified
value 𝑝0 .

Step (1): Null hypothesis:𝐻0: p=𝑝0

Step (2): Alternative hypothesis: 𝐻1 :p≠ 𝑝0 / 𝐻1 :p<𝑝0 / 𝐻1 :p>𝑝0

Step (3): Level of significance: Choose 5% (or) 1%


𝑝−𝑃
Step (4): Test statistic: Z= 𝑃𝑄

𝑛

Where p=sample proportion=x/n

P=population proportion, Q=1-P

N=sample size

Step (5): Conclusion: 𝑍𝑐𝑎𝑙 is compare with 𝑍𝑡𝑎𝑏 value.

If 𝑍𝑐𝑎𝑙 <𝑍𝑡𝑎𝑏 accept 𝐻0 . Otherwise reject 𝐻0 .

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

P=sample proportion of rice eaters=540/1000=0.54

P=population proportion of rice eaters=1/2=0.5 Q=1-P=0.5

Step (1): Null hypothesis:𝐻0 : both rice and wheat are equally popular in the
state.i.,e P=0.5

Step (2): Alternative hypothesis:

𝐻1 :p≠ 0.5

Step (3): Level of significance: 1% =2.58


𝑝−𝑃
Step (4): Test statistic: Z= 𝑃𝑄 =2.532

𝑛
Step (5): Conclusion: 𝑍𝑐𝑎𝑙 = 2.532, 𝑍𝑡𝑎𝑏 =2.58.

If 𝑍𝑐𝑎𝑙 <฀฀฀฀ at 1% LOS then we accept ฀0 .

Test of equality of two proportions:

Let ฀1 and ฀2 be the sample proportions in two large random


samples of sizes ฀1 and ฀2 drawn from two populations having proportions ฀1
and ฀2 .

To test whether the two samples have been drawn from


the same population

Step (1): Null hypothesis: ฀0: P1= ฀2

Step (2): Alternative hypothesis:

H1 : P1  P2 / H1 : P1  P2 / H1 : P1  P2

Step (3): Level of significance: Choose 5% (or) 1%

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

(b) When the population proportion ฀1 and ฀2 are unknown.

In this case we have two methods to estimate ฀1 and ฀2 .

(i)Method of substitution:

In this method sample proportion ฀1 and ฀2 are substituted


for ฀1 and ฀2 .

฀1 ฀1 +฀2 ฀2
∴ S.E (฀1 - ฀2 )= √
฀1 +฀2

฀1 −฀2
∴ Test statistic is Z= ฀.฀ (฀1 −฀2 )

(ii) Method of pooling:


In this method, the estimate value for the two population
proportions is obtained by pooling the two sample proportions ฀1 and ฀2 into
a single proportion p by the formula is given below.

Sample proportion of two samples or estimated values is


given by
฀1 ฀1 + ฀2 ฀2
P= ฀1 +฀2

฀1 −฀2
∴ Test statistic is Z= 1 1
√฀฀(฀ +฀ )
1 2

Step (5): Conclusion: ฀฀฀฀ is compare with ฀฀฀฀ value.

If ฀฀฀฀ <฀฀฀฀ accept ฀0 . Otherwise reject ฀0 .

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?

Given ฀1 =1200 ฀2 =900

฀1 = proportion of fair haired people in first population=30/100=0.3

฀2 = proportion of fair haired people in first population=25/100=0.25

Step (1): Null hypothesis:฀0 : The two sample proportions are equal ฀1 =฀2

Step (2): Alternative hypothesis:

฀1 : ฀1 ≠ ฀2

Step (3): Level of significance: 5% = 1.96


฀1− ฀2
Step (4): Test statistic: Z= = 2.56
฀.฀(฀1− ฀2)

Step (5): Conclusion: ฀฀฀฀ = 2.56, ฀฀฀฀ = 1.96

If ฀฀฀฀ > ฀฀฀฀ at 5% LOS then we reject ฀0 .

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?

Given ฀1 =400 ฀2 =600

฀1 = proportion of men =200/400=0.5

𝑝2 = proportion of women=250/600=0.541

Step (1): Null hypothesis:𝐻0 : There is no significance difference between the


option of men and women 𝐻0 : 𝑝1 =𝑝2 =p

Step (2): Alternative hypothesis:

𝐻1 : 𝑝1 ≠ 𝑝2

Step (3): Level of significance: 5% = 1.96


𝑛1 𝑝1 + 𝑛2 𝑝2
Step (4): Test statistic: Z= P= 𝑛1 +𝑛2

𝑝1 −𝑝2
∴ Test statistic is Z= 1 1
=1.28
√𝑝𝑞(𝑛 +𝑛 )
1 2

Step (5): Conclusion: 𝑍𝑐𝑎𝑙 = 1.28, 𝑍𝑡𝑎𝑏 = 1.96

If 𝑍𝑐𝑎𝑙 < 𝑍𝑡𝑎𝑏 at 5% LOS then we reject 𝐻0 .

Degrees of freedom: It is very clear that in a test of hypothesis, a sample is


drawn from the population of which the parameter is under test. The size of the
sample varies since it depends either on the experimenter or on the resources
available. Moreover, the test statistic involves the estimated value of the
parameter which depends on the number of observations. Hence the sample
size plays an important role in testing of hypothesis and is taken care of by
degrees of freedom.

Definition: The number of independent observations in a set is called degrees


of freedom.
It is denoted by  (read as Nu). In general, the number of degrees of freedom is
equal to the total number of observations less than the number of independent
constraints imposed on the observations. i.e. in a set of n observations, if k is
the number of independent constraints then   n  k.
Before going to discuss the tests of significance under small samples, we
need some knowledge about exact sampling distributions: t- distribution (or
Student’s t- distribution), F- distribution and  2 - distribution (or Chi-Square
distribution).
 2 - distribution: Chi-square distribution was first discovered by Helmert in
1876 and later independently given Karl Pearson in 1900. The  2 -distribution
was discovered mainly as a measure of goodness of fit in case of frequency,
distribution, i.e. whether the observed frequencies follow a postulated
distribution or not.
If X1,X2,………,Xn are n independent normal variates with mean zero and variance
unity, the sum of squares of these variegates is distributed as chi-square with
n degrees of –freedom.
Note:
F – Distribution as a special case of Beta dist.
 2 – distribution as a special case of Gamma dist.
 2 distribution used as non-parameter test whereas t and F distribution are
parameter test.
Properties of Ch-Square distribution:
1. The  2 – distribution curve lies in the first quadrant since the range of X2
is from 0 to  .
2. The  2 – distribution curve is not symmetrical and is highly positive
skewed.
3.  2 – distribution has only one parameter v, the degrees of freedoms.
4.  2 –distribution curve is an unimodel curve and its mode is at the point
 2 = (v-1).
5. The mean and variance of X2 –distribution are v and 2v respectively.
6. The moment generating function for chi-square distribution is
M x2 (t )  1  2t 
v / 2
where v = n-1.
7. Additive property holds good for any number of independent  2 – variates.
Application of  2 – test: The chi-square test is applicable
1. To test the hypothesis of the variance of population.
2. To test the goodness of fit of the theoretical distribution to observed
frequency distribution, in one way classification having k-categories.
3. To test the independence of attributes, when the frequencies are
presented in a two way classification (Called the contingency table)
etc.,
Conditions for validity of  2 – test:
1. Sample size n should be large i.e. n  50
2. If individual frequencies o ( i=1,2……,n) are small say less than 10
then combine neighbouring frequencies (pooling) so that combined
frequency Oi is greater than 10.
3. The number of classes’ k should be independent.
4. The constraints on the cell frequencies, if any are linear.
5. The constraints on the cell frequencies, if any, are linear.
Problem: The following figures show the distribution of digits in numbers
chosen at random from a telephone directory.
Digits 0 1 2 3 4 5 6 7 8 9
Frequency 1026 1107 997 966 1075 933 1107 972 964 853
Test whether the digits may be taken to occur equally frequently in the
directory.

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 ( n1)
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 ( n1)
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

Fair Brown Black Total

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 ( m1)( n1)

Where Oij is observed frequency (given)


Eij is expected frequency and calculated as Eij =( ith row total x jth column total )
/ grand total (N)
E11=(40 x 60) /150=16 similarly E12=8 , E13=16, E21=20, E22=10 , E23=20,
E31=24,E32=12, E33=24
Calculated  2 =3.6458,  2 critical value at 5% LOS with (3-1) (3-1)=4 d.f is
9.488
Since Calculated  2 <  2 critical value, accept H0
i.e., Hair colour and eye colour are independent
F-distribution :- “The ratio of two sample variances is distributed of F.” F-
distribution was worked out by G.W. Snedecor and as a mark of respect for Sir
R.A.Fisher (Father of modern statistics). Who was defined a statistics Z which
is based upon the ratio of two –sample variances initially and hence it is
denoted by F. (The first letter of Fisher).
2
Let s 1
be the sample variance of an independent sample of size n1 drawn from
 
a normal population N 1 , 1 . Similarly , let S 22 be the sample variance in an
2

independent sample of size n2 drawn from another normal population N


 ,  .Thus s and
2 2
2 2
S 22 are the variances of two random samples of sizes n1
1

and n2 respectively drawn from two normal populations. In order to determine


whether the two samples came from two populations having equal variances of
the two independent random samples defined by
s12 /  12  22 s12
F= s 2 /  2   2 s 2
2 2 1 2

Which is an F-distribution with v1=n1-1 and v2=n2-1 degrees of freedom.


Properties of F-distribution:
(1) F-distribution curve extends on abscissa from 0 to ∞.
(2) It is an unimodel curve and its mode lies on the point
k k  2  v v  2 
F= 2 1 or 2 1 which is always less than unity
k1 k 2  2  v1 v2  2
(3) F-distribution curve is a positive skew curve. Generally, the F-
distribution curve is highly positive skewed where v2 is small
(4) The mean and variance are defined when v2 ≥ 3 and v2≥5 respectively.
(5) There exists a very useful relation for interchange of degrees of freedom
v1 and v2 i.e F1 v1 , v2  
1
F v2 , v1 
(6) The moment generating function of F-distribution does not exist.

F-test is used to

(1)Test the hypothesis about the equality of two population variances.


(2) test the hypothesis about the equality of two or more population means.

F-test for equality of two population variances: Suppose we want to test


whether two independent samples xi (i=1,2..n1) and yj(j=1,2..n2) of sizes n1
and n2 have been drawn from two normal populations with the same variance
or not then
Null hypotheses, H 0 :  x2   y2 , H1 :  12   22 .
Under the null hypothesis, H0, the test statistics is:
s x2 s y2
F  2 ~ Fv1 ,v2  (OR) F  2 ~ Fv2 ,v1 
sy sx
When sx2  s y2 OR s y2  sx2 respectively
n1

 xi
Where s 2
x
1 n1
n1  1 i1
 
 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 i1
y
n2

Besides t-test, we can also apply a F-test for testing equality of two population
means.

F-distribution is a very popular and useful distribution because of its utility in


testing of hypothesis about the equality of several population means, two
population variances and several regression coefficients in multiple regression
coefficient etc.,
As a matter of fact, F-test is the backbone of analysis of variance(ANOVA)

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.

Problem: Life expectancy in 9 regions of Brazil in 1900 and in 11 regions of


Brazil in 1970 was as given in the table below:
(Source: The review of income and wealth, June 1983)
Regions 1 2 3 4 5 6 7 8 9 10 11
Life Expectancy

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

It is desired to confirm, whether the variation in life expectancy in various


reigns in 1900 and in 1970 in same or not.
Solution: Let the populations in 1900 and in 1970 be considered as
   
N 1 ,  12 and N 1 ,  12 respectively.
Null hypotheses, H0 : The variation of life expectancy in various regions in
1900 and in 1970 is same. H1 :  12   22 .
Under the null hypothesis, H0, the test statistics is :
s12 s22
F ~ Fv1 ,v2  (OR) F  ~ Fv2 ,v1 
s22 s12
When s12  s22 OR s22  s12 respectively
n1

x
1 n1
 
i


2
Where s12  xi  x with x  i 1
n1  1 i1 n1
n

y
 
i
1 n2
 yi  y
2
And s  2
with y  i 1
n2  1 i1
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:

South: 15.0 8.0 3.8 6.4 27.4 19.0 35.3 13.6


North: 18.8 23.1 10.3 8.0 18.0 10.2 15.2 190.0 20.2

Test the equality of variances of households’ net expenditure on health care in


south and north India.

Problem: The time taken by workers in performing a job by method I and


Method II is given below.
Method I 20 16 26 27 23 22 -
Method II 27 33 42 35 32 34 38

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 ~ Fv1 ,v2  (OR) F  ~ Fv2 ,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

 xi  22.3  81.34,   yi  34.4  133.72


2 2

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.

Problem: The nicotine contents in milligrams in two samples of tobacco were


found to be as follows:
Sample A 24 27 26 21 25 -
Sample B 27 30 28 31 22 36

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.

t- distribution: It is discovered by W.S.Gosset in 1908. The statistician Gosset


is better known by the pen name (pseudonym) ‘student’ and hence t-
distribution is called student’s t-distribution.
In practice, the standard deviation  is not known and in such a
situation the only alternative left is to use S, the sample estimate of standard
x
deviation  . Thus, the variate is approximately normal provided n is
S/ n
x
sufficiently large. If n is not sufficiently large (small) the varite is
S/ n
x 1
distributed as t and hence, t 
S/ n
where S 2  
(n  1) i
( xi  x ) 2 .

Properties of t- distribution:

(1) The shape of t- distribution is bell-shaped and is symmetrical about mean.


(2) The curve of t- distribution is asymptotic to the horizontal axis.
(3) It is symmetrical about the line t = 0.
(4) The form of the probability curve varies with degrees of freedom.
(5) It is unimodel with mean = median = mode.
(6) The mean of t- distribution is zero and variance depends upon the
parameter  , is called the degrees of freedom.
(7) The t- distribution with  degrees of freedom approaches standard normal
distribution as    ,  being a parameter.

The t- distribution is extensively used in hypothesis about one mean or single


mean, or about equality of two means or difference of means when  is known.

Some applications of t- distribution are:

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy