Lean, informalized

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

Theorem 11.4 - The chain rule for the conditional entropy of finitely many random variables

Conditional entropy splits one variable at a time.

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 Theorem

Theorem 11.4 is the chain rule for conditional entropies. Let X1,…,XnX_1, \dots, X_n and YY be random variables, each with finitely many values. The uncertainty about the whole string X1,…,XnX_1, \dots, X_n once YY is known is counted one variable at a time: the uncertainty about X1X_1 given YY, plus that about X2X_2 given YY and X1X_1, and so on up to XnX_n, given YY and all the variables before it.✦

Distributions and Entropy

A random variable XX with values in a finite set 𝒳\mathcal{X} is a function from a finite sample space Ω\Omega to 𝒳\mathcal{X}, where each point ω\omega of Ω\Omega carries a real weight μ(ω)\mu(\omega). The law pXp_X of XX, the image of μ\mu under XX, is the distribution on 𝒳\mathcal{X} that gives each value xx the total weight of the points where XX takes it: pX(x)=∑ω:X(ω)=xμ(ω).p_X(x) = \sum_{\omega \,:\, X(\omega) = x} \mu(\omega).(1)✦

Random variables taken together form one random variable, with the list of their values: for a second random variable YY with values in a finite set 𝒴\mathcal{Y}, the law of the pair ω↦(X(ω),Y(ω))\omega \mapsto (X(\omega), Y(\omega)) is the joint distribution pXYp_{XY} of XX and YY on 𝒳×𝒴\mathcal{X} \times \mathcal{Y}.

The Shannon entropy H(p)H(p) of a 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),(2)✦ with the natural logarithm, so that it is measured in nats.

The second marginal pYp_Y of a joint distribution pp on 𝒳×𝒴\mathcal{X} \times \mathcal{Y} is the distribution of the second variable alone, obtained by summing out the first: pY(y)=∑x∈𝒳p(x,y).p_Y(y) = \sum_{x \in \mathcal{X}} p(x, y).(3)✦

For random variables, pp is their joint distribution pXYp_{XY}; subtracting the entropy of its second marginal pYp_Y from that of pp gives the conditional entropy H(X∣Y)H(X \mid Y): H(X∣Y)=H(p)−H(pY).H(X \mid Y) = H(p) - H(p_Y).(4)✦ A list of random variables on either side of the bar, as in H(Xi∣Y,X1,…,Xi−1)H(X_i \mid Y, X_1, \dots, X_{i-1}), is the one random variable the list forms.

The Claim

Theorem 1. Let Ω\Omega be a finite sample space with real weights μ\mu, let X1,X2,…X_1, X_2, \dots be random variables on Ω\Omega with values in a finite set 𝒳\mathcal{X}, and let YY be a random variable on Ω\Omega with values in a finite set 𝒴\mathcal{Y}. Then for every natural number nn, H(X1,…,Xn∣Y)=∑i=1nH(Xi∣Y,X1,…,Xi−1).H(X_1, \dots, X_n \mid Y) = \sum_{i=1}^{n} H(X_i \mid Y, X_1, \dots, X_{i-1}).(5)✦

For μ\mu a probability distribution on Ω\Omega this is Theorem 11.4.

What Is Checked

The claim is stated over the law (1) of a random variable on a finite sample space and over the conditional entropy (4) of the joint laws so formed, which rests on the Shannon entropy (2) and the second marginal (3). What the library proves about these constructions is the chain rule (5) itself.