Fix bug: correct CHI computation formula:
N*(A*D-B*C)*(A*D-B*C)/(A+C)*(A+B)*(B+D)*(C+D)
Optimize CHI formula computation effectiveness.