Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
67 views351 pages

PNS Notes

Uploaded by

f20230883
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)
67 views351 pages

PNS Notes

Uploaded by

f20230883
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/ 351

Probability & Statistics

BITS Pilani Dr. J. K. Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Normal to binomial distribution

2
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal to binomial distribution
Correction for continuity:
We take 0.5(half unit) for correction, i.e.,
Binomial Normal
P( X < b) P( X < b 0.5)
P( X b) P( X < b + 0.5)
P( X > a) P( X > a + 0.5)
P( X a) P( X > a 0.5)
P(a < X < b) P(a + 0.5 < X < b 0.5) 3
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal to binomial distribution

4
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal Approximation to the Binomial Distribution
The normal distribution can be used to approximate the
binomial distribution when n is large.

T heo rem : L et X b e b ino m ial w ith


param eter n an d p . For large n , X
is ap prox im ately n orm al w ith m ean
np and variance n p (1 - p ).

Question: How to define the largeness of n in practice ?


5
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal Approximation to the Binomial Distribution

A good rule of thumb for the normal approximation

For most practical purposes the approximation is


acceptable for values of n & p such that

Either p ≤ 0.5 & np > 5

Or p > 0.5 & n (1-p) > 5.

6
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal Approximation to the Binomial Distribution
Problem 1: If a random variable has the binomial distribution
with n = 30 and p = 0.60, use the normal approximation to
determine the probabilities that it will take on
(a) a value less than 12;
(b) the value 14;
(c) a value greater than 16.
Solution: µ = np = 18; 2 = np(1 - p) = 7.2; = 2.6833

(a) P (X < 12) = P ( X < 11.5) (using continuity correction)


11.5 18
= = ( 2.42) = 0.0078.
2.6833
7
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal Table

8
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal Approximation to the Binomial Distribution

(b) P( X = 14) = P(13.5 < X < 14.5) (using continuity correction)


14.5 18 13.5 18
=
2.6833 2.6833
= ( 1.3044) ( 1.677)
= 0.0968 0.0475 = 0.0493.

(c) P ( X > 16) = P ( X > 16.5) (using continuity correction)


16.5 18
= 1 P( X 16.5) = 1
2.6833
=1 ( 0.559) = 1 0.2912 = 0.7088.
9
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Problem 2

Item produced by a certain manufacturer is


independently of acceptable quality with
probability 0.95. Find the probability that at
most 10 of the next 150 item produced are
unacceptable.

10
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

11
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

12
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Problem 3
One thousand independent rolls of a fair
die will be made.
(a). Compute an approximation to the
probability that number 6 will appear
between 150 and 200 times inclusively.
(b). If number 5 appears exactly 200 times,
find the probability that number 6 will
appear less than 150 times.
13
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

14
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

15
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

16
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Problem 4
In 10,000 independent tosses of a coin, the
coin landed heads 5800 times. Is it
reasonable to assume that the coin is not
fair? Explain.

17
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

18
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Solution

19
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Probability & Statistics

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Statistics

• Descriptive statistics

• Inferential statistics

2/38
BITS Pilani, K K Birla Goa Campus
Inferential Statistics

1. Involves: Population?
Estimation
Hypothesis Testing
2. Purpose
Make Inferences
about Population
Characteristics

3/38
BITS Pilani, K K Birla Goa Campus
Inference Process

Estimates & Population


Hypothesis
tests

Sample
statistic
e.g., (X) Sample
4/38
BITS Pilani, K K Birla Goa Campus
Key terms

• Population
– All items of interest
• Sample or random sample
– Portion of population
• Parameter
– Summary Measure about Population
• Statistic
– Summary Measure about sample
5/38
BITS Pilani, K K Birla Goa Campus
Population and Sample

Population: refer to a population in term of its


probability distribution or frequency
distribution.
Population X or f(x) means a population described
by a probability distribution f(x).
Population might be infinite or it is impossible
to observe all its values even finite, it may be
impractical or uneconomical to observe it.

6/38
BITS Pilani, K K Birla Goa Campus
Sample

Sample: a part of population.


Random samples (Why we need?): such
results can be useful only if the sample is in
some way “representative”.
Negative example: performance of a tire if it is
tested only on a smooth roads; family incomes
based on the data of home owner only.

7/38
BITS Pilani, K K Birla Goa Campus
Sampling

• Representative sample
– Same characteristics as the population

• Random sample
– Every subset of the population has an equal
chance of being selected

8/38
BITS Pilani, K K Birla Goa Campus
Random sample

Definition (Random sample):


A set of observations
X1, X 2 , , X n
constitutes a random sample of size n from a
population or distribution X if
(a) X i 's are independent
(b) X i 's have same distribution as of X .
9/38
BITS Pilani, K K Birla Goa Campus
Statistic

Definition (Statistic):
A statistic is a random variable whose numerical
value can be determined from a random sample
i.e., a function of random sample.
Examples: n
(a) max {X i } (b) min {X i } (c) Xi
i =1
n
(d) Xi / n = X .
i =1
10/38
BITS Pilani, K K Birla Goa Campus
Sample mean

Definition:
Let X 1 , X 2 , , X n be a random sample
from the distribution of X . The statistic
n
Xi
i =1
is called the sample mean and is
n
denoted by X .
11/38
BITS Pilani, K K Birla Goa Campus
Sample variance and sample SD

Definition:
Let X 1 , X 2 , , X n be a random sam ple of size n
from the distribution of X . T he statistic
n
(Xi X )2
S2 = i =1
is called the sam ple variance
n 1
and the statistic S = S 2
is called sam ple
standard deviation.
12/38
BITS Pilani, K K Birla Goa Campus
Sample variance

Computation formula for sample variance:


n
2 2
Xi nX
S2 = i =1

n 1
n n 2

n. X i2 Xi
i =1 i =1
or S 2 =
n ( n 1)

13/38
BITS Pilani, K K Birla Goa Campus
Sampling Distribution

Mean and variance of sample mean:


If a random sample of size n is taken from
a population having the mean µ and the
variance 2 , then X is a random variable
whose distribution has the mean µ and
2
variance / n.

Stand ard deviation of X is and called


n
standard error of the mean. 14/38
BITS Pilani, K K Birla Goa Campus
Proof

15/38
BITS Pilani, K K Birla Goa Campus
Proof

16/38
BITS Pilani, K K Birla Goa Campus
Proof

17/38
BITS Pilani, K K Birla Goa Campus
Sampling Distribution

Mean of sample variance:

Theore m:
If a random sample of size n is taken from
a population having the mean µ and the
variance 2
, then E ( S 2 ) = 2
.

18/38
BITS Pilani, K K Birla Goa Campus
Probability & Statistics

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Recall

2/38
BITS Pilani, K K Birla Goa Campus
Sampling Distribution

Mean of sample variance:

Theore m:
If a random sample of size n is taken from
a population having the mean µ and the
variance 2
, then E ( S 2 ) = 2
.

3/38
BITS Pilani, K K Birla Goa Campus
Proof of the Theorem

4/38
BITS Pilani, K K Birla Goa Campus
Proof of the Theorem

5/38
BITS Pilani, K K Birla Goa Campus
Central limit theorem
Th eore m:
If X is the mean of a sample of size n taken
from a population having the mean µ and
variance 2 . Then for large n , X is
approximately normal with mean µ and
2
v ariance .
n
X µ
Hence is s ta ndard normal.
/ n 6/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem

As x =
sample n
sampling
size gets distribution
large becomes
enough almost
(n 25) ... normal.

X
µx = µ 7/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem
Example:
The mean length of life of a certain cutting tool is
41.5 hours, with a standard deviation of 2.5 hours.
What is the probability that a sample of size 50
drawn from this population will have a mean of
between 40.5 hours and 42 hours ?

Ans: 0.9184

8/38
BITS Pilani, K K Birla Goa Campus
Solution

9/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem
Example:
One has 100 light bulbs whose life times are
independent exponential with mean 5. If the bulbs
are used one at a time, with a failed bulb being
replaced immediately by a new one, what is the
probability that there is still a working bulb after
525 hours ?

Ans: 0.3085
10/38
BITS Pilani, K K Birla Goa Campus
Solution

11/38
BITS Pilani, K K Birla Goa Campus
Solution

12/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem
Example:
If X is a binomial random variable with parameters
n and p then X is approximately normal with mean
np and variance np(1-p).

13/38
BITS Pilani, K K Birla Goa Campus
Solution

14/38
BITS Pilani, K K Birla Goa Campus
Solution

