Chi - Square Test for Independence of Attributes
Essay by ritoban • November 11, 2011 • Case Study • 678 Words (3 Pages) • 2,660 Views
12.5 Chi -Square Test for Independence of Attributes
Purpose
This test is used to measure if the two attributes under consideration is independent of each other. Let A and B be two attributes where A is divided into r classes, A1, A2,...,Ar and B is divided into s classes B1, B2,...,Bs. The various categories under each of the attributes can be, classified into a (r × s) two-way table commonly called as the contingency table.
Table 12.1: A general contingency table
A1 A2 ... Ai ... Ar Total
B1 A1B1 A2B1 ... AiB1 ... ArB1 (B1)
B2 A1B2 A2B2 ... AiB2 ... ArB2 (B2)
. . . ... . ... . .
. . . ... . ... . .
Bj A1Bj A2Bj ... AiBj ... ArBj (Bj)
. . . ... . ... . .
. . . ... . ... . .
Bs A1Bs A2Bs ... AiBs ... ArBs (Bs)
Total (A1) (A2) ... (Ai) ... (Ar) N
Where AiBj represents the number of cases possessing both the attributes Ai (i=1,2,...,r) and Bj (j =1,2,...,s) and N is the grand total.
Here, we want to test the null hypothesis
H0 : The two attributes A and B are independent of each other.
The null hypothesis is tested against the alternative hypothesis that
H1 : The attributes A and B are dependent on each other.
Assumptions
1. The data is at nominal level of measurement and grouped into several categories.
2. The subjects in each of the group are randomly and independently selected.
3. For applying chi-square test the frequencies in the various cells should be reasonable large
i.e. ³ 5.
The Test Statistic
Under the null hypothesis that the attributes are independent, the theoretical cell frequencies
are calculated as follows:
E[AiBj ] = Expected number of persons processing both the attributes Ai and Bj
= N.P [AiBj ] = N.
By using this formula we can find out the expected frequencies for each of the cell frequencies
(AiBj) where i = 1, 2, ..., r and j = 1, 2, ..., s.
Under
...
...