Lean, informalized

Nielsen & Chuang · Chapter 11, Entropy and information · p. 506

Theorem 11.3 - Basic properties of the Shannon entropy of a joint distribution, with their cases of equality

Entropy inequalities for two and three random variables.

Hover over a blue or green term in the text, or a node in the graph, to find it in the other. Select it to read its declaration both in Lean and in words.

The Exercise

Two random variables XX and YY, such as the outcomes of two measurements made on one system, take values in finite sets 𝒳\mathcal X and 𝒴\mathcal Y with joint probabilities p(x,y)p(x,y). Their Shannon entropies measure how uncertain the outcomes are, singly and together. Theorem 11.3 collects the basic relations among these entropies and the quantities built from them, with the cases in which an inequality becomes an equality. A third variable ZZ enters two of them: the statement that the entropy of the three together with that of the shared variable does not exceed the entropy of the two overlapping pairs, called strong subadditivity, and the statement that conditioning on more variables does not increase entropy.

Entropy of a Pair

The Shannon entropy of a probability distribution pp on a finite set 𝒳\mathcal X is H(p)=−∑x∈𝒳p(x)log⁡p(x),H(p) = -\sum_{x \in \mathcal X} p(x) \log p(x),(1)✦ with the natural logarithm, so that entropy is measured in nats; the same sum defines H(p)H(p) for any real function pp on 𝒳\mathcal X.

The marginals of a function pp on 𝒳×𝒴\mathcal X \times \mathcal Y are the functions pXp_X on 𝒳\mathcal X and pYp_Y on 𝒴\mathcal Y obtained by summing over the other variable, pX(x)=∑y∈𝒴p(x,y),p_X(x) = \sum_{y \in \mathcal Y} p(x,y),(2)✦ pY(y)=∑x∈𝒳p(x,y);p_Y(y) = \sum_{x \in \mathcal X} p(x,y);(3)✦ for a joint distribution of XX and YY they are the distributions of XX and of YY alone.

The entropy of the pair is written H(X,Y)=H(p)H(X,Y) = H(p), and the entropy of each variable alone is H(X)=H(pX)H(X) = H(p_X) and H(Y)=H(pY)H(Y) = H(p_Y).

The conditional entropy H(X|Y)H(X|Y) of XX given YY and the mutual information H(X:Y)H(X:Y) of XX and YY are H(X|Y)=H(X,Y)−H(Y),H(X|Y) = H(X,Y) - H(Y),(4)✦ H(X:Y)=H(X)+H(Y)−H(X,Y).H(X:Y) = H(X) + H(Y) - H(X,Y).(5)✦ Exchanging the arguments of pp gives the function (y,x)↦p(x,y)(y,x) \mapsto p(x,y) on 𝒴×𝒳\mathcal Y \times \mathcal X, from which H(Y,X)H(Y,X) and H(Y:X)H(Y:X) are formed in the same way.

Multiplying the marginals of pp gives the function pXpYp_X p_Y on 𝒳×𝒴\mathcal X \times \mathcal Y (pXpY)(x,y)=pX(x)pY(y),(p_X p_Y)(x,y) = p_X(x)\, p_Y(y),(6)✦ and XX and YY are independent when p=pXpYp = p_X p_Y.

The variable YY is a function of XX, written Y=f(X)Y = f(X), when there is a map f:𝒳→𝒴f \colon \mathcal X \to \mathcal Y with y=f(x)wheneverp(x,y)≠0.y = f(x) \quad \text{whenever} \quad p(x,y) \neq 0.(7)✦

Three Variables

For a function pp on 𝒳×𝒴×𝒵\mathcal X \times \mathcal Y \times \mathcal Z, such as the joint distribution of three variables XX, YY, ZZ, the marginal pXYp_{XY} of the first two is the function on 𝒳×𝒴\mathcal X \times \mathcal Y pXY(x,y)=∑z∈𝒵p(x,y,z).p_{XY}(x,y) = \sum_{z \in \mathcal Z} p(x,y,z).(8)✦ The marginal pYZ(y,z)=∑xp(x,y,z)p_{YZ}(y,z) = \sum_{x} p(x,y,z) of the last two is (3) with the pair (Y,Z)(Y,Z) in the place of YY✦, and the marginal of the middle variable is pY(y)=∑z∈𝒵pYZ(y,z).p_Y(y) = \sum_{z \in \mathcal Z} p_{YZ}(y,z).(9)✦