15/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem
Example:
If X is a Poisson random variable with mean µ then
X is approximately normal with mean µ and
variance µ.

16/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem
Example:
If the number of people entering a store per hour is
Poisson distribution with parameter 100, how long
should the shopkeeper wait in order to get a
probability of 0.9 that more than 200 people have
entered in the store ?

17/38
BITS Pilani, K K Birla Goa Campus
Solution

18/38
BITS Pilani, K K Birla Goa Campus
Solution

19/38
BITS Pilani, K K Birla Goa Campus
Central Limit Theorem
Example:
A certain component is critical to the operation of
an electrical system and must be replaced
immediately upon failure. If the mean life time of
this type of component is 100 and its standard
deviation is 30 hours, how many of these
components must be in stock so that the
probability that the system is in continual operation
for the next 2000 hours is at least 0.95 ?
Ans: n=23. 20/38
BITS Pilani, K K Birla Goa Campus
Solution

21/38
BITS Pilani, K K Birla Goa Campus
Solution

22/38
BITS Pilani, K K Birla Goa Campus
Solution

23/38
BITS Pilani, K K Birla Goa Campus
Probability & Statistics

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Sampling Distribution

Distribution of sample variance:


T h eorem :
If a random sam ple of size n is taken from
a norm al population having the m ean µ
2
and the var iance , then the random
variable ( n 1) S 2 / 2 has a chi-squared
distribution w ith ( n - 1) degrees of freedom.

BITS Pilani, K K Birla Goa Campus


Sampling Distribution

Exam pl e:
T he claim that the variance of norm al
population 2 =21.3 is rejected if the
variance of a random sam ple of size 15
excess 39.74. W hat w ill be the probability
that the claim w ill be r eject ed e ven though
2
=21.3.

Ans: 0.025
BITS Pilani, K K Birla Goa Campus
Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


T- Distribution

Defi niti on:


Let Z be a standard normal variable and let
2
be an independent chi-squared random
variable with degrees of freedom. T he
Z
random variable T = is said to fol low
2
/
a T distribution wi th degrees of freedom.

BITS Pilani, K K Birla Goa Campus


T-distribution

BITS Pilani, K K Birla Goa Campus


T-distribution

t,

P(T t , )=

BITS Pilani, K K Birla Goa Campus


T- Distribution

T h eorem:
If a random sample of size n is taken from
a normal population having the mean µ
2
and the variance , then the random
X µ
variable follows a T distribution
S/ n
with ( n -1) d e g rees of freedom.

BITS Pilani, K K Birla Goa Campus


T-distribution

BITS Pilani, K K Birla Goa Campus


The sampling distribution of the
Mean (unknown variance )
If n is large, we can avoid the normality assumption. (In
this case t-distribution converges to standard normal.

Question: how about n is a small value?

We need to make the assumption that the sample comes


from a normal population the use T distribution if σ is
unknown otherwise use normal approximation.

BITS Pilani, K K Birla Goa Campus


T- Distribution

Exam p le:
A soft drink vending m achine is set in such w ay that
the am ount of drink dispensed is a norm al random
variable w ith m ean 200m l. If a random sam ple of
size 9 is obtained from such setu p w i th sam ple
standard deviation 15m l, w hat is the pro bability
that the average am ount dispensed is atm ost 205 m l ?

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


T- Distribution

Exam ple:
Let X be a population w ith m ean 4. If a random
sam ple of size 100 w ith sam ple variance 36, find
the probability that the sam ple m ean is less tha n 6.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Estimation: Chapter 6 and 7

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


ESTIMATION OF PARAMETERS
ESTIMATION:-
Procedure of estimating a Population
(Parameter) by using sample information is
referred as estimation.

i) POINT ESTIMATION
II) INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


POINT ESTIMATION

POINT ESTIMATE :
An estimate of a population parameter given by a
single number is called point estimate
POINT ESTIMATOR :
A point estimator is a statistic for estimating the
population Parameter and will be denoted by .

BITS Pilani, K K Birla Goa Campus


Point Estimator

Point estimator for the population mean µ :

Suitable estimator for µ could be the Sample mean


___
Hence µ= .

BITS Pilani, K K Birla Goa Campus


Example
Market researcher use the number of sentences per
advertisement as a measure of readability far magazine
advertisement. The following represents a random
sample of 54 advertisements. Find a point estimate of
the population mean µ
9,20,18,16,9,16,16,9,11,13,22,16,5,18,6,6,5,12,25,17,2,3,7,10,9,
10,10,5,11,18,18,9,9,17,13,11,7,14,6,11,12,11,15,6,12,14,11,4,9,
18,12,12,17,11,20.

Solution:
The Sample mean of Data = 671/54 =12.4. So, Point Estimate for the
mean length of all magazine
___
advertisement is 12.4 sentences and the
point estimator is .
BITS Pilani, K K Birla Goa Campus
UNBIASED ESTIMATOR
Unbiased Estimator:
A point estimator is said to be an unbiased estimator
for if E ( )= .

Biased Estimator: if E () .

Standard error of an estimator :

Good estimator: unbiased+ small variance

BITS Pilani, K K Birla Goa Campus


Unbiased Estimator

Example: The Sample mean


___
is an unbiased estimator for the
population mean.

Example: S2 is an unbiased estimator of population


variance.

BITS Pilani, K K Birla Goa Campus


Unbiased Estimator

Example: S is not an unbiased estimator of population


standard deviation.

BITS Pilani, K K Birla Goa Campus


Unbiased Estimator

( X X)
2
n
i
Example: is a biased estimator of population
i=1 n
variance.

BITS Pilani, K K Birla Goa Campus


Unbiased Estimator

Example: If X is b( n, p ) then
X
(a) is an unbiased for p.
n

X + n /2
(b) is an unbiased for p iff p = 0.5.
n+ n

BITS Pilani, K K Birla Goa Campus


Unbiased Estimator
Example: If X is b ( n, p ) then
X+p n
is an unbiased for p.
n+ n

BITS Pilani, K K Birla Goa Campus


Unbiased Estimator
Example: If X i for 1 i n constitute a
random sample from the population given by
e(x
, x>
)
f ( x) =
0, otherwise.
Find an unbiased estimator for .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Estimation: Chapter 6 and 7

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Methods For Finding Estimators
Method of Moments: Using the k-th moment
n
as M k = E ( X ) = X i k / n, we estimate the
k

i =1
parameters in terms of moments.

BITS Pilani, K K Birla Goa Campus


Method of Moments
Exam ple: If X is ( , ). U sing m ethod
of m om ents find estim ators for an d .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of Moments
Exam ple : If X is N ( µ , 2
). U sing m ethod
of m om ents find estim ators fo r µ an d 2
.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of Moments
Exam ple : If X is U ( a , a ). U sing m ethod
of m om ents find an est im a tor for a .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Likelihood Function
Likelihood Function:
Let X 1 , X 2 , , X n be a random sample of size n
from a population with density function f ( x )
and parameter . Then the likelihood function
for the sample value X 1 , X 2 , , X n is denoted by
L( ), and defined as
n
L( ) = f ( xi )
i =1

BITS Pilani, K K Birla Goa Campus


Likelihood Function

BITS Pilani, K K Birla Goa Campus


Method of Maximum Likelihood

Method of Maximum Likelihood:

We maximize the likelihood function with


respect to the parameter θ and then the
statistic at which the likelihood function gives
maximum is called maximum likelihood
estimator for θ.

BITS Pilani, K K Birla Goa Campus


Method of maximum likelihood
1
Exa m ple: If X is an exponential w ith m ean .

U sing m ethod of M L find an estim a tor for .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of maximum likelihood
Exam pl e : If X is B ( n , p ). U sing m ethod
of m axim um likelihood (M L) find an
estim ators f or p .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of maximum likelihood
Exam ple : If X is U [0, ]. U sing m ethod
of M L find an estim ator for .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of maximum likelihood
Exam pl e : If X is P oisson ( ). U sing m ethod
of M L find estim a tor fo r .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of maximum likelihood
Exam pl e: Find the M L estim ator for a if the
population is given by f ( x ) = ( a + 1) x a , 0 < x < 1 .

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Method of maximum likelihood
Exam ple: If X is N ( µ , 2
). U sing m ethod
of M L find estim ators fo r µ an d 2
.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Estimation: Chapter 6 and 7

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

By using point estimation ,we may not get desired


degree of accuracy in estimating a parameter.
Therefore , it is better to replace point estimation
by interval estimation.

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION
Interval estimate:
An interval estimate of an unknown parameter is an interval
of the form L1 ≤ θ ≤ L2, where the end points L1 and L2
depend on the numerical value of the statistic and or
parameter of population distribution.

