# Is KL-divergence just the multiplication rule for independent events, reformulated in terms of entropy?

We know KL-divergence is sometimes expressed like this:

which shows it's capturing the deviation between the joint distribution of X and Y, and the product of marginals for X and Y. This suggests KL-divergence is simply the multiplication rule for independent events, reformulated in terms of entropy. In other words, if the joint fails to align with the product of marginals then it's expected the variables have some dependence structure.

We also see KL-divergence expressed like this:

How does this second expression relate to the first? I cannot see where the joint is being calculated, or the product of marginals for that matter.

• The first expression is the mutual information between $X$ and $Y$, which is only a special instance of a KL divergence. Not all KL divergences take the form of a mutual information.
– πr8
Aug 24, 2020 at 17:53
• @πr8 But we should still be able to understand the first expression in terms of the second. Aug 24, 2020 at 17:55
• Yes, the first expression is the KL divergence between the joint $P(x, y)$ and the product of the marginals $P(x) \cdot P(y)$. The first expression is a special case of the second.
– πr8
Aug 24, 2020 at 17:59
• that is, you can write $I(X, Y) = \sum_{x, y} P (x, y) \log \frac{ P (x, y) }{ P(x) \cdot P(y) }.$ is this what you mean?
– πr8
Aug 24, 2020 at 18:00
• what do you mean by "treat both a joint and a product of marginals as though they were regular, single distributions"? they are both valid distributions over $(x, y)$ space, if that answers your question.
– πr8
Aug 24, 2020 at 18:39