Chi-Square Test for Compatibility of K Counts

From Q
Jump to navigation Jump to search

Tests the null hypothesis that all [math]\displaystyle{ s }[/math] categories of a categorical variable, [math]\displaystyle{ x }[/math], are the same size. The test statistic is

[math]\displaystyle{ X^2 = \sum^s_{k=1} \frac{(o_{kj} - e_{kj})^2}{e_{kj}} }[/math]

where:

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

See also