PNS Notes
PNS Notes
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.
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
8
01-Jan-21 Dr J K Sahoo BITS Pilani, K K Birla Goa Campus
Normal Approximation to the Binomial Distribution
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
• 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
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
6/38
BITS Pilani, K K Birla Goa Campus
Sample
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 (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
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
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
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
2/38
BITS Pilani, K K Birla Goa Campus
Sampling Distribution
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
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
t,
P(T t , )=
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.
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 ?
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.
i) POINT ESTIMATION
II) INTERVAL 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 .
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 () .
( X X)
2
n
i
Example: is a biased estimator of population
i=1 n
variance.
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
i =1
parameters in terms of moments.
fo r µ is X z /2 , X+z /2 .
n n
Note: If n is small assume the sample from n ormal.
An s: (0.652 , 0.848).
Ans: n 1 4.
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 µ .
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 .
(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.
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).
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
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
Similarly, P(Y = y ) = fY ( y ) = f ( x, y )
all x
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.
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:
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
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
f X ( x) = f ( x, y )dy
Similarly, fY ( y ) = f ( x, y ) dx
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,
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 ) ].
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:
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
For e.g.
a) The teaching method in the institutes are effective
b) The average IQ of normal human being is 113
Definition:
A statistical hypothesis is a statement
about the nature of the population.
or =
equality such as
,
Alternate Hypothesis H1
< , > or
H a:
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:
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.
Definition:
The procedure of formulating a decission rule
to reject or accept H 0 based on the sample data
is called hyposesis testing.
H0 is True H0 is False or
Ha is True
Accept H0 Correct decision Type II error
Reject H0 Type I error Correct decision
= 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.
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)
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.
X = 25 and S = 4.195
X µ0
Tn 1 = .
S/ n
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)
X µ0
where Tn 1 = is called the test statistic.
S/ n
BITS Pilani, K K Birla Goa Campus
Problem-1
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.
Y |xi = Ei + µY |x
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
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
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
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.
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
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
( 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
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
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
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
( 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)
S S
B1 t ,n 2 , B1 + t , n 2
2 S xx 2 S xx
(T ype-1): H 0 : 1 = 1
0
(know n value)
H1 : 1 > 1
0
H1 : 1 < 1
0
0
H1 : 1 1
0
B1
T e s t s ta tis t ic : Tn 2 = 1
S / S xx
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
n n
2 2
S x i S x i
i =1 i =1
B0 t , B0 + t
2 nS xx 2 nS xx
(T ype-1): H 0 : 0 = 0
0
(know n value)
H1 : 0 > 0
0
H1 : 0 < 0
0
0
B0
T est statisti c: Tn 2 = 0
n
S x i2 / nS xx
i =1
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]
µˆ Y |x = B 0 + B1 x = (Y B1 x ) + B1 x
µˆ Y | x = Y + B1 ( x x)
S xx
1 (x x)
2
= 2
+
n S xx
1 (x x)
2
µˆY |x N µY |x , 2
+
n S xx
1 ( x x )2 1 ( x x )2
µˆY |x t / 2S + , µˆY |x + t / 2 S +
n Sxx n Sxx
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].