Lean, informalized

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

Exercise 11.10 - The Markov condition for three random variables survives reversing their order

A Markov chain read backwards is a Markov chain.

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

Three random variables XX, YY and ZZ take values in finite sets 𝒳\mathcal{X}, 𝒴\mathcal{Y} and 𝒵\mathcal{Z} and have a joint distribution p(x,y,z)p(x,y,z). Suppose they form a Markov chain X→Y→ZX \to Y \to Z, as when YY is the output of a noisy channel fed with XX and ZZ is produced from YY alone. The exercise is to show that the same variables, taken in the opposite order, also form a Markov chain Z→Y→XZ \to Y \to X.

In the library the Markov condition is an identity between pp and three of its marginals, and the reversed chain is the triple (Z,Y,X)(Z,Y,X) with the reversed distribution.

Marginals and the Markov Condition

The second marginal qVq_V of a joint distribution qq of two random variables UU and VV is the distribution of VV alone, obtained by summing out UU: qV(v)=∑uq(u,v).q_V(v) = \sum_{u} q(u,v).(1)✦ With XX as the first variable and the pair (Y,Z)(Y,Z) as the second, the second marginal of pp is the marginal of (Y,Z)(Y,Z), pYZ(y,z)=∑xp(x,y,z)p_{YZ}(y,z) = \sum_x p(x,y,z).

The middle marginal pYp_Y of pp is the distribution of YY alone, obtained from pYZp_{YZ} by summing out ZZ: pY(y)=∑zpYZ(y,z).p_Y(y) = \sum_{z} p_{YZ}(y,z).(2)✦ Summing ZZ out of pp itself gives the marginal pXYp_{XY} of the pair (X,Y)(X,Y), their joint distribution: pXY(x,y)=∑zp(x,y,z).p_{XY}(x,y) = \sum_{z} p(x,y,z).(3)✦

Three random variables XX, YY, ZZ with joint distribution pp form a Markov chain X→Y→ZX \to Y \to Z when XX and ZZ are conditionally independent given YY, that is, when p(x,y,z)pY(y)=pXY(x,y)pYZ(y,z)for all x,y,z.p(x,y,z)\, p_Y(y) = p_{XY}(x,y)\, p_{YZ}(y,z) \qquad \text{for all } x, y, z.(4)✦

The reversed distribution p̃\tilde p of pp is the joint distribution of the triple (Z,Y,X)(Z,Y,X) on 𝒵×𝒴×𝒳\mathcal{Z} \times \mathcal{Y} \times \mathcal{X} that gives each reversed triple of values the weight of the original one: p̃(z,y,x)=p(x,y,z).\tilde p(z,y,x) = p(x,y,z).(5)✦ Its marginals p̃ZY\tilde p_{ZY}, p̃YX\tilde p_{YX} and p̃Y\tilde p_Y are formed as in (1) to (3), with ZZ in the first place and XX in the last.

The Claim

Theorem 1. Let XX, YY, ZZ be random variables with joint distribution pp on 𝒳×𝒴×𝒵\mathcal{X} \times \mathcal{Y} \times \mathcal{Z}. If X→Y→ZX \to Y \to Z is a Markov chain, then so is Z→Y→XZ \to Y \to X: the reversed distribution p̃\tilde p satisfies p̃(z,y,x)p̃Y(y)=p̃ZY(z,y)p̃YX(y,x)for all x,y,z.\tilde p(z,y,x)\, \tilde p_Y(y) = \tilde p_{ZY}(z,y)\, \tilde p_{YX}(y,x) \qquad \text{for all } x, y, z.(6)✦

What Is Checked

The claim is stated over the Markov condition (4), built from the marginals (1) to (3), and over the reversed distribution (5). What the library proves about these constructions is the theorem above, for every real function pp on 𝒳×𝒴×𝒵\mathcal{X} \times \mathcal{Y} \times \mathcal{Z} and not only for probability distributions.