It is known that [1]}:
\(\begin{split}&s(A,B) = -\sum _{i=1}^k\sum _{j=1}^l \frac{n_{ij}}{n} \log \frac{n_{ij}}{n} + \sum _{i=1}^k\sum _{j=1}^l \sum _{c = (a_i+b_j - n)^+}^{\min (a_i, b_j)} \\&\frac{a_i!b_j!(n-a_i)!(n-b_j)!}{n!c!(a_i-c)!(b_j-c)!(n-a_i-b_j+c)!}\frac{c}{n} \log \frac{c}{n},\end{split}\) 
