The KL-divergence expression is expanded by applying the standard definition of discrete KL divergence. By setting P=p(x,y) and Q=p(x)p(y), the divergence becomes a sum over all pairs (x,y) in the joint support of the joint probability times the logarithm of the ratio of the joint probability to the product of the marginals.
Conditions: The derivation is for discrete distributions using probability mass functions.; The logarithm base is not explicitly stated in the expanded sum, though earlier entropy used base 2.; The ratio form requires p(x,y)>0 and p(x)p(y)>0 on the summed support.
The KL-divergence expression is expanded by applying the standard definition of discrete KL divergence. By setting P=p(x,y) and Q=p(x)p(y), the divergence becomes a sum over all pairs (x,y) in the joint support of the joint probability times the logarithm of the ratio of the joint probability to the product of the marginals.
Conditions: The derivation is for discrete distributions using probability mass functions.; The logarithm base is not explicitly stated in the expanded sum, though earlier entropy used base 2.; The ratio form requires p(x,y)>0 and p(x)p(y)>0 on the summed support.