100(1-α)% Confidence Interval:


A 100(1-α)% confidence interval for a parameter θ is a
random interval of the form [L1 , L2] such that
P(L1 L2 ) = 1 .
BITS Pilani, K K Birla Goa Campus
INTERVAL ESTIMATION
Defin it ion: [100(1 - )% confidence interval for
µ when is known]:
Let X 1 , X 2 , , X n be a random sample of size
n (large) from a popu lation with mean µ and
2
variance . A 100(1 - )% confidence interval

fo r µ is X z /2 , X+z /2 .
n n
Note: If n is small assume the sample from n ormal.

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION
Example:
A random sample of size 100 is taken from
a population with mean µ and =0.5. If the
sample mean is 0.75, find a 95% confidence
interva l for µ .

An s: (0.652 , 0.848).

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION
Ex ample :
A random sample of size n is taken from
a population with mean µ and 2
=20. How
large n should choose with 90% confidence
that the random interval (X 2, X + 2 )
inclu de s µ .

Ans: n 1 4.
BITS Pilani, K K Birla Goa Campus
INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

D efin itio n : [1 0 0 (1 - )% co n fid en ce in terval fo r


µ w hen is u n k n o w n ] :
L et X 1 , X 2 , , X n b e a ran d o m sam p le o f size
n fro m a n o rm al p o p u latio n w ith m ean µ an d
2
varian ce . A 1 0 0 (1 - )% co n fid en ce in te rval
S S
f o r µ is X t / 2 ,n 1 , X+t / 2 ,n 1 .
n n

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION
Example:
A signal is transmitted from location A to B.
The value received at location B is nornally
distributed with mean µ and variance 2
.A
particular value is transmitted 9 times. Find t he
95% c on fidence interval for µ , when the values
received are 5, 8.5, 12, 15, 7, 9, 7.5, 6.5, and 10 .5.

Ans: (6.010, 11. 98 93).


BITS Pilani, K K Birla Goa Campus
INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

N o te: [1 0 0 (1 - )% co n fid en ce in t erval fo r


µ w h en is u n k n o w n ] :
L et X 1 , X 2 , , X n b e a ran d o m sam p le o f size
n (n is larg e) fro m a p o p u la tio n w ith m ean µ an d
2
va rian c e . A 1 0 0 (1 - )% co n fid en ce in terval
S S
fo r µ is X z /2 , X+z /2 .
n n

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

Examp le:
A random sample of size 80 is taken from
a population with mean µ and S 2 = 30.85.
If the sample mean is 18.85, construct a
99% confidence interval for µ .

Ans: (17 .0214 , 20 .6786).

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION
2
Definition: [100(1 - )% confidence interval for ]:
Let X 1 , X 2 , , X n be a random sample of size
n from a normal population with mean µ and
2
variance . A 100(1 - )% confidence interval
2 2
2 ( n 1) S ( n 1) S
for is 2
, 2
.
/ 2,n 1 1 / 2,n 1

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

Examp le:
An optical firm purchases glass for making
lenses. Assume that the refractive index of 20
pieces of glass have a variance of 0.00012.
2
Find a 95% confidence interval for .

BITS Pilani, K K Birla Goa Campus


INTERVAL ESTIMATION

BITS Pilani, K K Birla Goa Campus


Problem
To estimate the average time it takes to assemble a certain
Computer component, the industrial engineer at an electronic firm
timed 40 technicians in the performance of this task, getting a
mean of 12.73 minutes and a standard deviation 2.06 minutes.

(a) What can we say with 99% confidence about the maximum
error if is used as a point estimate of the actual average time
required to do this job?

(b) Use the given data to construct a 98% confidence interval for
the true average time it takes to assemble the computer
component.

BITS Pilani, K K Birla Goa Campus


Interval Estimation (cont’d)
Solution: Given x = 12.73,s = 2.06 and n = 40
(a) x = 12.73 and (1 - ) = 0.99 = 0.01
Since sample is large (n = 40) The maximum error of estimation with
99% confidence is
s s 2.06
E=z /2 = z0.005 = 2.575 = 0.839
n n 40
(b) 98% confidence interval (i.e. = 0.02 ) is given by
s s
x z0.01 < µ < x + z0.01
n n
2.06 2.06
12.73 2.33 < µ < 12.73 + 2.33
40 40
11.971 < µ < 13.489.
BITS Pilani, K K Birla Goa Campus
Problem
With reference to the previous problem with what confidence we
can assert that the sample mean does not differ from the true
mean by more than 30 seconds.

Solution: Given E = 30 seconds = 0.5 minute, s = 2.06, n = 40


and we have to get value of (1 - ).
s n 40
E=z /2 z /2 =E z /2 = (0.5) = 1.54
n 2.06

F (z /2 ) = F (1.54) = 0.9382 (from Table 3)

= 1 0.9382 = 0.1236 1 = 0.8764


2
Thus, we have 87.64% confidence that the sample mean does not duffer
from the true mean by more than 30 seconds.

BITS Pilani, K K Birla Goa Campus


Chapter-7: Problems on
Confidence interval
BITS Pilani Dr. Jajati Keshari Sahoo
Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Problem-1
Let X be a random variable with density
f ( x ) = cx , 0 < x < 1. Using method of moments
a

find an estimator for a.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-2
A signal having value µ is transmitted from location A.
The value received at location B is normally distributed
with mean µ and variance 4. A particular value is
transmitted 9 times. Find the 99% con fidence interval
for the transmitted data µ when the successive values
received are 5, 8.5, 12, 15, 7, 9, 7.5, 6.5 and 10.5

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-2
The value received from location A at location B
is normally distributed with mean µ and variance 2
.
A particular value is transmitted 9 times. Find the
99% confidence interval
for 2 when the succes sive values received are
5, 8.5, 12, 15, 7, 9, 7.5, 6.5 and 10.5

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-3
The mean weight loss of 16 grinding balls after
a certain length of time in a mill slurry is 3.42
grams with a standard deviation of 0.68 grams.
Construct a 99 percent confidence interval for
the true mean weight loss of such grinding balls
under the stated conditions. (Assume normality)

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Probability & Statistics,

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Joint Distributions
• In many statistical investigations, one is
frequently interested in studying the
relationship between two or more random
variables, such as the relationship between
annual income and yearly savings per family
or the relationship between occupation and
hypertension.

2
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
For two discrete random variables X and Y, the
probability that X will take the value x and Y will take
the value y is written as P(X = x, Y = y).

Consequently, P(X = x, Y = y) is the probability of the


intersection of the events X = x and Y = y.

If X and Y are discrete random variables, the function


given by fXY(x, y) = P(X = x, Y = y) for each pair of values
(x, y) within the range of X and Y is called the joint
probability distribution or joint density function of X
and Y.
3
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Necessary and Sufficient conditions for a
function to be act as joint discrete density

1. f X Y ( x , y ) 0,
2. f ( x , y ) = 1.
all x all y

4
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

Joint cumulative distribution function:


If X and Y are discrete random variables, the
function given by
F ( x, y ) = P ( X x, Y y) = f ( s, t )
s x t y
is called the joint distribution function, or the joint
cumulative distribution of X and Y.

5
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Marginal distribution: If X and Y are discrete random
variables with joint density f (x, y) then

P( X = x) = f X ( x) = f ( x, y )
all y

is called the marginal distribution of X.

Similarly, P(Y = y ) = fY ( y ) = f ( x, y )
all x

is called the marginal distribution of Y.


6
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Marginal distribution:

7
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Mean:
For given random variables X, and Y with joint
density function f(x, y) the function H(X, Y) is also a
random variable.

The random variable H(X, Y) has expected value, or mean,


given by
E[ H ( X , Y )] = H ( x, y ) f ( x, y )
all x all y

provided this summation exists.


8
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Univariate Averages Found Via the Joint Density

E[ X ] = xf ( x , y )
all x all y

E [Y ] = yf ( x , y )
all x all y

1-Feb-21 9
BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Mean:

10
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Mean:

11
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Example 1:

A coin is tossed 3 times. Let Y denotes the


number of heads and X denotes the absolute
difference between the number of heads and
tails. Find the joint density of X and Y

12
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

13
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Solution 1:
y
f(x,y) 0 1 2 3 f X ( x)
1 0 3/8 3/8 0 3/4
x
3 1/8 0 0 1/8 1/4
fY ( y ) 1/8 3/8 3/8 1/8 1

