Testing of Hypothesis
Testing of Hypothesis
Note : In order for any test of hypothesis or rule of decision to be good, it must be
designed so as to minimize the errors of decision.
Level of significance :
In testing a hypothesis, the maximum probability with which we would be willing
to risk a type I error is called level of significance of the test.
2
n ( Oi − Ei )2
(i) Set up a ‘null hypothesis’ and calculate χ =
i =1 Ei
where Oi’s are observed values and Ei’s are expected or theoretical
values and Oi = Ei .
(ii) Find the number of degrees of freedom (d.f.) and take the corresponding
value of χ2 at a prescribed level of significance from the χ2 test for
goodness of fit table.
(iii) If calculated value is less than the table value, then accept the hypothesis
otherwise reject the hypothesis.
By hypothesis, we say that each digit should appear 1500 times. These are
expected frequencies.
Digit 0 1 2 3 4 5 6 7 8 9
Frequency 1493 1441 1461 1552 1494 1454 1613 1491 1482 1519
(Oi)
Expected 1500 1500 1500 1500 1500 1500 1500 1500 1500 1500
frequency
(Ei)
2 ( Oi − Ei )2
χ = = 15.6282
Ei
Ex : The theory predicts that a set of data values were distributed in four groups
A,B,C,D in the ratio 9:3:3:1. In an experiment, the data values observed in the
groups A,B,C,D are 882, 313, 287, 118. Does the experimental result support the
theory.
(The table value of χ2 for 3 d.f. at 5% level of significance = 7.815)
Ex : Fit the Poisson distribution to the following data.
x 0 1 2 3 4 5 6 7 8
Frequency 56 156 132 92 37 22 4 0 1
Is the fitting data correct?
Solution : Here the given frequencies are observed frequencies (Oi’s).
Oi = 500
Large samples :
n p +n p
Pˆ = 1 1 2 2
n1 + n2
Qˆ = 1 − Pˆ
p1 − p2
z=
ˆ ˆ 1 + 1
PQ
n1 n2
Here z is a standard normal variable.
If |Z| < 1.96, then the hypothesis is accepted at 5% level of significance.
If 1.96 < |Z| < 2.58, then the hypothesis is accepted at 1% level of significance.
If 2.58 < |Z| < 3, then the hypothesis is accepted at 1% level of significance.
If |Z| > 3, then the hypothesis is rejected.
Test for single mean :
Let ‘μ’ be the mean of the population.
Let Let ‘n’ be the size of the sample and x be the mean of the sample.
Let σ be the s.d. of the sample or population.
Here null hypothesis is
Sample has been drawn from the population
( or )
There is no significant difference between the sample and population means.
x −µ
Calculate z=
σ/ n
Here z is a standard normal variable.
If |Z| < 1.96, then the hypothesis is accepted at 5% level of significance.
If 1.96 < |Z| < 2.58, then the hypothesis is accepted at 1% level of significance.
If 2.58 < |Z| < 3, then the hypothesis is accepted at 1% level of significance.
If |Z| > 3, then the hypothesis is rejected.
Note :
σ
95% confidence limits for μ are x ± 1.96
n
σ
99% confidence limits for μ are x ± 2.58
n
Note :
If population size is N, then
N −n σ
95% confidence limits for μ are x ± 1.96
N −1 n
N −n σ
99% confidence limits for μ are x ± 2.58
N −1 n
Test for difference of means :
Here we consider two samples.
Sample 1 : Size = n1, Mean = x1 , s.d. = σ1
Sample 2 : Size = n2, Mean = x2 , s.d. = σ2
Here null hypothesis is
Both the samples are drawn from the same population
( or )
Samples are drawn from different populations which have the same mean
( or )
The samples are drawn from different populations which have insignificant
difference as far as the means are concerned.
x1 − x2
Calculate z=
σ 12 σ 22
+
n1 n2
s1 − s2
Calculate z=
σ 12 σ 22
+
2n1 2n2
s1 − s2
(or) z = if s.d.’s of populations are not given.
s12 s2 2
+
2n1 2n2
x −µ xi 1 2
Calculate t= where x = , S= ( xi − x )
S/ n n n −1
Here S is the s.d. of the sample.
Take the corresponding value of ‘t’ at a prescribed level of significance for
(n-1) d.f. from the t- test table.
If calculated value of | t | < table value of t, then hypothesis is accepted otherwise it
is rejected.
Confidence limits
S
95% confidence limits for population mean are x ± (table value of t0.05 ) .
n
S
99% confidence limits for population mean are x ± (table value of t0.01 ) .
n
Test for difference of means :
x−y
Calculate t =
1 1
S +
n1 n2
n1 n2
xi yj
1 n1 2 n2 2
( xi − x ) + ( y j − y )
j =1
where x = i =1 , y= , S=
n1 n2 n1 + n2 − 1 i =1 j =1
Take the corresponding value of ‘t’ at a prescribed level of significance for
(n1+n2 - 1) d.f. from the t- test table.
If calculated value of | t | < table value of t, then hypothesis is accepted otherwise it
is rejected.
χ2 test for the population variance :
2
2 ( xi − x )
Calculate χ =
σ2
Take the corresponding value of χ2 at a prescribed level of significance for
(n-1) d.f. from the χ2 test table.
If calculated value is less than the table value of t, then hypothesis is accepted
otherwise it is rejected.
F-test for equality of population variances :
1 n1 2 1 n2 2
Calculate s12 = ( xi − x ) , s2 2 = ( yj − y)
n1 − 1 i =1 n2 − 1 j =1
s12
2, if s12 < s2 2
s2
F = 2
s2 , if s12 > s2 2
s 2
1
Take the corresponding value of F at a prescribed level of significance for
(n1-1, n2-1) d.f. if s12 < s22 or (n2-1, n1-1) d.f. if s12 > s22 from the F test table.
If calculated value is less than the table value of F, then hypothesis is accepted
otherwise it is rejected.
Fisher’s Z-test for single correlation coefficient :
1 1 + r1 1 1 + r2
Calculate z1 = log e , z2 = log e
2 1 − r1 2 1 − r2
z1 − z2
z=
1 n−3
1 1 + r1 1 1 + r2
Calculate z1 = log e , z2 = log e
2 1 − r1 2 1 − r2
z1 − z2
z=
1 1
+
n1 − 3 n2 − 3