CHI SQUARE TEST WITH BOTH MARGINS FIXED 33 E(x)=P;” j1,.·, Var(x:)=IN2/(N-1)JP (1-P)V j=1,·,c (2.5) Cov(x)=-[N2/(N-1)V Let x =(x,...,x)'.The expectation and covariance matrix of x are E(x)=NEm=μ Var(x)=[N2/(N-1)[P-MEVE'M]=Z (2.6) where r=diagfP V,....PV) M=diag(P.PeI (2.7) g=(红' The matrix E is rcxr,diag(A],...,A}denotes a block diagonal matrix with blocks A,...,A,and I denotes the identity matrix of order r. As will be proved in the appendix,the vector x is asympto- tically normal.Therefore a quadratic form x'Ax is asymptoti- cally a chi square if AZA A and the chi square will be central ifAμ=0,One such matrix is A=[(N-1)/N2][r-EvE'1 where r--diagipilv,..v) y=D-1-ee' euryo] and e is a column of r one's. It can be easily verified that AEA A and that Au =0. Moreover,Pearson's statistic (1.1)is simply [N/(N-1)]x'Ax,CHI SQUARE TEST WITH BOTH MARGINS FIXED -- n are where The ~atrix E is rcxr, diag{~, , . . . ,R1 den~tes a block diagonal - It matrix with blocks A1,. . . ,A,, and 11- denotes the identity matrix of order r. As will be proved in the appendix, the vector x is asymptotically normal. Therefore a quadratic form x'Ax is asymptotically a chi square if ACA = A and the chi square will be central if A'o = 0, One such matrix fs and e is a colmm of r one's. It call be ea~ILy verified that, AiA = A ai;d zhzz Ap = I?, Moreover, Pearson's statistic (1.1) is sinply r~/(N-l) Ix'Ax, Downloaded by [China Science & Technology University] at 17:36 14 September 2015