14
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Example 2: Two scanners are needed for an experiment.
Of the five, two have electronic defects, another one
has a defect in memory, and two are in good
working order. Two units are selected at random.
(a) Find the joint probability distribution of X (the
number with electronic defects) and Y (the number
with a defect in memory.
(b) Find the probability of 0 or 1 total defects among the
two selected.
(c) Find the marginal probability distribution of X.
(d) Find mean of Y.
15
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
Solution: (a)
2 1 2
w here x = 0,1, 2 and y = 0,1
x y 2 x y
f ( x, y ) = 0 x+ y 2
5
2

The joint distribution table:


f(x,y) y fX(x)
0 1
0 0.1 0.2 0.3
x 1 0.4 0.2 0.6
2 0.1 0.0 0.1
fY(y) 0.6 0.4 1
16
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
(b) Let A be the event that X + Y equal to 0 or 1
P(A) = f ( 0 , 0 ) + f ( 0 , 1) + f (1, 0 )
= 0 .1 + 0 .2 + 0 .4 = 0 .7
(c) The marginal probability distribution of X is given by
y =1
f X ( x) = f ( x , y ) = f ( x , 0) + f ( x ,1)
y =0

f X (0) = f (0, 0) + f (0,1) = 0.1 + 0.2 = 0.3


f X (1) = f (1, 0) + f (1,1) = 0.4 + 0.2 = 0.6
f X (2) = f (2, 0) + f (2,1) = 0.1 + 0.0 = 0.1
1-Feb-21 17
BITS Pilani, K K Birla Goa Campus
Discrete joint distributions
(d) The mean of Y is given by
2 1
E (Y ) = yf ( x, y )
x=0 y =0
2
= f ( x,1)
x =0

= f (0,1) + f (1,1) + f (2,1)


= 0.2 + 0.2 + 0.0 = 0.4

18
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous joint distributions
There are many situation in which we describe an
outcome by giving the value of several continuous
variables.
For instance, we may measure the weight
and the hardness of a rock, the volume, pressure
and temperature of a gas, or the thickness, color,
compressive strength and potassium content of a
piece of glass.

19
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous joint distributions
Definition:
Let X and Y be continuous random variables. A
function f XY such that
1. f XY ( x, y ) 0

2. f XY ( x, y ) dydx = 1

b d
3. P[a X b and c Y d] = f XY ( x, y )dydx
a c

is called the joint density for ( X , Y ). 20


1-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous joint distributions
The joint cumulative distribution function of X and Y,
is defined by
F(x, y) = P( X x,Y y)
x y
= f (s, t)dtds
Also partial differentiation yields
2
f ( x, y ) = F ( x, y )
x y
whenever these partial derivatives exists.
1-Feb-21 21
BITS Pilani, K K Birla Goa Campus
Continuous joint distributions
Marginal densities: If X and Y are continuous random
variables with joint density f (x, y) then

f X ( x) = f ( x, y )dy

is called the marginal distribution of X.

Similarly, fY ( y ) = f ( x, y ) dx

is called the marginal distribution of Y.


22
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous joint distributions
Mean:
For given random variables X, and Y with joint
density function f(x, y) the function H(X, Y) is also a
continuous random variable.

The random variable H(X, Y) has expected value, or mean,


given by
E[ H ( X , Y )] = H ( x, y ) f ( x, y )dydx
provided this integral exists.
23
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Univariate Averages Found Via the Joint Density

E[ X ] = xf ( x, y )dydx

E [Y ] = yf ( x , y ) dydx

1-Feb-21 24
BITS Pilani, K K Birla Goa Campus
Continuous distributions
Independent Random Variables
Definition: Let X and Y be two random variables with
joint density f (x, y) and marginal densities fX(x) and
fY(y) respectively then X and Y are independent
if and only if

f ( x, y ) = f X ( x ) fY ( y ).

25
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Example-3
The joint density for ( X , Y ), is given by
xy , 0 < x < 1, 0 < y < 2,
f ( x, y ) =
0, elsewhere.
Calculate (a) f ( x ) , f ( y )
(b) P[ X < 1 Y < 1]
(c) P[ X + Y < 1].
(d) Are X and Y independent ? 26
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

27
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

28
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

29
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

30
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

31
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

32
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

33
1-Feb-21 BITS Pilani, K K Birla Goa Campus
Probability & Statistics,

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Continuous distributions
Example-4
The joint density for ( X , Y ), is given by
1.72
f ( x, y ) = , 27 y x 33
x
Calculate (a) f ( x ) , f ( y )
(b) P[ X 30 and Y 32]
(c) Are X and Y independent ?
2
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

3
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

4
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

5
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

6
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

7
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

8
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Example-5
Two points are selected randomly on a line
of length L so as to be on opposite sides of
the midpoint of the line. find the probability
that the distance between the two points is
greater than L / 3.
Ans:0.77
9
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

10
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

11
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

12
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Example-6
A man and woman decide to meet at a certain
location. If each person independently arrives
at a time uniformly distributed btween 10.00
and 11.00AM, find the probability that the
first to arrive has to wait atleast 10 minutes.
Ans: 25/36
13
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

14
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

15
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Conditional density
Definition: Let X and Y be two random variables with
joint density f (x, y) and marginal densities fX(x) and
fY(y) respectively. Then the conditional density of X
given Y=y is defined as

f ( x, y )
f X |y ( x) = , provided f Y ( y ) > 0.
fY ( y )
16
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Conditional density
Definition: Let X and Y be two random variables with
joint density f (x, y) and marginal densities fX(x) and
fY(y) respectively. Then the conditional density of Y
given X=x is defined as
f ( x, y )
fY |x ( y ) = , provided f X ( x ) > 0.
f X ( x)

17
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Conditional means
Definition: The the conditional mean of X given Y=y
is defined as
µ X | y = E X |Y = y

xf X | y ( x ) d x if co n tin u o u s,
=
xf X | y ( x ) if d iscrete.
all x

18
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Conditional means
Definition: The the conditional mean of Y given X=x
is defined as
µ Y | x = E [Y | X = x ]

yf Y | x ( y ) d y if co n tin u o u s,
=
yf Y | x ( y ) if d iscrete.
all y

19
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Curves of regression
Definition 1:
T he graph of µ X | y is called curve of
regression of X on Y .
Definition 2:
T he graph of µ Y | x is called curve of
regression of Y on X .
20
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Example-7
If the joint density of X and Y is given by
1
f ( x , y ) = , 0 < y < x < 1.
x
(a) Find condtional densities.
(b) Find conditional means.
(c) Find curves of regressions.
(d) Are X and Y independent ?
21
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

22
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

23
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

24
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Example-8
If the joint density of X and Y is given by
1
f ( x, y ) = , 1 y x 4.
10
(a) Find condtional densities.
(b) Find conditional means.
(c) Find curves of regressions.
(d) Are X and Y independent ?
25
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

26
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

27
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

28
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

29
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

30
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Covariance
Definition:
L et X a n d Y b e tw o ran d o m v ariab le s w ith
m ean s µ X an d µ Y res p ec tiv ely. T h e
co varian ce o f X an d Y is d efin ed as
C o v ( X , Y ) = E [( X µ X )( Y µ Y ) ].

C omputation formula for Covari ance:


Cov( X , Y ) = E [ XY ] E [ X ] E [Y ].
31
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

32
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Theorems:
Theorem 1:
Let X and Y be any two random variables, then
Var( X + Y ) = Var( X ) + Var(Y ) + 2Cov( X , Y ).
Theorem 2:
If X and Y are independent then
E [ XY ] = E [ X ] E [Y ].
33
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Discrete joint distributions

34
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Observations:
If X and Y are independent then Cov(X,Y)=0.
Cov(X,Y)=0 does not imply that X and Y are
independent
y
Example 12:
f(x,y) 1 -1 f(x)
x 1 0.5 0.5 1
f(y) 0.5 0.5 1
Here X = Y 2 , E ( X ) = 1, E ( XY ) = 0, E (Y ) = 0.
35
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Observations:
Example 13:
Suppose X U (-1, 1) and Y = X 2 (so X
and Y are clearly dependent).
1
x
But E[ X ] = dx = 0 and
1
2
1 3
x
E[ XY ] = E[ X 3 ] = dx = 0,
1
2
so Cov( X , Y ) = E[ XY ] - E[ X ]E[Y ] = 0.
36
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Correlation:
Definition:

Let X and Y be tw o random variables.


T he correlation betw een X and Y is
Cov( X , Y )
defined as = .
V ar( X )V ar(Y )

37
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions
Example-14
If the joint density of X and Y is given by
1
f ( x, y ) = , 20 < y < x < 40.
200
(a) Find Cov( X , Y ).
(b) Find correlation of X and Y .

38
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Continuous distributions

39
5-Feb-21 BITS Pilani, K K Birla Goa Campus
Chapter-8: Testing of Hypotheses

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


TEST OF HYPOTHESIS

There are many problems in which, rather than estimating the


value of a parameter, we need to decide whether to accept
or reject statement about the parameter.

For e.g.
a) The teaching method in the institutes are effective
b) The average IQ of normal human being is 113

