Chi-Square Test
Chi-Square Test
Uses of :
1. as a Test for Comparing Variance: The Chi-square value is often used to judge the
significance of population variance i.e. we can use the test to judge if a random sample has been drawn
from a normal population with mean and with a specified variance.
kgs
= 31.11
Let the hypothesis be . In order to test this hypothesis we work out the value as under:
Degree of freedom in the given case is At 5% level of significance the table value of
and at 1% level of significance, it is 21.67 for 9 d.f. and both these are greater than the
calculated value 13.99. Hence we accept the null hypothesis and conclude that the variance of the given
distribution can be taken as 20kgs at 5% and 1% level of significance. In other words, the sample can be
said to have been taken from a population with variance 20kgs.
2. as a Non-Parametric Test: is an important non-parametric test and as such no rigid
assumptions are necessary in respect of the type of population. We require only the degree of freedom
for using this test. As a non-parametric test, can be used for (i) as a test of goodness of fit and (ii) as a
test of independence. It is calculated with the help of the following formula:
Case (i): as a Test Goodness of Fit: Through the test we can find out the deviations between
the observed values and expected values. Here we are not concerned with the parameters but concerned
with the form of distribution. test enables us to see how well does the assumed theoretical distribution
(such as Binomial distribution, Poisson distribution, or normal distribution) fit to the observed data.
When some theoretical distribution is fitted to the given data, we are always interested in knowing as to
how well this distribution fits with the observed data. The Chi-square test can give answer to this. If the
calculated value of Chi-square is less than the table value at a certain level of significance, the fit is
considered to be good one which means that the divergence between the observed and expected
frequencies is attributable to fluctuations of sampling. But if the calculated value of Chi-square is greater
than its table value, the fit is not considered to be good one.
Problem 2: 4 coins were tossed 160 times and the following results were obtained:
No. of heads 0 1 2 3 4
Observed frequencies 17 52 54 31 6
Under the assumptions that coins are balanced, find the expected frequencies of getting 0, 1, 2, 3 or 4
heads and test the goodness of fit.
Solution: Hypothesis is that the coins are unbiased.
x Expected frequency =
0
1
2
3
4
No O E O-E (O-E)2
of
heads
0 17 10 7 49 4.9
1 52 40 12 144 3.6
2 54 60 -6 36 0.6
3 31 40 -9 81 2.025
4 6 10 -4 16 1.6
d.f = 5 – 1 = 4;
Calculated value is greater than the table value. Therefore the fit is poor.
Case (ii): as a Test of Independence: test can be used to find out whether one or more
attributes are associated or not. For example, coaching class and successful candidate, marriage and
failure etc; we can find out whether they are related or independent. We take a hypothesis that the
attributes are independent. If the calculated value of is less than the table value at a certain level of
significance, the hypothesis is correct and vice versa.
Problem 3: A certain drug was administered to 500 people out of a total of 800 included in the sample
to test its efficacy against typhoid. The results are given below:
Typhoid No Typhoid Total
Drug 200 300 500
No Drug 280 20 300
Total 480 320 800
On the basis of these data, can it be concluded that the drug is effective in preventing typhoid.
Solution: Let the hypothesis be ‘the drug is not effective in preventing typhoid’.
Expected cell frequency =
The table of expected frequency is
500
300
O E O-E (O-E)2
d.f.1,
The computed value of is much greater than the table value. Therefore, the hypothesis –the drug is
not effective – is rejected. Hence we conclude that the drug is effective in preventing typhoid.
Problem 4: In an experiment on the immunization of goats from anthrax the following results were
obtained. Derive your inference on the vaccine.
12
12
8 16 24
O E O-E (O-E)2
2 4 -2 4 1.0
10 8 2 4 0.5
6 4 2 4 1.0
6 8 -2 4 0.5
24 24 0 16
d.f.1,
The computed value of is 3 which is less than the table value. Therefore, the null hypothesis may be
accepted. Hence we conclude that the vaccine is ineffective in controlling the disease.