Unit 1 SNM - New (Compatibility Mode) Solved Hypothesis Test PDF
Unit 1 SNM - New (Compatibility Mode) Solved Hypothesis Test PDF
Prepared by
Dr. A.R. VIJAYALAKSHMI
Population.
The group of individuals under study is called population.
The population may be finite or infinite.
Sample and Sample Size
A finite subset of statistical individuals in a population is called
Sample. The number of individuals in a sample is called Sample
Size(n).
Parameter and Statistic
The statistical constants in population namely mean µ and variance 2
which are usually referred to as parameters.
Statistical measures computed from sample observations alone, i.e.
mean x and variance s 2 which are usually referred to as statistic.
Various steps involved in testing of hypothesis
(i)Set up null hypothesis
t E (t )
(iii)Compute test statistics z under null hypothesis
SE (t )
level of significance
3
If z 1.96, H may be rejected at 5%
0
level of significance
level of significan ce
level of significan ce
4
Sampling distribution
The probability distribution of a sample statistic is often
called the sampling distribution of the statistic
Sampling Error
5
Test of significance
A very important aspect of the sampling theory is the study of tests of
significance which enable us to decide on the basis of the sample
results if
6
Null hypothesis:
Alternative hypothesis:
7
Errors in sampling
Critical region
(ii) F-test
(iii) test
2
9
Students ‘t’ Test
x
t with (n 1)
s
n 1
1
Where x x = Sample mean
i
n i
population mean
2 1 2
S ( x x)i
n 1 i
n sample size
10
Test for single and difference of mean
(large sample)
x
s
n
11
Test of single and difference of mean
(large sample)
x x1 x 2 2 2
t , t 2 n s n s
s 2 1 1 Where s 1 1 2 2
s n1 n2 2
n 1 n
1 n 2
Test of single variance and equality of variance
•To test if the two samples have come from the same population
S 12 2
F ( x x ) 2
S 22 2
S
1 S 2
( y y)
n1 1 2
n1 1
13
Chi –Square test for goodness of fit
14
Independence of attributes
0 .05
(ad bc) (a b c d )
2
2
with (r 1, s 1)
15
Problems on large samples- single mean
The mean life time of a sample of 100 light bulbs produced by a
company is computed to be 1570 hours with a sample standard deviation
of 120 hours. If is the life of all the bulbs produced by the company,
test the hypothesis 1600hours against the alternative hypothesis
1600 hours with 0.05 and 0.01
Solution: Given Sample size n 100 Sample mean x 1570
Sample S.D s 120 Population mean 1600
16
Level of significan ce 5%
Conclusion:
Since Z Z
we reject the null hypothesis and hence the mean life time of the tubes
produced by the company may not be 1600 hours
17
Random samples drawn from two countries gave the following data relating
to the heights of adult males. Is the difference between standard deviation
significant?
Country A Country B
Mean height 67.42 67.25
(inches)
S.D(Inches) 2.58 2.50
Number in 1000 1200
samples
Solution:
18
Null Hypothesis: H 0 : 1 2
i.e there is no significant difference between the sample standard deviation
s1 s 2 s1 s 2
The test statistic z
12 22 s 12 s 22
2
2 n1 2 n 22 2 n1 2
2 n 12
N (0,1)( & are no tknown)
1 2
2.58 2.50
z 2.58 2.50 1.0387
(2.58) 2
( 2.50) 2
0.07702
2 1000 2 1200
Conclusion:
The critical value at 5% LOS for two tailed test is z 1.96
19
Since z 1. 96, we accept the null hypothesis and hence conclude that
Solution:
Null Hypothesis:
20
Alternative Hypothesis:
Level of significance 5%
Conclusion:
21
Problems on difference of mean
The mean of 2 large samples 1000 and 2000 members are
67.5 inches and 68.0 inches respectively. Can the samples be
regarded as drawn from the same population of S.D 2.5
inches.
Solution:
Sample I Sample II
x1 67.5 x2 68.0
n1 1000 n2 2000
Population S.D. 2.5
The two given samples are large samples
Null Hypothesis: H 0 : 1 2
29
Alternative Hypothesis: H 1 : 1 2
Conclusion:
The calculated value of is greater than the table value of z.
28
In a large city A, 20% of a random sample of 900 school boys had a slight
physical defect. In another large city B, 18.5% of a random sample of 1600
school boys had the same defect. Is the difference between the proportions
significant?
p1 p2
Q = 1 – P = 0.8906. The test statistic z
1 1
PQ
n1 n2
24
0 . 2 0 . 185
0 . 935
1 1
( 0 . 1904 )( 0 . 8096 )
900 1600
i.e., the differences between the two proportions are not significant
25
Problems on small sample (single mean)
26
x x2
0.49 0.2401
x
2
s
2
( x) 2
0.48 0.2304 n
0.47 0.2209 2.8830
(0.49) 2
0.48 0.2304 12
0.49 0.2401
0.24025 0.2401
0.50 0.2500
0.51 0.2601 0.00015
0.49 0.2401
0.48 0.2304 s 0.012
0.50 0.2500
0.51 0.2601
0.48 0.2304
5.88 2.8830
Level of significance 5%
Degrees of freedom:n-1=12-1=11
The test statistic t x 0.49 0.5 0.01
2.76395
s 0 . 012 0.003618
n 1 11
t 2 . 76395 2 . 20
28
A machinist is making engine parts with axle diameter of 0.700 inch. A
random sample of 10 parts shows a mean diameter of 0.742 inch with a
standard deviation of 0.040 inch. Compute the statistic you would use to
test whether the work is meeting the specifications
Solution:
Here we are given = 0.700 inch ,
Null hypothesis H0: = 0.700 inch
i.e., the product is conforming to specifications
Alternative hypothesis H1: 0.700 inch
x 0 . 742 0 . 700
t 3 . 15
The test statistic
s2 ( 0 . 040 ) 2
n 1
(10 1 )
Here the test statistic follows the student’s t with 10-1 = 9 degrees of freedom
Test whether the samples come from the same normal population
Solution: H0: The two samples have been drawn from the same normal
population
i.e H 0 : 1 2 and 12 22
30
Equality of means will be tested by t-test and the equality of variances
will be tested by F-test. Since t-test assumes equality of variances,
we shall apply F-test first.
(i ) H 0 : 12 22 Given n 1 10 , n 2 12 , x 1 15 , x 2 14
2 2
(x1 x1 ) 90, ( x2 x2 ) 108
1 90 1 108
S12 ( x1 x1 ) 2
10, S 2
2 ( x 2 x 2 ) 2
9.82
n1 1 9 n2 1 11
2
Then F S 1
1 .018 Calculated F = 1.018 F0.05 (9, 11) = 2.90
S 22
Since calculated F < tabulated F, we accept the null hypothesis H0. i.e 12 22
Since 12 22 , we can apply t-test now. t-test is used to test equality of means
( ii ) H 0 : 1 2
1 1
2
s
n1 n2 2
2 2
(x1 x1) (x2 x2 ) 20 (90 108) 9.9
31
x1 x 2 15 14
The test statistic t 0 .742
1 1 1 1
s 9 .9 ( )
n1 n 2 10 12
( n 1 n 2 2 ) 20
Hence the given samples come from the same normal population
Combining (i) and (ii), we conclude that the samples have come from
the same normal population
32
.
Null Hypothesis: H 0 : 7
(The sample mean x does not differ significantly from the population
mean
Alternative hypothesis: H 1 : 7
x 6 .9 7
The test statistic t 4.89
s 0 .1
n 1 24
33
Calculated Value of t 4 . 89 and table value = 1.645
34
Problems on chi square good-ness of fit
Fit a Poisson distribution to the following data and test the goodness of fit
x 0 1 2 3 4 5 6
Freque 27 72 30 3 4 5 6
ncy f(x) 5
Solution:
f x 189
Mean of the given distribution x
i
0.482
i
f 392
i
To fit a Poisson distribution to the given data. We take the parameter (i.e mean)
of the Poisson distribution equal to the mean of the given distribution
i.e x 0.482
35
The Poisson distribution is given by
e x
P ( X x) , x 0,1,....
x!
and the theoretical frequencies are obtained by
e 392 e (0.482)
x 0.482 x
( f )
i
x! x!
392 e (0.482)
0.482 0
f ( 0) 242.1
0!
392 e (0.482)
0.482 1
f (1) 116.69
1!
36
392 e 0.482
(0.482) 2
f ( 2) 28.12
2!
392 e 0.482
(0.482) 3
f ( 3) 4.518
3!
392 e (0.482)
0.482 4
f ( 4) 0.544
4!
392 e (0.482)
0.482 5
f ( 5) 0.052
5!
392 e (0.482)
0.482 6
f ( 6) 0.004
6!
37
The theoretical Poisson frequencies are:
Alternative hypothesis
H : The Poisson distribution does not fits well in to the data
1
38
Here Calculated tabulated ,
2 2
(O E )
2
347 .714
H is rejected
0
E
we accept H is accepted
1
at 5 % los and we cocluded
that the poisson dist . is not a good fit to the data
39
The following data are collected on the two characters
literates 83 57
Ill iterates 45 68
Oi Ei i
Ei
i
57 69.17 2.14123
table value of ( 1d . f ) at 5% 3.84
2
45 57.17 2.590675
68 55.83 2.652855 Here Calculated tabulated ,
2 2
9.475808 H is rejected
0
N=a+b+c+d
2
a+c b+d ( a b )( c d )( a c )( b d )
6 2
3 5
( ad bc ) ( a b c d )
2
2
N =a+b +c+d
( a b )( c d )( a c )( b d )
1.0159
2
Independence of attributes
Find if there is any association between extravagance in fathers and
extravagance in sons from the following data .Determine the coefficient of
association also
Extravagance fathers Miserly father
Null hypothesis
H : Namely that the extravagance in sons and fathers are not significant
0
43
N (ad bc )
2
(327)(234) (545)(741) 2
(327 545 741 234)
2
(872)(975)(1068)(779)
279.76 3.841
2
The following data gives the number of air craft accidents that
occurred during various days of the week. Find whether the accidents
are uniformly distributed over the week.
H 10
Tabulated 2 12.59
Total number of accidents =84
84
Under the null hypothesis E 12 , i 1, 2,... 7
I
7
45
Day O E OE (O E ) 2
E
Sun 14 12 2 0.3333
Mon 16 12 4 1.3333
Tue 8 12 4 1.3333
Wed 12 12 0 0
Thu 11 12 1 0.0833
Fri 9 12 3 0.75
Sat 14 12 2 0.3333
(O E ) 2
4 . 167
E
H is accepted
0
46
An automobile company gives you the following information about
age groups and liking for particular model of a car which it plans to
introduce. On the basis of this data can it be concluded that the model
appeal is independent of the age group.
Persons Below 20-39 20-39 40-59 60 and
who 20 above
Liked 140 80 40 40 20
the car
Disliked 60 50 30 30 80
the car
48
( 200 )( 250 )
Expected frequency for 60 50
500
( 130 )( 250 )
Expected frequency for 50 65
500
( 70 )( 250 )
Expected frequency for 30 35
500
( 100 )( 250 )
Expected frequency for 80 500
50
49
E (O E ) 2
O OE
E
140 112.28 27.72 6.84
80 72.98 7.02 0.67
40 39.29 0.71 0.012
20 56.14 -36.14 23.26
60 87.72 -27.72 8.76
50 57.02 -7.02 0.864
30 30.70 -0.70 0.015
80 43.85 36.15 29.80
(O E ) 2
70.22
E
50