Sunteți pe pagina 1din 4

Contingency Table

There are situations when each individual has two characteristics or attributes.
For example, the first may be smokes or not and the second may be whether he
or she has cancer. In this case both the attributes are binary (having two
possibilities or classes). The proportion of people with different eye colour –
black, brown or bluish in 4 region is another example where the first attribute is
eye colour having three possibilities and the second attribute is region which have
four possibilities. In such situations, one may be interested to ascertain whether
the two attributes are associated or they are independent.

The sample data usually consists of observations on both the characteristics for a
number of individuals. The data is summarized as counts or frequencies in a IxJ
table when the first attribute has I classes and the second one having J classes as
shown below:

I x J Contingency Table
Y
X Total
1 2 ..... J
1 n11 n12 ..... n1 J n1 .
2 n21 n22 ..... n2 J n11
. .
. .
. .
I n I1 n I2 ..... n IJ n I.
Total n.1 n.2 ..... n.J n..

Here X and Y are the two attributes having I and J classes respectively.
nij
is the count or frequency for X = i and Y = j .

Test of independency in 2 x 2 Contingency table

2 x 2 Contingency tables are most frequently used in practice. A 2 x 2 table


showing the data on 200 individuals in respect of their Sex (X) and Having
spectacle or not (Y) is shown below:

X Y TOTAL
1 2
1 30 50 80
2 70 50 120
TOTAL 100 100 200

To test whether the two attributes are independent or not, we first calculate the
expected frequencies by multiplying the corresponding column and row totals
and dividing it by the total frequency. These are shown below

X Y TOTAL
1 2
1 40 40 80
2 60 60 120
TOTAL 100 100 200

( Observed − Expected ) 2
∑ Expected
Next we calculate the quantity (statistic) which
2
χ1
follows Distribution.

In this case the calculated quantity is 8.33 whereas the table value at 5% level is
3.84. Hence we reject the hypothesis of independence of the two attributes.

In the general case of I x J Contingency table, we construct a similar statistic as


2
above which follows a
χ with (I-1)(J-1) degrees of freedom.

S-ar putea să vă placă și