Testing for independence in J×K contingency tables with complex sample survey data
Related Experiment Video
Updated: Apr 16, 2026

Online Explorative Study on the Learning Uses of Virtual Reality Among Early Adopters
Published on: November 22, 2019
Stuart R Lipsitz1, Garrett M Fitzmaurice2, Debajyoti Sinha3
1Brigham and Women's Hospital, Boston, Massachusetts 02115, U.S.A.
Abstract:
The test of independence of row and column variables in a (J×K) contingency table is a widely used statistical test in many areas of application. For complex survey samples, use of the standard Pearson chi-squared test is inappropriate due to correlation among units within the same cluster. Rao and Scott (1981, Journal of the American Statistical Association 76, 221-230) proposed an approach in which the standard Pearson chi-squared statistic is multiplied by a design effect to adjust for the complex survey design. Unfortunately, this test fails to exist when one of the observed cell counts equals zero. Even with the large samples typical of many complex surveys, zero cell counts can occur for rare events, small domains, or contingency tables with a large number of cells. Here, we propose Wald and score test statistics for independence based on weighted least squares estimating equations. In contrast to the Rao-Scott test statistic, the proposed Wald and score test statistics always exist. In simulations, the score test is found to perform best with respect to type I error. The proposed method is motivated by, and applied to, post surgical complications data from the United States' Nationwide Inpatient Sample (NIS) complex survey of hospitals in 2008.
Related Concept Videos
Introduction to Test of Independence
The test statistic for a test of independence is similar to that of a goodness-of-fit test:
Hypothesis Test for Test of Independence
H0: The two variables (factors)...
Contingency Table
Determination of Expected Frequency
Test for Homogeneity
Friedman Two-way Analysis of Variance by Ranks