The entropy of the three together is H(X,Y,Z)=H(p)H(X,Y,Z) = H(p), of the first two H(X,Y)=H(pXY)H(X,Y) = H(p_{XY}), of the last two H(Y,Z)=H(pYZ)H(Y,Z) = H(p_{YZ}), and of the middle one alone H(Y)=H(pY)H(Y) = H(p_Y); the conditional entropy of XX given the pair is H(X|Y,Z)=H(X,Y,Z)−H(Y,Z)H(X|Y,Z) = H(X,Y,Z) - H(Y,Z), which is (4) with (Y,Z)(Y,Z) in the place of YY.

The three variables form a Markov chain Z→Y→XZ \to Y \to X, with XX and ZZ independent given YY, when for all xx, yy, zz p(x,y,z)pY(y)=pXY(x,y)pYZ(y,z).p(x,y,z)\, p_Y(y) = p_{XY}(x,y)\, p_{YZ}(y,z).(10)✦

The Claim

Theorem 1. Let 𝒳\mathcal X, 𝒴\mathcal Y and 𝒵\mathcal Z be finite sets. For every real function pp on 𝒳×𝒴\mathcal X \times \mathcal Y, H(Y,X)=H(X,Y),H(Y,X) = H(X,Y),(11)✦ H(Y:X)=H(X:Y).H(Y:X) = H(X:Y).(12)✦ If pp has no negative values, then H(X|Y)≥0,H(X|Y) \ge 0,(13)✦ H(X)≤H(X,Y),H(X) \le H(X,Y),(14)✦ H(X:Y)≤H(Y),H(X:Y) \le H(Y),(15)✦ and if moreover 𝒴\mathcal Y is not empty, H(X)=H(X,Y)if and only ifY=f(X) for some f,H(X) = H(X,Y) \quad \text{if and only if} \quad Y = f(X) \text{ for some } f,(16)✦ H(X:Y)=H(Y)if and only ifY=f(X) for some f.H(X:Y) = H(Y) \quad \text{if and only if} \quad Y = f(X) \text{ for some } f.(17)✦ If pp is a probability distribution, then H(X,Y)≤H(X)+H(Y),H(X,Y) \le H(X) + H(Y),(18)✦ H(X)+H(Y)=H(X,Y)if and only ifp=pXpY,H(X) + H(Y) = H(X,Y) \quad \text{if and only if} \quad p = p_X p_Y,(19)✦ H(X|Y)≤H(X),H(X|Y) \le H(X),(20)✦ H(X:Y)≥0,H(X:Y) \ge 0,(21)✦ H(X:Y)=0if and only ifp=pXpY.H(X:Y) = 0 \quad \text{if and only if} \quad p = p_X p_Y.(22)✦ If pp is a probability distribution on 𝒳×𝒴×𝒵\mathcal X \times \mathcal Y \times \mathcal Z, then H(X,Y,Z)+H(Y)≤H(X,Y)+H(Y,Z),H(X,Y,Z) + H(Y) \le H(X,Y) + H(Y,Z),(23)✦ H(X,Y,Z)+H(Y)=H(X,Y)+H(Y,Z)if and only ifZ→Y→X,H(X,Y,Z) + H(Y) = H(X,Y) + H(Y,Z) \quad \text{if and only if} \quad Z \to Y \to X,(24)✦ H(X|Y,Z)≤H(X|Y).H(X|Y,Z) \le H(X|Y).(25)✦

What Is Checked

The theorem is stated over the entropy (1) of pp and of its marginals (2), (3), (8) and (9), combined into the conditional entropy (4) and the mutual information (5), with its cases of equality given by the product of the marginals (6), the dependence of YY on XX (7) and the Markov condition (10).

What the library proves about these constructions is the theorem, each part for every pp that meets its hypothesis.