question: private static double chiCell ( double freq , double expected , boolean yates ) { if ( Utils . smOrEq ( expected , 0 ) ) { return 0 ; } double diff = Math . abs ( freq - expected ) ; if ( yates ) { diff -= 0.5 ; if ( diff < 0 ) { diff = 0 ; } } return ( diff * diff / expected ) ; }
target:  Computes chi-value for one cell in a contingency table.