Chi-Square Test for Compatibility of K Counts

From Q
Jump to: navigation, search

Tests the null hypothesis that all s categories of a categorical variable, x, are the same size. The test statistic is

X^2 = \sum^s_{k=1}  \frac{(o_{kj} - e_{kj})^2}{e_{kj}}


o_{k} = \sum^n_{i=1} w_i I_{x=k},
w_i is the Calibrated Weight of the ith of n observations,
e_{k} =  \frac{ \sum^n_{i=1} w_i}{s}
p \approx \Pr(\chi^2_{(s-1)} \ge X^2)

See also