The Exercise
Two random variables and take values in finite sets and and have a joint distribution . The joint entropy measures the uncertainty in the pair, the entropies and the uncertainty in each variable alone. The exercise is to show that the uncertainty in the pair never exceeds the sum of the two✦, and that it equals the sum exactly when and are independent.✦
Entropy and Marginals
A joint distribution of and is a real function on , nonnegative at every pair and summing to one.
The Shannon entropy of a distribution on a finite set is the real number (1)✦ with the natural logarithm, so that entropies are measured in nats.
The first marginal of a joint distribution of and is the distribution of alone, obtained by summing out : (2)✦ The second marginal of is the distribution of alone, obtained by summing out : (3)✦
The independent product of a joint distribution is the distribution on that gives each pair the product of the two marginals, (4)✦ the joint distribution that and would have if they were independent with the same marginals.
The Claim
Theorem 1. Let be a joint distribution of and on . Then (5)✦ with equality exactly when and are independent: (6)✦ For every nonnegative function on , summing to one or not, (7)✦
What Is Checked
The claim is stated over the Shannon entropy (1), the two marginals (2) and (3), and the independent product (4) of a real function on the product of two finite sets. What the library proves about these constructions is the identity (7), which ties the independent product to the entropies of and of its marginals.