BITS Pilani, K K Birla Goa Campus


Hypothesis

Definition:
A statistical hypothesis is a statement
about the nature of the population.

BITS Pilani, K K Birla Goa Campus


Hypothesis

We categorise by the following:


Hypothesis

Null Hypothesis (H 0 ) Alternative Hypothesis(H a )

BITS Pilani, K K Birla Goa Campus


Type of Hypothesis
Null Hypothesis H0

It is a statistical hypothesis that contains a statement of

or =
equality such as
,
Alternate Hypothesis H1

It is a statement that must be true when H0 is false and


it contains a statement of inequality such as

< , > or

BITS Pilani, K K Birla Goa Campus


Setting the Null and Alternative Hypothesis
E xam ple:
If a person having no crim inal record is suspected
for a crim e. W hat w ill be the null and altenative
hypothesis for a judge w ho is trying this suspect ?
Ans:
H 0:

H a:

BITS Pilani, K K Birla Goa Campus


Setting the Null and Alternative Hypothesis

E xam pl e:
If a m anufactur claim s that his new developed
device can detect a certain desease, abo ut 95% .
W hat w ill be the null and alternative hypothesis
for a perspective buyer ?
Ans:
H 0:

H a:

BITS Pilani, K K Birla Goa Campus


Setting the Null and Alternate Hypothesis

Example:
A Manufacturer of new drug claims that his drug cures at
least 90% patients of certain disease. A prospective buyer
has to take decision to buy or not to buy the new drug. State
the two statements for the prospective buyer.

Ans: Let p be the proportion of the patients of this disease


cured by the new drug out of those who are treated by
the new drug. So
H0: p ≤ 0.90
Ha : p > 0.90

BITS Pilani, K K Birla Goa Campus


Testing of Hypotheses

Definition:
The procedure of formulating a decission rule
to reject or accept H 0 based on the sample data
is called hyposesis testing.

BITS Pilani, K K Birla Goa Campus


Testing of Hypothesis
When we perform a hypothesis testing
we make one of the two decisions:

i) Reject the null hypothesis or


ii) Accept the null hypothesis

As our decision is based on the sample rather


than the entire population there is always
possibility we will make wrong decision.

BITS Pilani, K K Birla Goa Campus


TYPES OF ERROR
In testing a statistical hypothesis, we will encounter
two types of errors:

H0 is True H0 is False or
Ha is True
Accept H0 Correct decision Type II error
Reject H0 Type I error Correct decision

BITS Pilani, K K Birla Goa Campus


TERMINOLOGY
Type I error: The error is made when the null
hypothesis rejected even it is true.

Type II error: The error is made when the null


hypothesis (H0) accepted when it false (or Ha is true).

Size of the test / Level of significance of the test /


Alpha (α):
α = Probability of committing Type-I error.
= P(Rejecting H0 when H0 is true)

BITS Pilani, K K Birla Goa Campus


TERMINOLOGY
Beta (β):
β = Probability of committing Type-II error.
= P(Accepting H0 when Ha is true)
Power of the Test (1-β):
1−β = P(Rejecting H0 when Ha is true)

Test Statistic: The decision is made based on the value


of some statistic and the corresponding statistic is
called test statistic.

Critical or Rejection region: The values of the test


statistic on which the null hypothesis is rejected.
BITS Pilani, K K Birla Goa Campus
Problem

A process for making steel pipe is under control if the


diameter of the pipe has a mean of 3.0000 inches with a
standard deviation of 0.025 inch. To check whether the
process is under control, a random sample of size n = 30 is
taken each day and the null hypothesis µ = 3.0000 is
rejected if X is less than 2.9960 or greater than 3.0040. Find

(a) The probability of a Type I error

(b) The probability of a Type II error when µ = 3.0050 inches.

BITS Pilani, K K Birla Goa Campus


Solution

Solution: n = 30, µ = 3.0000, = 0.0250


(a ) = P (Type I error) = P( X < 2.9960 or X > 3.0040)
= P( X < 2.9960) + P( X > 3.0040)
X µ 2.9960 3.0000 X µ 3.0040 3.0000
=P < +P >
/ n 0.0250 / 30 / n 0.0250 / 30
= P(Z < 0.876) + 1 P( Z < 0.876)
X µ
since will be random variable with approximately
/ n
standard normal distribution.
= F ( 0.876) + 1 F (0.876) = 2 F ( 0.876) = 0.381
BITS Pilani, K K Birla Goa Campus
Solution

(b) = P(Type II error) = P(2.9960 < X < 3.0040) (when µ = 3.0050)


2.9960 3.0050 X µ 3.0040 3.0050
=P < <
0.0250 / 30 / n 0.0250 / 30
= P( 1.97 < Z < .219)

= F ( .219) F ( 1.97)
= 0.4133 0.0244 = 0.3889
X µ
since will be random variable with approximat ely
n/
standard normal distributi on.

BITS Pilani, K K Birla Goa Campus


Chapter-8: Testing of Hypotheses

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Problem

Suppose X has Poisson distribution with


parameter . To test H 0 : = 0.1 versus
Ha : > 0.1, the following procedure is
used: A random sample of size 20 is taken
20
from X and H 0 is rejected if Xi 4.
i =1

Find and (when = 0.2).

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Hypothesis testing: General Form

Hypothesis Concerning On Mean


Example (Type-1): H 0 : µ k or H 0 : µ = k
Ha : µ > k Ha : µ > k
(called Ri ght -tailed test)
Example (Type-2): H 0 : µ k or H 0 : µ = k
Ha : µ < k Ha : µ < k
(called Left-tailed test)
Example (Type-3): H 0 : µ = k
Ha : µ k
(called Two-tailed test )
BITS Pilani, K K Birla Goa Campus
Hypothesis Concerning On Mean
when variance is known
Test concerning on mean for large sample and known

Critical Regions for testing on population mean when known)

Alternative Critical Region:


hypothesis
µ < µ0 C={ Z : Z < - z }
µ >µ0 C={ Z : Z > z }
µ µ0 C={ Z : Z < - z /2 or Z > z /2 }

X µ0
where Z = is called the test statistic.
/ n
BITS Pilani, K K Birla Goa Campus
BITS Pilani, K K Birla Goa Campus
BITS Pilani, K K Birla Goa Campus
BITS Pilani, K K Birla Goa Campus
Hypothesis Concerning On Mean
when variance is known
Note:
In Previous Test we assume the sample size is large
( in practice, large means n ≥ 30)

If the sample size is small (say n < 30) and is


known then we can not use previous critical regions
but if population is normal then same critical region
will work.

BITS Pilani, K K Birla Goa Campus


Hypothesis Concerning On Mean
Example: According to the norms established for mechanical
aptitude test, persons who are 18 years old should average
73.2 with a standard deviation of 8.6. If 45 randomly selected
persons of that age averaged 76.7, test the null hypothesis µ =
73.2 against the alternative hypothesis µ > 73.2 at the 0.01
level of significance.
Solution: Given µ0 = 73.2
1. Null hypothesis H0: µ = 73.2 Alternative hypothesis Ha: µ > 73.2
2. Level of significance: = 0.01
3. Criterion: Using a normal approximation for the distribution of
the sample mean we reject the null hypothesis when
Z > z = 2.33 where
X µ0
Z= .
/ n
BITS Pilani, K K Birla Goa Campus
Hypothesis Concerning On Mean

4. Calculations: Given µ0 = 73.2, = 8.6,


n = 45 and X = 76.7
76.7 73.2
Z= = 2.73
8.6 / 45

5. Decision: Since Z = 2.73 > 2.33, the null


hypothesis that µ = 73.2 is rejected at the
0.01 level of significance.

BITS Pilani, K K Birla Goa Campus


BITS Pilani, K K Birla Goa Campus
Hypothesis Concerning On Normal
Mean when variance is unknown
Test concerning on mean of Normal population for any
Sample size and unknown
Critical Regions for testing on normal mean when unknown)

