Total correlation (source code)

= Total correlation
{wiki}

The total correlation of a random vector is
$$
\operatorname{TC}(X_1,\ldots,X_n)
=\sum_iH(X_i)-H(X_1,\ldots,X_n)
=D\!\left(P_{X_1,\ldots,X_n}\middle\Vert\bigotimes_iP_{X_i}\right).
$$
It is nonnegative and vanishes exactly when the coordinates are independent.