The Essentials of Biostatistics for Physicians, Nurses, and Clinicians

(Ann) #1
134 CHAPTER 8 Contingency Tables

involve any conditioning on the marginal totals. As a historical note,
Conover ( 1999 ) points out that the same idea appeared in Irwin ( 1935 )
and Yates ( 1934 ). So it is not clear whether or not Fisher should be
credited as the originator.
Now, let us see, in the case of the 2 × 2 table how the hypergeomet-
ric distribution occurs under the null hypothesis. Let N be the total
number of observations. The totals for the two rows are r and N − r for
our data set. Similarly we have column totals of c and N − c. Table 8.6
shows the complete picture.
Because the values r , c , and N are fi xed in advance, the only
random variable remaining is x , by our notation the entry in the cell for
row 1 and column 1. Now, x can vary from 0 to the minimum of c and
r. This restriction happens because the sum of the two columns in row
1 must be r , and the sum of the two rows in column 1 must be c.
As we provide different values for x , we get different 2 × 2 con-
tingency tables. So the possible values of x determine all the possible
2 × 2 tables with the margins fi xed. For the null hypothesis of indepen-
dence, the probability of p 1 that an observation falls in row 1 is equal
to the probability p 2 that an observation falls in row 2 regardless of
what column it is in. The same argument can be made for the columns.
The random variable T = x has the hypergeometric distribution that
is for x = 0, 1,... , min( r, c ) P ( T = x ) = C ( r, x ) C ( N − r , c − x )/ C ( N , c )
and P ( T = x ) = 0 for any other value of x where C ( n , m ) = n !/[( n − m )!
m !] for any m ≤ n.
A one - sided p - value for the test for independence in a 2 × 2 table
is calculated as follows:



  1. Find all 2 × 2 tables with the same row and column totals of the
    observed table where cell (1, 1), row 1 and column 1, has a total
    less than or equal to x from the observed table, and a probability
    less than or equal to the observed probability.


Table 8.6
Basic 2 × 2 Contingency Table
Column 1 Column 2 Row totals
Row 1 x r − x r
Row 2 c − x N − r − c + x N − r
Column totals c N − c N
Free download pdf