Alternative Critical Region:


hypothesis
µ < µ0 C={ Tn-1 : Tn-1 < - t }
µ >µ0 C={Tn-1 : Tn-1 > t }
µ µ0 C={Tn-1 : Tn-1 < - t /2 or Tn-1 > t /2 }

X µ0
where Tn 1 = is called the test statistic.
S/ n
BITS Pilani, K K Birla Goa Campus
Hypothesis Concerning On Normal
Mean when variance is unknown
Note:
In Previous Test we assume the population has
normal distribution.

If the sample size is large (say n ≥ 30), population is


non normal and is unknown then we can still use
the previous normal critical regions. This means we
can scrap the assumption normality when n is large.

BITS Pilani, K K Birla Goa Campus


Hypotheses Concerning On Mean
Example: Test run with 6 models of an experimental engine
showed that they operated for 24, 28, 21, 23, 32 and 22
minutes with a gallon of a certain kind of fuel. If the
probability of Type I error is 0.01, is this evidence against a
hypothesis that on the average this kind of engine will operate
for at least 29 minutes per gallon with this kind of fuel?
Assume normality.
Solution:
Given n = 6, x1 = 24, x2 = 28, x3 = 21, x4 = 23, x5 = 32, x6 = 22.

X = 25 and S = 4.195

BITS Pilani, K K Birla Goa Campus


Hypotheses Concerning On Mean

1. Null hypothesis H0: µ 29


Alternative hypothesis H1: µ < 29
2. Level of significance: = 0.01
3. Criterion: Assuming the population is normal we can
use the critical region as
C={ Tn-1 : Tn-1 < - t } where

X µ0
Tn 1 = .
S/ n

BITS Pilani, K K Birla Goa Campus


Hypothesis Concerning On Mean

4. Calculations: Given µ0 = 29, S = 4.195


n = 6, X = 25, and t = t0.01 = 3.365.
25 29
T5 = = 2.336.
4.195 / 6

5. Decision: Since T5 = -2.336 > -3.365, the


null hypothesis that µ = 29 is accepted at
the 0.01 level of significance.

BITS Pilani, K K Birla Goa Campus


Five steps of hypothesis testing
We formulate a null hypothesis and an appropriate
alternative hypothesis
We specify the probability of a type I error; if possible,
desired or necessary we may also specify the probabilities
of Type II errors for particular alternatives.
Based on the sampling distribution of an appropriate
statistic, we construct a criterion for testing the null
hypothesis against the given alternative.
We calculate from the data the value of the statistic on
which the decision is to be based.
We decide whether to reject the null hypothesis or
whether to fail to reject it.
NOTE: Large sample (In practice, n ≥ 30).

BITS Pilani, K K Birla Goa Campus


Chapter-8: Problems on Testing of
Hypotheses
BITS Pilani Dr. Jajati Keshari Sahoo
Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Hypothesis Concerning On Mean
when variance is known
Test concerning on mean for large sample and known

Critical Regions for testing on population mean when known)

Alternative Critical Region:


hypothesis
µ < µ0 C={ Z : Z < - z }
µ >µ0 C={ Z : Z > z }
µ µ0 C={ Z : Z < - z /2 or Z > z /2 }

X µ0
where Z = is called the test statistic.
/ n
BITS Pilani, K K Birla Goa Campus
Hypothesis Concerning On Normal
Mean when variance is unknown
Test concerning on mean of Normal population for any
Sample size and unknown
Critical Regions for testing on normal mean when unknown)

Alternative Critical Region:


hypothesis
µ < µ0 C={ Tn-1 : Tn-1 < - t }
µ >µ0 C={Tn-1 : Tn-1 > t }
µ µ0 C={Tn-1 : Tn-1 < - t /2 or Tn-1 > t /2 }

X µ0
where Tn 1 = is called the test statistic.
S/ n
BITS Pilani, K K Birla Goa Campus
Problem-1

Test the null hypothesis H 0 : µ = 0.34versus the


alternative hypotheis H a : µ 0.34, with standard
deviation 0.01 at 0.05 level of significance when
a sample of size 35 is tested, giving mean 0.343.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-2

According to the norms established for a reading


comprehenshive test, eighth graders should
average 84.3 with a standard deviation of 8.6. If
45 randomly selected eighth grader from a certain
school average 87.8, test the null hypothesis
H 0 : µ 84.3 versus H a : µ > 84.3 at 0.01 level
of significance.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-3
Test the null hypothesis H 0 : µ = 22000 miles versus
the alternative hypotheis H a : µ < 22000 miles at 0.05
level of significance when the mean of 100 tyres made
by a certain manufacturer lasted on an average 21819
miles with a standard deviation of 1295.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-4

Suppose the life-length of certain device is follows


a normal distribution with mean 180 hours. If 5
randomly selected such devices have a mean 169.5
hours with a standard deviation 5.7 hours, test the
null hypothesis H 0 : µ = 180 versus H a : µ < 180
at 0.01 level of significance.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-5
A trucking firm suspects the claim that the average
lifetime of certain tyres is atleast 28000 miles. To
check the claim, the firm puts 40 of these tyres on
its trucks and gets a mean of 27463 miles with a
standard deviation of 1343 miles. What can it conclude
if = 0.01 and the lifetime of such tyres is a normal
random variable ?

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Problem-6

To test H 0 : µ = 40 versus H a : µ > 40, where


µ is the mean of a normal population with variance
36, the critical region based on a random sampme
of size 25 is C = { X 43} is used. Find
(a)
(b) when µ = 44.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Linear Regression

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Curve of Regression

Definition( Recall): Let ( X , Y ) be a


2-dimensional random variable. The graph
of the mean value of Y given X = x, denoted
by µY | x is called the curve of regression
of Y on X .

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

Assumption:
X is a mathematical variable rather random variable.
Example: Suppose we are developing a model to describe
the temperature of the dept water in the sea. Since
temperature depends in part on the depth of the water, 2
variables are involved; X=depth, Y=temperature. We are not
interested in making inferences on the depth of the water. With
X(depth) fixed, the temperature measurements(Y) at different
places (of depth X) varies.

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

In the graph of µY | x , here Y depends on X and is called


the dependent or response variable. The variable X
whose value is used to help predict the behaviour of Y |x
is called the independent or predictor variable or the
regressor.

Sometimes the values of X used can be preselected and in this


case the study is said to be controlled , otherwise it is called
observational study.
BITS Pilani, K K Birla Goa Campus
Linear Curve of Regression

Linear Curve of Regression of Y on X is given by


µY |x = 0 + 1 x, 0 , 1

0 denotes the intercept and


1 denotes the slope of the regression line.

We need to estimate the value of 0 and 1 .


BITS Pilani, K K Birla Goa Campus
Linear Curve of Regression

Let x1 , x2 ,..., xn be n values of X (these points are assumed


to be measured without error) We are concerned with the n
random variables,
Y |x1 , Y |x2 ,..., Y |xn .

A random variable varies about its mean value.


Let Ei = Y |xi µY |x
i

Y |xi = Ei + µY |x
i

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression
We assume that the random difference Ei has mean 0.
Since we are assuming that the regression is linear we can
conclude that
µY|x = 0 + x
1 i
i

Therefore,

Yi = 0 + x + Ei
1 i Simple Linear Regression Model
where Yi = Y xi
and Ei is assumed to be a random
variable with mean 0.
BITS Pilani, K K Birla Goa Campus
Linear Curve of Regression
So now we have a data consisting of a collection of
n pairs ( xi , yi ), where xi is an observed value of the
variable X and yi is the corresponding observation
for the random variable Yi . The observed value usually
differs from its mean value by some random amount.
This idea is mathematically expressed by writing
yi = 0 + x +
1 i i

i corresponds to Ei when Yi takes value yi

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

We draw a scattergram (plot of the points in the


xy -planes) and if a linear regression is applicable,
the points should exhibit a linear trend. Since we
do not know the true values for 0 and 1 , we
shall not know the true value for i (vertical distance
from the point ( xi , yi ) to the regression line).

BITS Pilani, K K Birla Goa Campus


Scatter Diagram
Hours Test Scatter Plot
Studied x Score y
100
4 31
90
9 58 80
70
10 65

Test sco re
60
14 73 50
40
4 37
30
7 44 20

12 60 10
0
22 91 0 5 10 15 20 25
1 21 Hours studied

17 84
Figure 1: Data on hours studied and test scores

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

