Pearson's Chi-Square Test of Independence

From Q
Jump to navigation Jump to search

Pearsons's Chi-Square Test of Independence tests the independence between two categorical variables, x and y which contain s and r categories respectively. The test statistic is

X2=k=1sj=1r(okjekj)2ekj

where:

okj=i=1nwiIx=k,y=j,
wi is the Calibrated Weight of the ith of n observations,
ekj=k=1sokj×j=1rokji=1nwi
pPr(χ(s1)(g1)2X2)