2. Contents
๏ต Z-test (Large sample test)
For single mean and difference of means
๏ต t-test (Small sample test)
For single mean and difference of means
๏ต Chi-Square test
For goodness of fit and independence of attributes
3. Z-test (Large sample test nโฅ30)
๏ต For single mean
๏ต H0: ยต = ยต0
๏ต H1 : ยต โ ยต0
๏ต ๐ง๐๐๐ =
๐๐๐๐๐๐๐๐๐๐
๐ ๐ก๐๐๐๐๐๐ ๐๐๐๐๐
=
าง
๐ฅโ ๐0
๐
๐
๏ต If ๐๐๐๐ฅ < ๐๐ญ๐๐ , null hypothesis is
accepted
๏ต For difference of means
๏ต H0: ยต1 = ยต2
๏ต H1: ยต1 โ ยต2
๏ต ๐ง๐๐๐ =
าง
๐ฅโ เดค
๐ฆ
๐1
2
๐1
+
๐2
2
๐2
๏ต If ๐1
2
and ๐2
2
are unknown, sample variances
estimates ๐ 1
2
and ๐ 2
2
are used
๏ต If ๐1
2
= ๐2
2
= ๐2
(say), for unknown ๐2
estimate
เทข
๐2 is used where เทข
๐2 =
๐1๐ 1
2+๐2๐ 2
2
๐1+๐2
๏ต If ๐๐๐๐ฅ < ๐๐ญ๐๐ , null hypothesis is accepted
4. Example1. A sample of 900 members has a mean 3.4 and standard deviation 2.61. Is the
sample from a large population of mean 3.25 and standard deviation 2.61?
๏ต For single mean
๏ต H0: ยต = 3.25 ( the sample has been drawn from the population with
mean 3.25 and standard deviation 2.61)
๏ต H1 : ยต โ 3.25 (Two-tailed)
๏ต ๐ง๐๐๐ =
าง
๐ฅโ ๐0
๐
๐
=
3.4โ3.25
2.61
900
= 1.73
๏ต ๐๐ญ๐๐=1.96 at 5% level of significance
๏ต Since ๐๐๐๐ฅ < ๐๐ญ๐๐ , null hypothesis is accepted
5. Example2. The average hourly wage of a sample of 150 workers in a plant โAโ was Rs. 2.56
with standard deviation of Rs. 1.08. The average hourly wage of a sample of 200 workers in
plant โBโ was Rs. 2.87 with a standard deviation of Rs. 1.28. Can an applicant safely assume
that the hourly wages paid by plant โBโ are higher than those paid by plant โAโ?
๏ต For difference of means
๏ต H0: ยต1 = ยต2
๏ต H1: ยต1 < ยต2 (Left-tailed test)
๏ต ๐ง๐๐๐ =
าง
๐ฅโ เดค
๐ฆ
๐1
2
๐1
+
๐2
2
๐2
=
2.56โ2.87
1.08 2
150
+
1.28 2
200
= 2.46
๏ต ๐1
2
and ๐2
2
are unknown, sample variances estimates ๐ 1
2
and ๐ 2
2
are used
๏ต ๐๐ญ๐๐ = 1.645 at 5% level of significance (one-tailed)
๏ต If ๐๐๐๐ฅ > ๐๐ญ๐๐ , null hypothesis is rejected and we can conclude that the
average hourly wages paid by plant โBโ are certainly higher than โAโ.
7. Example3.The specimen of copper wires drawn from a large lot have the following breaking
strength (in kg. weight): 578, 572, 570, 568, 572, 578, 570, 572, 596, 544. Test whether the
mean breaking strength of the lot may be taken to be 578 kg. weight.
๏ต For single mean
๏ต H0: ยต = 578 kg.
๏ต H1 : ยต โ 578 kg.
๏ต ๐ก๐๐๐ =
าง
๐ฅโ ๐0
๐
๐
= 1.4917 ๐คโ๐๐๐ ๐ =
ฯ ๐ฅ๐โ าง
๐ฅ 2
๐โ1
= 12.719
๏ต ๐ก๐ก๐๐ = 2.262 ๐ค๐๐กโ 10 โ 1 = 9 ๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐ and 5%
level of significance
๏ต Since ๐๐๐๐ฅ < ๐๐ญ๐๐ , null hypothesis is accepted
๏ต We can conclude that the mean breaking strength of copper
wires lot may be taken as 578 kg.
๐๐ ๐๐ โ เดฅ
๐ ๐๐ โ เดฅ
๐ ๐
578 6 36
572 0 0
570 -2 4
568 -4 16
572 0 0
578 6 36
570 -2 4
572 0 0
596 24 576
544 -28 784
5720 1456
8. Example4.Sample of sales in similar shops in two towns are taken for a new product with
the following results:
Is there any evidence of difference in sales in the towns?
๏ต For difference of means
๏ต H0: ยต1 = ยต2
๏ต H1: ยต1 โ ยต2
๏ต ๐ก๐๐๐ =
าง
๐ฅโ เดค
๐ฆ
๐.
1
๐1
+
1
๐2
=
57โ61
2.236.
1
5
+
1
7
=3.055
๏ต ๐ก๐ก๐๐ = 2.228 ๐ค๐๐กโ (๐1 + ๐2 โ 2) = 10 ๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐ and 5% level of significance
๏ต Since ๐๐๐๐ฅ > ๐๐ญ๐๐ , null hypothesis is rejected
๏ต We can conclude that the difference in sales in two towns is significant at 5% level of
significance.
Town Mean Sales Variance size of sample
A 57 5.3 5
B 61 4.8 7
9. Chi-Square ( ๐๐
) Test
For goodness of fit
๏ต H0: Fit is good
๏ต H1: Fit is bad
๏ต Expected value ๐ฌ๐ is the average value
๏ต Oi is the observed value
๏ต ๐๐๐๐
๐
= ฯ
๐ถ๐ โ๐ฌ๐
๐
๐ฌ๐
๏ต ๐๐ก๐๐
2
๐ค๐๐กโ ๐ โ 1 ๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐
๏ต If ๐๐๐๐
2
< ๐๐ก๐๐
2
we accept the null
hypothesis
For independence of attributes
๏ต H0: Attributes are independent
๏ต H1: Attributes are not independent
๏ต Expected value ๐ฌ๐ is the average value
๏ต Oi is the observed value
๏ต ๐๐๐๐
๐
= ฯ
๐ถ๐ โ๐ฌ๐
๐
๐ฌ๐
๏ต ๐๐ก๐๐
2
๐ค๐๐กโ ๐ โ ๐ ๐ โ ๐ ๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐
๏ต If ๐๐๐๐
2
< ๐๐ก๐๐
2
we accept the null hypothesis
10. Example5. A die is thrown 132 times with following results:
Is the die unbiased?
Solution: It is a case of goodness of fit
๏ต H0: Fit is good or die is unbiased
๏ต H1: Fit is bad or die is biased
๏ต Expected value ๐ฌ๐ is average = 22
๏ต ๐๐๐๐
๐
= ฯ
๐ถ๐ โ๐ฌ๐
๐
๐ฌ๐
= 9
๏ต ๐๐ก๐๐
2
= 11.071 ๐ค๐๐กโ 6 โ 1 ๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐ at 5% level of significance
๏ต Since ๐๐๐๐
2
< ๐๐ก๐๐
2
so we may accept the null hypothesis
๏ต So we can conclude that the die is unbiased.
X ๐ถ๐ ๐ฌ๐ ๐ถ๐ โ๐ฌ๐ ๐ถ๐ โ๐ฌ๐
๐
๐ถ๐ โ๐ฌ๐
๐
๐ฌ๐
1 16 22 -6 36 1.636364
2 20 22 -2 4 0.181818
3 25 22 3 9 0.409091
4 14 22 -8 64 2.909091
5 29 22 7 49 2.227273
6 28 22 6 36 1.636364
132 9
Number turned up 1 2 3 4 5 6
Frequency 16 20 25 14 29 28
11. Example6. The table given below shows the data obtained during outbreak of
smallpox:
Test the effectiveness of vaccination in preventing the attack from smallpox?
Solution: It is a case of independence of attributes
๏ต H0: Vaccination and attack are independent
๏ต H1: Vaccination and attack are not independent
๏ต ๐ฌ๐ for AB = (500*216)/2000= 54
๏ต ๐ฌ๐ for Ab = (500*1784)/2000=446
๏ต ๐ฌ๐ for aB = (1500*216)/2000=162
๏ต ๐ฌ๐ for ab = (1500*1784)/2000=1338
๏ต ๐๐๐๐
๐
= ฯ
๐ถ๐ โ๐ฌ๐
๐
๐ฌ๐
= 14.6431
๏ต ๐๐ก๐๐
2
= 3.841 ๐ค๐๐กโ 2 โ 1 โ 2 โ 1 = 1 ๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐๐๐ at 5% level of significance
๏ต Since ๐๐๐๐
2
> ๐๐ก๐๐
2
so we reject the null hypothesis
๏ต So we can conclude that the vaccination is effective in preventing the attack from smallpox.
Groups ๐ถ๐ ๐ฌ๐ ๐ถ๐ โ๐ฌ๐ ๐ถ๐ โ๐ฌ๐
๐
๐ถ๐ โ๐ฌ๐
๐
๐ฌ๐
AB 31 54 -23 529 9.796296
Ab 469 446 23 529 1.186099
aB 185 162 23 529 3.265432
ab 1315 1338 -23 529 0.395366
2000 2000 14.64319
Attacked (B) Not Attacked (b) Total
Vaccinated (A) 31 469 500
Not Vaccinated (a) 185 1315 1500
Total 216 1784 2000