Let b0 and b1 denote the estimates of 0 and 1 respectively.


The estimated line of regression takes the form
µˆY |x = b0 + b1x
Let ei be the vertical distance from a point ( xi , yi ) to the
estimated regression line, then each data point satisfies the
equation yi = b0 + b1 xi + ei
The term ei is called the residual or residual error.

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

BITS Pilani, K K Birla Goa Campus


Least-squares Estimation
The parameters 0 and 1 are estimated by
method of least squares. In the sense that,
from the many lines that can be drawn through
a scatter diagram, we wish to pick the one that
"best fits'' the data. The fit is "best'' when the
chosen values of b0 and b1 minimizes the sum
of the squares of the residuals. In this way we
are picking the line that comes as close as
possible to all the data points simultaneously.
BITS Pilani, K K Birla Goa Campus
Sum of squares of errors (SSE)
n n
( yi b1 xi ) . Now,
2
SSE = e =
i
2
b0
i =1 i =1
n
( SSE )
= 2 ( yi b0 b1 xi ) = 0 and
b0 i =1
n
( SSE )
= 2 ( yi b0 b1 xi ) xi = 0
b1 i =1

n n
y i = nb0 + b1 xi
i =1 i =1
n n n
(Normal equations)
x i y i = b0 xi + b1 xi2
i =1 i =1 i =1

Solving which gives b0 and b1 , the estimates of 0 and 1 .

BITS Pilani, K K Birla Goa Campus


Least-Squares estimates and
estimators
The least-squarea estimate for 0 and 1 are given by,
n n n
n xi yi xi yi
ˆ =b = i =1 i =1 i =1
and ˆo = b0 = y b1 x .
1 1 2
n n
n xi 2 xi
i =1 i =1

The respective estimators are given by


n n n
n xiYi xi Yi
B1 = ˆ1 = i =1 i =1 i =1
2
and B0 = ˆo = Y B1 x .
n n
n xi 2 xi
i =1 i =1

BITS Pilani, K K Birla Goa Campus


Estimation of Linear regression line
and conditional random variable

The least-squares estimator for the linear


regression line is µ Y | x = b0 + b1 x and the
estimator for the random variable Y given
x is Y | x = µ Y | x = b0 + b1 x.

BITS Pilani, K K Birla Goa Campus


Problem

Question:
Given that: n=10, xi = 16.75, xi2 = 28.64,
yi = 170, y = 2898,
2
i xi yi = 285.625,
Estimate the linear regression equation
µY | x = 0 + 1 x.

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Solution

BITS Pilani, K K Birla Goa Campus


Linear Curve of Regression

BITS Pilani, K K Birla Goa Campus


Model Assumptions:
Recall that a simple linear regression model is given by
Yi = 0 + x + Ei
1 i

We now assume the followings:


(1) The random variables Yi are independently and normally
distributed.
(2) The mean of Yi is 0 + x
1 i
2
(3) The variance of Yi is

In otherwords: Yi N (µ = 0 + 1 xi ,
2
) Ei ~ N (0, 2
)
BITS Pilani, K K Birla Goa Campus
Properties
n
1. ( xi x)= 0
i =1
n n
2. ( xi x ) ( Yi Y )= ( xi x ) Yi
i =1 i =1
n n n

n
n x i Yi xi Yi
3. ( xi x ) ( Yi Y )= i =1 i =1 i =1

i =1 n
n n
4. ( xi x )2 = ( xi x )xi
i =1 i =1

n n 2

n xi 2 xi
n i =1 i =1
5. ( xi x) =
2

i =1 n
BITS Pilani, K K Birla Goa Campus
Distribution Of B1
Here we show that B1 is normally distributed with mean 1 and
2
variance = n
.
( xi x )2
i =1

n n n n n
n xiYi xi Yi n ( xi x )(Yi Y ) ( xi x )Yi
i =1 i =1 i =1
B1 = 2
= i =1
n
= i =1
n
n n
n 2
x xi n ( xi x )2 ( xi x )2
i
i =1 i =1 i =1 i =1

BITS Pilani, K K Birla Goa Campus


Chapter-12: Linear Regression

BITS Pilani Dr. Jajati Keshari Sahoo


Department of Mathematics
K K Birla Goa Campus

BITS Pilani, K K Birla Goa Campus


Least-Squares estimates and
estimators
The least-squarea estimate for 0 and 1 are given by,
n n n
n xi yi xi yi
ˆ =b = i =1 i =1 i =1
and ˆo = b0 = y b1 x .
1 1 2
n n
n xi 2 xi
i =1 i =1

The respective estimators are given by


n n n
n xiYi xi Yi
B1 = ˆ1 = i =1 i =1 i =1
2
and B0 = ˆo = Y B1 x .
n n
n xi 2 xi
i =1 i =1

BITS Pilani, K K Birla Goa Campus


Model Assumptions:
Recall that a simple linear regression model is given by
Yi = 0 + x + Ei
1 i

We now assume the followings:


(1) The random variables Yi are independently and normally
distributed.
(2) The mean of Yi is 0 + x
1 i
2
(3) The variance of Yi is

In otherwords: Yi N (µ = 0 + 1 xi ,
2
) Ei ~ N (0, 2
)
BITS Pilani, K K Birla Goa Campus
Properties
n
1. ( xi x)= 0
i =1
n n
2. ( xi x ) ( Yi Y )= ( xi x ) Yi
i =1 i =1
n n n

n
n x i Yi xi Yi
3. ( xi x ) ( Yi Y )= i =1 i =1 i =1

i =1 n
n n
4. ( xi x) =
2
( xi x ) xi
i =1 i =1

n n 2

n xi 2 xi
n i =1 i =1
5. ( xi x) =
2

i =1 n
BITS Pilani, K K Birla Goa Campus
Distribution Of B1
Here we show that B1 is normally distributed with mean 1 and
2
variance = n
.
( xi x )2
i =1

n n n n
n xiYi xi Yi ( xi x )Yi
i =1 i =1 i =1
B1 = 2
= = i =1
n
n n
n 2
x xi ( xi x )2
i
i =1 i =1 i =1

BITS Pilani, K K Birla Goa Campus


Distribution Of B1

BITS Pilani, K K Birla Goa Campus


Distribution Of B1
n
( xi x )( 0 + x)
1 i
Since, E (Yi ) = 0 + 1 xi E[ B1 ] = i =1
n
( xi x )2
i =1
n n
( xi x) 0 + 1 ( xi x ) xi
E[ B1 ] = i =1
n
i =1
= 1
( xi x )2
i =1

(by summation properties 1 and 4)


B1 is an unbiased estimator of 1 .
BITS Pilani, K K Birla Goa Campus
Distribution Of B1
n 2

( xi x )Yi n
1
Var B1 = Var i =1
n
= n
Va r ( xi x )Yi
i =1
( xi x )2 ( xi x )2
i =1 i =1
2

n
1
= n
Var( xi x )Yi
i =1
( xi x )2
i =1
2

n
1
= n
( xi x )2 Var(Yi )
i =1
( xi x )2
i =1
BITS Pilani, K K Birla Goa Campus
Distribution Of B1
2
Since variance of Yi is assumed to be for each i , So
2

n 2
1
Var B1 = n
( xi x )2 2
= n
( xi x )2 i =1
( xi x )2
i =1 i =1

2
B1 N 1 , n
( xi x )2
i =1

BITS Pilani, K K Birla Goa Campus


Distribution of B0
Since, B 0 = Y B1 x and which is a linear combination
of independent normal random variables, and therefore
is itself normally distributed.
Y1 + Y2 + ... + Yn
E [ B0 ] = E Y B1 x = E B1 x
n
( + x )+( + x 2 ) + ... + ( + x )
= 0 1 1 0 1 0 1 n
x 1
n
= 0 +x 1 x 1 = 0

B 0 is an unbiased estimator for 0 .

BITS Pilani, K K Birla Goa Campus


Distribution of B0
T he variance of B 0 is given by
V ar B 0 = V ar[Y B1 x ] = V ar[Y ] + x 2 V ar[ B1 ]
n

2
2
( xi x ) 2 + nx 2 2
x2 2
= + n
= i =1
n
n
( xi x )2 n ( xi x )2
i =1 i =1
n n
2 2
x i2 nx + nx x i2
= 2 i =1
n
= 2
n
i =1

2 2
n ( xi x) n ( xi x)
i =1 i =1
BITS Pilani, K K Birla Goa Campus
Distribution of B0
Distribution of B0

n
2
x i
2 i =1
B0 N 0, n
2
n ( xi x)
i =1

