The KL-divergence expression is expanded by applying the standard definition of discrete KL divergence. By setting and , the divergence becomes a sum over all pairs 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 and on the summed support.
The KL-divergence expression is expanded by applying the standard definition of discrete KL divergence. By setting and , the divergence becomes a sum over all pairs 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 and on the summed support.