Chi-Square Test for Compatibility of K Counts

From Q
Jump to navigation Jump to search

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

X2=∑k=1s(okj−ekj)2ekj

where:

ok=∑i=1nwiIx=k,
wi is the Calibrated Weight of the ith of n observations,
ek=∑i=1nwis
p≈Pr⁡(χ(s−1)2≥X2)

See also