You are on page 1of 13

χ2 Test

(Test of Independence)
• Pronounced as chi-square test
• It is a measure to study the divergence of
actual and expected frequencies
• It describes the magnitude of the
discrepancy between theory and
χ2 Defined
observation.
2
𝑂−𝐸
• χ2 = σ
𝐸

• Where O = Observed frequencies and


E = Expected frequencies
Characteristics of χ2 test
1. Test is based on events or frequencies, whereas in theoretical distribution, the test is
based on mean and standard deviation

2. To draw inferences, this test is applied, specially testing the hypothesis but not useful
for estimation.

3. The test can be used between the entire set of observed and expected frequencies

4. For every increase in the number of degree of freedom, a new χ2 distribution is


formed.

5. It is a general purpose test and as such is highly useful in research


Assumptions
1. All the observations must be independent
2. All the events must be mutually exclusive
3. There must be large observations
4. For comparison purposes, the data must be in original units
5. The expected frequencies of any cell should not be less than 5. If it is less
than 5, it should be pooled with the frequency from the adjacent item
6. The sample data must be drawn at random basis
Uses
1. Χ2 test of 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.

2. Χ2 as a test of independence
• It can be used to find out whether one or more attributes are associated or not. For
ex. Coaching class and successful candidate.
• We can find out whether there are related or independent.
Steps
• A hypothesis is established along with the significance level
𝑅𝑇 𝑋 𝐶𝑇
• Calculate the expected frequencies as 𝐸 =
𝑁
• Take the difference between observed and expected frequencies and
obtain the squares of these differences i.e., 𝑂 − 𝐸 2
• Divide the values of 𝑂 − 𝐸 2 by the respective 𝐸
2
𝑂−𝐸
• And obtain the total of σ[ ]
𝐸
• Find the value of Χ2, from Χ2 table at certain level of significance,
usually 5% level.
• The value χ2 of can range from zero to infinity

• If χ2 is zero, means that the observed and


expected frequencies completely coincide

• The calculated value of χ2 is compared with


the table value of χ2 for given degrees of
Properties
freedom at a certain specified level of
significance

• The calculated valued is more than the table


value, the difference is significant, and vice
versa.
• DF – the number of classes to which
the values can be assigned arbitrarily
or at will without violating the
restrictions or limitations placed
Degrees of
• The DF are denoted by the symbol 𝑣
Freedom
(pronounced 𝑛𝑢) or by 𝑑. 𝑓.

•𝑣 =𝑛 −𝑘

• In contingency table the 𝑑. 𝑓. are


calculated as (𝑐 − 1)(𝑟 − 1)
1. N must be reasonable large, as a
rule – it should not be used when
Conditions for
N is less than 50.
Applying χ2
test 2. Expected frequency of less than 5
in one cell is too small to use χ2

3. σ𝑂 = σ𝐸 = 𝑁
Ex. 1
Out of sample of 120 persons in a village, 76 were administered a new
drug for preventing influenza and out of them 24 persons were attacked
by influenza. Out of those who were not administered the new drug, 12
persons were not affected by influenza.
A. Prepare 2 X 2 tables showing the actual and expected frequencies.
B. Use chi square test for finding out whether the new drug is effective or
not.
(The table value of Χ2 for 1 d.f. at 5% level of significance is 3.84)
Ex. 2

• In a certain sample of 2000 families, 1400 families are


consumers of tea. Out of 1800 Hindu families, 1236 families
consume tea. Use Chi Square test and state whether there is
any significant difference between consumption of tea among
Hindu and non-Hindu families(The table value of χ2 for 1 d.f. at
5% level of significance is 3.84)
Ex. 3
Certain drug was administered to 456 males, out of a total 720, in a certain locality
to test its efficacy against typhoid. The incidence of typhoid is shown below. Find out
the effectiveness of the drug against the disease. (The table value of χ2 for 1 d.f. at
5% level of significance is 3.84)

Infection No infection Total


Administering the drug 144 312 456
Without Administering the drug 192 72 264
Total 336 384 720
Ex. 3
In a clinical treatment, the patients were tested to see the effect of a potential
hypertensive drug. The 50 patients were assigned to receive active drug and other
50 as placebo at random. Their response to treatment was categorized a favorable
or unfavorable. The data is given in the table below:
Table 1 Result of the effect of Hypertensive Drug
Response
Treatment Total
Unfavorable Favorable
Placebo 41 9 50
Drug 16 34 50
Total 57 43 100

Test the hypothesis that drug has a significant effect. Use α = 0.05.

You might also like