BITS Pilani, K K Birla Goa Campus


2
Estimator for
2
Estimator for is given by,
SSE
S = ˆ =
2 2

n-2

2
Note: We divide by ( n - 2) so that S becomes
2
an unbiased estimator for .
n
SSE = (Yi B0 B1 xi ) 2

i =1

BITS Pilani, K K Birla Goa Campus


Notations

n S xy
(1) Sxx = ( xi x )2 (4) B1 =
i =1
S xx
(5) SSE = S yy B1 S xy
n
(2) S yy = (Yi Y ) 2 (6) 2
B1 = 2
S xx
i =1 n
xi2 2

i =1
n (7) 2
=
(3) Sxy = ( xi x )(Yi Y ) B0
nS xx
i =1

BITS Pilani, K K Birla Goa Campus


C onfidence interval estim ation
and H ypothesis testing

Inferences about Slope:


A regresion line is said to be significant if we have sufficient
evidence to conclude that the slope of the the true regression
line is not zero.
Null hypothesis H 0 : 1 = 0.
2
Since B1 N 1 ,
S xx
B1 1
is standard normal.
/ S xx

BITS Pilani, K K Birla Goa Campus


C onfidence interval estimation
and H ypothesis testing

( n - 2) S 2 SSE
Note: The random variable 2
= 2

2
follows distribution with ( n - 2) degrees of freedom.

Therefore, we have

B1 1
=
( B1 1)/ (
/ S xx )
S \ S xx ( n 2) S 2 / 2 ( n 2)

has a T -distribution with ( n - 2) degrees of freedom.


BITS Pilani, K K Birla Goa Campus
Confidence interval estimation for 1

100(1 - )% Confidence interval fo r 1 :

S S
B1 t ,n 2 , B1 + t , n 2
2 S xx 2 S xx

BITS Pilani, K K Birla Goa Campus


Hypothesis testing on 1

(T ype-1): H 0 : 1 = 1
0
(know n value)
H1 : 1 > 1
0

(called R ight -ta iled t e st)


E xam ple (T ype-2): H 0 : 1 = 1
0

H1 : 1 < 1
0

(called Left-tailed test )


E xam p le (T ype-3): H 0 : 1 = 1
0

0
H1 : 1 1

(called T w o-tailed test)


BITS Pilani, K K Birla Goa Campus
Hypothesis testing on 1

Alternative Critical Region:


hypothesis
β1< β10 C={ Tn-2 : Tn-2 < - t }
β1 >β10 C={Tn-2 : Tn-2 > t }
β1 β10 C={Tn-2 : Tn-2 < - t /2 or Tn-2 > t /2 }

0
B1
T e s t s ta tis t ic : Tn 2 = 1

S / S xx

BITS Pilani, K K Birla Goa Campus


Inferences about Intercept
2 n
B0 N 0, x i2
n S xx i =1

T h en , th e ran d o m variab le
B0 0
is stan d ard n o rm al.
n
x i2 / n .S x x
i =1

B0 0
T hus fo llo w s T -d istrib u t io n
n
S x i2 / n . S xx
i =1

w ith ( n 2 ) d eg rees o f fre ed o m .


BITS Pilani, K K Birla Goa Campus
Confidence interval estimation for 0

100(1 - )% C onfidence interva l for 0 :

n n
2 2
S x i S x i
i =1 i =1
B0 t , B0 + t
2 nS xx 2 nS xx

BITS Pilani, K K Birla Goa Campus


Hypothesis testing on 0

(T ype-1): H 0 : 0 = 0
0
(know n value)
H1 : 0 > 0
0

(called R ight -ta iled t e st)


E xam ple (T ype-2): H 0 : 0 = 0
0

H1 : 0 < 0
0

(called Left-tailed test )


E xam p le (T ype-3): H 0 : 0 = 0
0
0
H1 : 0 0

(called T w o-tailed test)


BITS Pilani, K K Birla Goa Campus
Hypothesis testing on 0

Alternative Critical Region:


hypothesis
β0< β00 C={ Tn-2 : Tn-2 < - t }
β0 >β00 C={Tn-2 : Tn-2 > t }
β0 β00 C={Tn-2 : Tn-2 < - t /2 or Tn-2 > t /2 }

0
B0
T est statisti c: Tn 2 = 0
n
S x i2 / nS xx
i =1

BITS Pilani, K K Birla Goa Campus


Problem
n n
G iven n = 1 0, x i = 1 6 .7 5, y i = 1 7 0,
i =1 i =1
n n n
x = 2 8 .6 4,
i
2
y = 2 8 9 8,
i
2
x i y i = 2 85 . 6 25
i =1 i =1 i =1

(a) E stim ate th e l in ear regressio n eq u atio n , also


estim ate th e average valu e o f y w h en x = 2 .
(b ) O btai n 9 9 % co n fide n ce in t erval fo r 0

(c) T est th e h yp o th esis: 1 = 0 at 1 % level .


BITS Pilani, K K Birla Goa Campus
Solution
x = 1.675, y = 17,
n 2

xi
(16.75 )
2
n
i =1
S xx = xi2 - = 28.64 - = 0.584
i =1 n 10
n n

n
xi yi
S xy = xi y i - i =1 i =1
= 0.875
i =1 n
Similarly, S yy = 8
S xy
B1 = = 1.498, B0 = y + B1 x = 14.49
S xx
µ̂ Y |x = 14.49 + 1.498 x and hence when x = 2, µˆ Y |x = 17.5
BITS Pilani, K K Birla Goa Campus
Solution
n
S x i2
i =1
C on fiden ce Interval fo r 0 : B0 ± t /2
n S xx

(S )
2
xy
S SE = S yy = 6.6 9
S xx
S SE
S = = 0.9 1 4
n 2
t / 2 = 3.3 5 5 corresp on d ing to ( n - 2).
99 % C on fid ence in terval = [7 .7 , 2 1 .3]

BITS Pilani, K K Birla Goa Campus


Solution
H0 : 1 =0
H1 : 1 0
= 0.01
B1
Tn 2 = = 1.25
S / S xx

t /2 at 0.01 level with ( n - 2) degrees of freedom


is 3.355 > 1.25, therefore we accept H 0 .
So the regression line is not significant.
BITS Pilani, K K Birla Goa Campus
Inferences about Estimated M ean

T he point estim ate for µ Y | x , is given b y

µˆ Y |x = B 0 + B1 x = (Y B1 x ) + B1 x
µˆ Y | x = Y + B1 ( x x)

Since Y and B1are both norm ally distributed


w hich im plies µˆ Y | x is no rm al.

BITS Pilani, K K Birla Goa Campus


Distribution of µ Y | x
E (µˆY |x ) = E ( B0 ) + xE ( B1 ) = 0 + 1 x = µY |x
µˆY |x is an unbiased estimator of µY |x .
2
Var( µˆY |x ) = Var[Y + B1 ( x x )] = Var(Y ) + ( x x )
2

S xx
1 (x x)
2

= 2
+
n S xx

1 (x x)
2

µˆY |x N µY |x , 2
+
n S xx

BITS Pilani, K K Birla Goa Campus


Inferences about Estimated M ean
µˆY |x µY |x
Since is standard Normal.
1 ( x x )2
+
n S xx
µˆY |x µY |x
the random variable
2
1 (x x )
S +
n S xx
follows T - distribution with ( n 2) degrees of freedom.

BITS Pilani, K K Birla Goa Campus


Confidence Interval on µY |x

100(1- )% Confidence interval for µY |x :

1 ( x x )2 1 ( x x )2
µˆY |x t / 2S + , µˆY |x + t / 2 S +
n Sxx n Sxx

BITS Pilani, K K Birla Goa Campus


Problem
n n
G iven n = 1 0, x i = 1 6 .7 5, y i = 1 7 0,
i =1 i =1
n n n
x = 2 8 .6 4,
i
2
y = 2 8 9 8,
i
2
x i y i = 28 5 .6 25
i =1 i =1 i =1

F ind 9 0 % co n fid ence in terval for µ Y | x = 2 .

BITS Pilani, K K Birla Goa Campus


Solution

Confidence interval on µY |x is given by,

1 ( x x )2
µˆ Y |x ± t /2S +
n S xx
x x = 2 1.675 = 0.325, S xx = 0.584, S = 0.914,
µˆ Y |x = 2 = 17.5,
n = 10, t /2 = 1.860
90% Confidence interval=[16.59,18.402].

BITS Pilani, K K Birla Goa Campus

You might also like