Association Test

Chi-squared test

πij=P(jth outcome and in population i)=P(a sample is from population i and expresses jth outcome)=πi.π.j

Where

To test the independence between them (rows x columns):

H0:πij=πi.π.j,∀i,jvsHa:∃i,j s.t. πij≠πi.π.j

under H0:

π^ij=π^i⋅π^⋅j=ni⋅n⋅n⋅jn

We reject H0 if

χobs2=∑i∑j(fij−Eij)2Eij>χdf,1−α2