Divergence, Entropy, Information: An Opinionated Introduction to Information Theory
Philip Chodrow

disposition

Efficient Tree Decomposition of High-Rank Tensors
    Adam S. Jermyn
    December 30, 2023
=================================================




	Information theory is a mathematical theory of learning with deep connections with topics as diverse as artificial intelligence, statistical physics, and biological evolution. 
	Many primers on information theory paint a broad picture with relatively little mathematical sophistication, while many others develop specific application areas in detail. 
	In contrast, these informal notes aim to outline some elements of the information-theoretic “way of thinking,” by cutting a rapid and interesting path through some of the theory's foundational concepts and results. 
	They are aimed at practicing systems scientists who are interested in exploring potential connections between information theory and their own fields. 
	The main mathematical prerequisite for the notes is comfort with elementary probability, including sample spaces, conditioning, and expectations.  

	We take the Kullback-Leibler divergence as our most basic concept, and then proceed to develop the entropy and mutual information. 
	We discuss some of the main results, including the Chernoff bounds as a characterization of the divergence; Gibbs' Theorem; and the Data Processing Inequality. 
	A recurring theme is that the definitions of information theory support natural theorems that sound “obvious” when translated into English.
	More pithily, “information theory makes common sense precise.”
	Since the focus of the notes is not primarily on technical details, proofs are provided only where the relevant techniques are illustrative of broader themes. 
	Otherwise, proofs and intriguing tangents are referenced in liberally-sprinkled footnotes. 
	The notes close with a highly nonexhaustive list of references to resources and other perspectives on the field. 






§ WHY INFORMATION THEORY?

	
	Briefly, information theory is a mathematical theory of learning with rich connections to physics, statistics, and biology. 
	Information-theoretic methods quantify complexity and predictability in systems, and make precise how observing one feature of a system assists in predicting other features. 
	Information-theoretic thinking helps to structure algorithms; describe processes in natural and engineered systems; and draw surprising connections between seemingly disparate fields. 

	Formally, information theory is a subfield of probability, the mathematical study of uncertainty and randomness.
	Information theory is distinctive in its emphasis on properties of probability distributions that are independent of how those distributions are represented. 
	Because of this representation-independence, information-theoretic quantities often have claim to be the most “fundamental” properties of a system or problem, governing its complexity, learnability, and intrinsic randomness. 

	In the original formulation of <cit.>, information theory is a theory of communication: specifically, the transmission of a signal of some given complexity over an unreliable channel, such as a telephone line corrupted by a certain amount of white noise. 
	Here we will emphasize a slightly different role for information theory, as a theory of learning more generally. 
	This emphasis is consistent with the original formulation, since the communication problem may be viewed as the problem of the message receiver learning the intent of the sender based on the potentially corrupted transmission. 
	However, the emphasis on learning allows us to more easily glimpse some of the rich connections of information theory to other disciplines. 
	Special consideration in these notes will be given to statistical motivations for information-theoretic concepts. 
	Theoretical statistics is the mathematical design of methods for learning from data; information-theoretic considerations determine when such learning is possible and to what extent. 
	We will close with a connection to physics; some connections to biology are cited in the references. 



§ WHY NOT START WITH ENTROPY?

	
	Entropy is easily the information-theoretic concept with the widest popular currency, and many expositions take entropy as their starting point. 
	We will, however, choose a different point of departure and derive entropy along the way. 
	Our primary object is the Kullback-Leibler (KL) divergence between two distributions, also called in some contexts the relative entropy, relative information, or free energy.[For the remainder of these notes I'll stick with “divergence” – though there are many other interesting objects called “divergences” in mathematics, we won't be discussing any of them here, so no confusion should arise.]
	Why start with the divergence? 
	Well, there's a simple reason – while we'll focus on discrete random variables here, we'd like to develop a theory that, wherever possible, applies to continuous random variables as well. 
	The divergence is well-defined for both discrete random variables and continuous ones; that is, if p and q are two continuous distributions satisfying certain regularity properties, then d(p,q) is a uniquely determined, nonnegative real number whether p and q are discrete or continuous. 
	In contrast, the natural definition of entropy (so called differential entropy) for continuous random variables has two bad behaviors. 
	First, it can be negative, which is undesirable for a measure of uncertainty. 
	Second, and arguably worse, the differential entropy is not even uniquely defined.
	There are multiple ways to describe the same continuous distribution – for example, the following three distributions are the same: 
	
		
  * “The Gaussian distribution with mean 0 and variance 1.”
		
  * “The Gaussian distribution with mean 0 and standard deviation 1.”
		
  * “The Gaussian distribution with mean 0 and second moment equal to 1.”
	
	Technically, the act of switching from one of these descriptions to another can be viewed as a smooth change of coordinates[I.e. a diffeomorphism: smooth, invertible functions on coordinate space whose inverses are also smooth.] in the space of distribution parameters. 
	For example, we move from the first description to the second by changing coordinates from (μ, σ^2) to (μ, σ), which we can do by applying the function f(x,y) = (x, √(y)). 
	Regrettably, the differential entropy is not invariant under such coordinate changes – change the way you describe the distribution, and the differential entropy changes as well. 
	This is undesirable. 
	The foundations of our theory should be independent of the contingencies of how we describe the distributions under study. 
	The divergence passes this test in both discrete and continuous cases; the differential entropy does not.[It is possible to define alternative notions of entropy that attempt to skirt these issues; however, they have their own difficulties. <https://en.wikipedia.org/wiki/Limiting_density_of_discrete_points>] 
	Since we can define the entropy in terms of the divergence in the discrete case, we'll start with the divergence and derive the entropy along the way. 



§ INTRODUCING THE DIVERGENCE

	It is often said that the divergence d(p,q) between distributions p and q measures how “surprised” you are if you think the state of the world is q but then measure it to be p. 
	However, this idea of surprise isn't always explained or made precise. 
	To motivate the KL divergence, we'll start from a somewhat unusual beginning – the Chernoff bounds – that makes exact the role that the divergence plays in governing how surprised you ought to be. 

	Let's begin with a simple running example. 
	You are drawing from an (infinite) deck of standard playing cards, with four card suits {, , , } and thirteen card values {1,…,13}. 
	We'll view the sets of possible values as alphabets: 𝒳 = {, , , } is the alphabet of possible suits, and 𝒴 = {1,…,13} the alphabet of possible values. 
	We'll let X and Y be the corresponding random variables, so for each realization, X ∈𝒳 and Y ∈𝒴.  

	Suppose that I have a prior belief that the distribution of suits in the deck is uniform. 
	My belief about the suits can be summarized by a vector q = (1/4,1/4, 1/4,1/4). 
	It's  convenient to view q as a single point in the probability simplex 𝒫^𝒳 of all valid probability distributions over 𝒳. 
	[Probability Simplex]
		For any finite alphabet 𝒳 with X = m, the probability simplex 𝒫^𝒳 is the set 
		
    𝒫^𝒳≜{ q ∈^m  | ∑_iq_i = 1,  q_i ≥ 0   ∀ i  } .

	
	
		It's helpful to remember that 𝒫^𝒳 is an m-1-dimensional space; the “missing” dimension is due to the constraint ∑_i q_i = 1. 
		When m = 3, 𝒫^𝒳 is an equilateral triangle; when m = 4 a tetrahedron, and so on. 
	

	If q is your belief, you would naturally expect that, if you drew enough cards, the observed distribution of suits would be “close” to q, and that if you could draw infinitely many cards, the distribution would indeed converge to q. 
	Let's make this precise: define p̂_n ∈𝒫^𝒳 to be the distribution of suits you observe after pulling n cards. 
	It's important to remember that p̂ is a random vector, which changes in each realization. 
	But it would be reasonable to expect that p̂→ q as n→∞, and indeed this is true almost surely (with probability 1) according to the Strong Law of Large Numbers, if q is in fact the true distribution of cards in the deck. 

	But what happens if you keep drawing cards and the observed distribution p̂_n is much different than your belief q? 
	Then you would justifiably be surprised, and your “level of surprise” can be quantified by the probability of observing p̂_n if the true distribution were q, which I'll denote (p̂_n ; q). 
	We'd naturally expect (p̂_n ; q)  to become small when n grows large. 
	Indeed, there is a quite strong result here – (p̂_n ; q) decays exponentially in n, with a very special exponent.

	[Kullback-Leibler Divergence]
		For p,q ∈𝒫^X, the Kullback-Leibler (KL) divergence of q from p is 
		
    d(p,q) ≜∑_x ∈𝒳 p(x) logp(x)/q(x) ,

		where we are using the conventions that log∞ = ∞, log 0 = -∞, 0 / 0 = 0, and 0 ×∞ = 0. 
	
	 
		Suppose that the card suits are truly distributed according to p ≠ q. Then, 
		
    e^-nd(p,q)/(n+1)^m≤(p̂_n;q) ≤ e^-n d(p,q) .

	

	So, the probability of observing p̂_n when you thought the distribution was q decays exponentially, with the exponent given by the divergence of your belief q from the true distribution p. 
	Another way to say this: ignoring non-exponential factors, 
	
    - 1/nlog(p̂_n;q)≅ d(p,q) ,

	that is, d(p,q) is the minus the log of your average surprise per card drawn. 
	The Chernoff bounds thus provide firm mathematical content to the idea that the divergence measures surprise. 

	To make this result concrete, suppose  I start with the belief that the deck is uniform over suits. 
	So, my belief is q = (1/4,1/4, 1/4,1/4) over the alphabet {, , , }. 
	Unbeknownst to me, you have removed all the black cards from the deck, which therefore has true distribution p = (0,0, 1/2, 1/2). 
	I draw 100 cards and record the suits. 
	How surprised am I by the suit distribution I observe? 
	The divergence between my belief and the true deck distribution is d(p,q) ≈ 0.69, so Theorem <ref> states that the dominating factor in the probability of my observing an empirical distribution close to p in 100 draws is e^-0.69 × 100 ≈ 10^-30. I am quite surprised indeed! 

	Can you have “negative surprise?” 
	Gibbs' inequality states that the answer is no: 
	 
		For all p,q ∈𝒫^𝒳, it holds that d(p,q) ≥ 0, with equality iff p = q. 
	
	In words, you can never have “negative surprise,” and you are only unsurprised if you what you observed is exactly what you expected. 
	
		There are lots of ways to prove Gibbs' Inequality; here's one with Lagrange multipliers.
		Fix p ∈𝒫^𝒳. 
		We'd like to show that the problem 
		
    min_q ∈𝒫^𝒳 d(p,q)

		has value 0 and that this value is achieved at the unique point q = p. 
		We need two gradients: the gradient of d(p,q) with respect to q and the gradient of the implicit constraint g(q) ≜∑_x ∈𝒳 q(x) = 1. 
		The former is 
		
    ∇_q d(p,q)    = ∇_q [ ∑_x ∈𝒳 p(x) logp(x)/q(x)] 
       = - ∇_q [ ∑_x ∈𝒳 p(x) log q(x) ] 
       = - p ⊘ q,

		where p ⊘ q is the elementwise quotient of vectors, and where we recall the convention 0 / 0 = 0. 
		On the other hand, 
		
    ∇_q g(q) = 1,

 		the vector whose entries are all unity. 
 		The method of Lagrange multipliers states that we should seek λ∈ such that 
 		
    ∇_qd(p,q) = λ∇_q(g_q),

 		or 
 		
    - p ⊘ q = λ1,

 		from which it's easy to see that the only solution is q = p and λ = -1. 
 		It's a quick check that the corresponding solution value is d(p,p) = 0, which completes the proof. 
	

	
		Theorem <ref> is the primary sense in which d behaves “like a distance” on the simplex 𝒫. 
		On the other hand, d is unlike a distance in that it is not symmetric and does not satisfy the triangle inequality.[In fact, d is related to a “proper” distance metric on 𝒫^𝒳, which is usually called the Fisher Information Metric and is the fundamental object of study in the field of information geometry <cit.>.]
	

	Let's close out this section by noting one of the many connections between the divergence and classical statistics. 
	Maximum likelihood estimation is a fundamental method of modern statistical practice; tools from linear regression to neural networks may be viewed as likelihood maximizers. 
	The divergence offers a particularly elegant formulation of maximum likelihood estimation: likelihood maximization is the same as divergence minimization. 
	Let θ be some statistical parameter, which may be multidimensional; for example, in the context of fitting normal distributions, we may have θ = (μ, σ^2); in the context of regression, θ may be the regression coefficients β. 
	Let p_X^θ be the probability distribution over X with parameters θ. 
	Let {x_1, …,x_n} be a sequence of i.i.d. observations of X. 
	Maximum likelihood estimation encourages us to find the parameter θ such that 
	
    θ^* = _θ∏_i = 1^n p_X^θ(x_i) ,

	i.e. the parameter value that makes the data most probable. To express this in terms of the divergence, we need just one more piece of notation: let p̂_X be the empirical distribution of observations of X. 
	Then, it's a slightly involved algebraic exercise to show that the maximum likelihood estimation problem can also be written 
	
    θ^* = _θ d(p̂_X, p_X^θ).

	This is rather nice  – maximum likelihood estimation consists in making the parameterized distribution p_X^θ as close as possible to the observed data distribution p̂_X in the sense of the divergence.[This result is another hint at the beautiful geometry of the divergence: the operation of minimizing a distance-like measure is often called “projection.” 
	Maximum likelihood estimation thus consists in a kind of statistical projection.]
	


§ ENTROPY

	After having put it off for a while, let's define the Shannon entropy. 
	If we think about the divergence as a (metaphorical) distance, the entropy measures how close a distribution is to the uniform. 

	[Shannon Entropy] 
		The Shannon entropy of p ∈𝒫^X is 
		
    H(p) ≜ -∑_x ∈𝒳 p(x) log p(x)  .

		When convenient, we will also use the notation H(X) to refer to the entropy of a random variable X distributed according to p. 
	
	
		The Shannon entropy is related to the divergence according to the formula
		
    H(p) = log m - d(p, u) ,

		where m = 𝒳 is the size of the alphabet 𝒳 and where u is the uniform distribution on 𝒳.[Here is as good a place as any to note that for discrete random variables, the divergence can also be defined in terms of the entropy. Technically, d is the Bregman divergence induced by the Shannon entropy, and can be characterized by the equation 
		
    d(p,q) =  - [H(p) - H(q) - ∇_q H, p - q] .

		Intuitively, d(p,q) is minus the approximation loss associated with estimating the difference in entropy between p and q using a first-order Taylor expansion centered at q. This somewhat artificial-seeming construction turns out to lead in some very interesting directions in statistics and machine learning.]  
	
	
		This formula makes it easy to remember the entropy of the uniform distribution – it's just log m, where m is the number of possible choices. 
		If we are playing a game in which I draw a card from the infinite deck, the suit of the card is uniform, and the entropy of the suit distribution is therefore H(X) = log 4 = 2log 2. 
	
	
		In words, d(p, u) is your surprise if you thought the suit distribution was uniform and then found it was in fact p. 
		If you are relatively unsurprised, then p is very close to uniform. 
		Indeed, Gibbs' inequality (Theorem <ref>) immediately implies that H(p) assumes its largest value of log m exactly when p = u. 
		
	
		Theorem <ref> provides one useful insight into why the Shannon entropy does not generalize naturally to continuous distributions.
		Whereas equation (<ref>) expresses the entropy in terms of  the uniform distribution on 𝒳, there can be no analogous formula for continuous random variables on  because there is no uniform distribution on . 
	

	

 §.§ A Bayesian Interpretation of Entropy

		The construction of the entropy in terms of the divergence is fairly natural.
		We use the divergence to measure how close p is to the uniform distribution, flip the sign so that high entropy distributions are more uniform, and add a constant term to make the entropy nonnegative. 
		This formulation of the entropy turns out to have another interesting characterization in the context of Bayesian prediction. 
		In Bayesian prediction, I will pull a single card from the deck. 
		Before I do, I ask you to provide a distribution p over the alphabet {, , , } representing your prediction about the suit of the card I pulled. 
		As examples, you can choose p = (1,0,0,0) if you are certain that the suite will be , or p = (1/4, 1/4, 1/4, 1/4) to express maximal ignorance. 
		After you guess, I pull the card, obtaining a sample x ∈𝒳, and reward you based on the quality of your prediction relative to the outcome x. 
		I do this based on a loss function f(p,x); after your guess I give you f(p,x) dollars, say. 
		If we assume that my aim is to encourage you to (a) report your true beliefs about the deck and (b) reward you based only on what happened (i.e. not on what could have happened), then there is essentially only one appropriate loss function f, which turns out to be closely related to the entropy.
		More formally, 

		
			A loss function f is proper if, for any alphabet 𝒴 and random variable Y on 𝒴, 
			
    p_X|Y = y = _p ∈𝒫^𝒳[f(p, x)|Y = y].

		
		
			In this definition, it's useful to think of Y as some kind of “side information” or “additional data.” 
			For example, Y could be my telling you that the card I pulled is a red card, which could influence your predictive distribution. 
			When f is proper, you have an incentive to factor that into your predictive distribution. 
			While it may feel that “of course” you should factor this in, not all loss functions encourage you to do so. 
			For example, if f is constant, then you have no incentive to use Y at all, since each guess is just as good as any other. 
			A proper loss function guarantees that you can maximize your payout (minimize your loss) by completely accounting for all available data when forming your prediction, which should therefore be p_X|Y = y. Thus, a proper loss function ensures that the Bayesian prediction game is “honest”. 	
			
		
			A loss function f is local if f(p,x) = ψ(p, p(x)) for some function ψ. 
		
		
			The function f is local iff f can be written as a function only of my prediction p and how much probabilistic weight I put on the event that actually occurred – not events that “could have happened” but didn't. Thus, a proper loss function ensures that the Bayesian prediction game is “fair.”
		

		Somewhat amazingly, the log loss function given by f(p,x) = -log p(x) is the only loss function that is both proper and local (both honest and fair), up to an affine transformation.  
		
			Let f be a local and proper reward function. Then, f(p, x) = A log p(x) + B for some constants A < 0 and B ∈.  
		
		Without loss of generality, we'll take A = -1 and B = 0. 
		The entropy in this context occurs as the expected log-loss when you know the distribution of suits in the deck. 
		If you know, say, that the proportions in the deck are p = (1/4, 1/4, 1/4, 1/4) and need to formulate your predictive distribution, Theorem <ref> implies that your best guess is just p, since you have no additional side information. 
		Then....
		[Entropy, Bayesian Characterization]
			The (Shannon) entropy of p is your minimal expected loss when playing the Bayesian prediction game in which the true distribution of suits is p. 
		
		
			To see that this definition is consistent with the one we saw before, we can simply compute the expectation: 
			
    [f(p,X)]    = [-log p(X)] 
       = -∑_x ∈𝒳 p(x) log p(x),

			which matches Definition <ref>. 
			The second inequality follows from the fact that, if you are playing optimally, p is both the true distribution of X and your best predictive distribution. 
		



§ CONDITIONAL ENTROPY

	The true magic of probability theory is conditional probabilities, which formalize the idea of learning: (A|B) represents my best belief about A given what I know about B. 
	While the Shannon entropy itself is quite interesting, information theory really starts becoming a useful framework for thinking probabilistically when we formulate the conditional entropy, which encodes the idea of learning as a process of uncertainty reduction. 
	
	In this section and the next, we'll need to keep track of multiple random variables and distributions. 
	To fix notation, we'll let p_X ∈𝒫^𝒳 be the distribution of a discrete random variable X on alphabet 𝒳, p_Y ∈𝒫^𝒴 the distribution of a discrete random variable Y on alphabet 𝒴, and p_X,Y∈𝒫^𝒳×𝒴 their joint distribution on alphabet 𝒳×𝒴. 
	Additionally, we'll denote the product distribution of marginals as p_X⊗ p_Y∈𝒫^𝒳×𝒴; that is, (p_X⊗ p_Y)(x,y) = p_X(x) p_Y(y). 
	
	[Conditional Entropy]
		The conditional entropy of X given Y is 
		
    H(X|Y) ≜∑_x, y ∈𝒳×𝒴 p_X,Y(x,y) log p_X|Y(x|y) .

	
	
		It might seem as though H(X|Y) ought to be defined as 
		
    H̃(X|Y) = ∑_x, y ∈𝒳×𝒴 p_X|Y(x|y) log p_X|Y(x|y) ,

		which looks more symmetrical. 
		However, a quick think makes clear that this definition isn't appropriate, because it doesn't include any information about the distribution of Y. 
		If Y is concentrated around some very informative (or uninformative) values, then H̃ won't notice that some values of Y are more valuable than others. 
	
	In the framework of our Bayesian interpretation of the entropy above, the conditional entropy is your expected reward in the guessing game assuming you receive some additional side information. 
	For example, consider playing the suit-guessing game in the infinite deck of cards. 
	Recall that the suit distribution is uniform, with entropy H(X) = H(u) = 2 log 2. 
	Suppose now that you get side information – when I draw the card from the deck, before I ask you to guess the suit, I tell you the color (black or red).
	Since for each color there are just two possible suits, the entropy decreases. 
	Formally, if X is the suit and Y the color, it's easy to compute that H(X|Y) = log 2.
	Comparing to our previous calculation that H(X) = 2log2, we see that knowing the color reduces your uncertainty by half. 

	The conditional entropy is somewhat more difficult to express in terms of the divergence, but it does have a useful relationship with the (unconditional) entropy. 
	
		The conditional entropy is related to the unconditional entropy as 
		
    H(X|Y) = H(X,Y) - H(Y),

		where H(X,Y) is the entropy of the distribution p_X,Y.
	
	
		This theorem is easy to remember, because it looks like what you get by recalling the definition of the conditional probability and taking logs: 
		
    p_X|Y(x|y) = p_X,Y(x,y)/p_Y(y).

		Indeed, take logs and compute the expectations over X and Y to prove the theorem directly.  
		Another way to remember this theorem is to just say it out: the uncertainty you have about X given that you've been told Y is equal to the uncertainty you had about both X and Y, less the uncertainty that was resolved when you learned Y. 
	
	From this theorem, it's a quick use of Gibbs' Inequality to show:
	 
		
    H(X|Y) ≤ H(X).

	
	That is, knowing Y can never make you more uncertain about X, only less. 
	This makes sense – after all, if Y is not actually informative about X, you can just ignore it. 

	Theorem <ref> implies that H(X) - H(X|Y) ≥ 0. 
	This difference quantifies how much Y reduces uncertainty about X; if H(X) - H(X|Y) = 0, for example, then H(X|Y) = H(X) and it is natural to say that Y “carries no information” about X. 
	We encode the idea of information as uncertainty reduction in the next section. 
	


§ INFORMATION THREE WAYS

	
	Thus far, we've seen two concepts – divergence and entropy – that play fundamentals role in information theory. 
	But neither of them exactly resemble an idea of “information,” so how does the theory earn its name? 
	Our brief note at the end of the last section suggests that we think about information as a relationship between two variables X and Y, in which knowing Y decreases our uncertainty (entropy) about X. 
	As it turns out, the idea of information that falls out of this motivation is a remarkably useful one, and can be formulated in many interesting and different ways. 
	Let's start by formalizing this notion:
	[Mutual Information]
		The mutual information I(X,Y) in Y about X is 
		
    I(X,Y) ≜ H(X) - H(X|Y).

 	 
	In the context of the Bayesian guessing game, I(X,Y) is the “value” of being told the suit color, compared to having to play the game without that information. 
	From our calculations above, in the suit-guessing game, I(X,Y) = H(X) - H(X|Y) = 2log 2 - log 2 = log 2. 

	Let's now express mutual information in two other ways. 
	Remarkably, these follow directly via simple algebra, but each identity provides a new way to think about the meaning of the mutual information. 
	
		The mutual information may also be written as:
		
    I(X,Y)    = d(p_X,Y, p_X⊗ p_Y) 
       = _Y[d(p_X|Y, p_X)]

	
	
	We'll start by unpacking equation (<ref>), which expresses the mutual information I(X,Y) as the divergence between the true joint distribution p_X,Y and the product distribution p_X⊗ p_Y. 
	Recall that p_X⊗ p_Y is what the distribution of X and Y would be, were they independent random variables. 
	Combining this observation with Gibbs' inequality, we obtain the following important facts: 
	
		I(X,Y) ≥ 0, with equality if and only if X and Y are independent.  
	
	So, I(X,Y) is something like a super-charged correlation coefficient, in that it measures the degree of statistical dependence between X and Y. However, the mutual information is more powerful than the correlation coefficient in two ways. 
	First, I(X,Y) detects all kinds of statistical relationships, not just linear ones. 
	Second, while the correlation coefficient can vanish for dependent variables, this never happens for the mutual information. 
	Zero mutual information implies dependence, period. 
	As a quick illustration, it's not hard to calculate or intuit that if X is the suit color and Z is the numerical value of the card pulled, then I(X,Z) = 0. 
	Intuitively, if we were playing the suit-guessing game and I offered to tell you the card's face-value, you would be rightly annoyed. 
	That's an unhelpful (“uninformative”) offer, because the face-values and suit colors are independent.[So, why don't we just dispose of correlation coefficients and use I(X,Y) instead? Well, correlation coefficients can be estimated from data relatively simply and are fairly robust to error. In contrast, I(X,Y) requires that we have reasonably good estimates of the joint distribution p_X,Y, which is not usually available. Furthermore, it can be hard to distinguish I(X,Y) = 10^-6 from I(X,Y) = 0, and statistical tests of significance that address this problem are much more complex than those for correlation coefficients.] 

	Equation (<ref>) has another useful consequence. 
	Since that formulation is symmetric in X and Y, 
	
		The mutual information is symmetric:
		
    I(X,Y) = I(Y,X) .

	
	
	Now let's unpack equation (<ref>). 
	One way to read this is as quantifying the danger of ignoring available information: d(p_X|Y = y, p_X) is how surprised you would be if you ignored the information Y=y and instead kept using p_X as your belief. 
	If I told you that the deck contained only red cards, but you chose to ignore this and continue guessing u = (1/4,1/4,1/4,1/4) as your guess, you would be surprised to keep seeing red cards turn up draw after draw. 
	Formulation (<ref>) expresses the mutual information as the expected surprise you would experience by ignoring your available side information Y, with the expectation taken over all the possible values the side information could assume. 
	While this formulation may seem much more opaque than (<ref>), it turns out to be remarkably useful when thinking geometrically, as it expresses the mutual information as the average “distance” between the marginal p_X and the conditionals p_X|Y. 
	Pursuing this thought usefully expresses the mutual information as something like the “moment of inertia” for the joint distribution p_X,Y. 



§ WHY INFORMATION SHRINKS

	
	The famous 2nd Law of Thermodynamics states that, in a closed system, entropy increases. 
	The physicists' concept of entropy is closely related to but slightly different from the information theorist's concept, and we therefore won't make a direct attack on the 2nd Law in these notes. 
	However, there is a close analog of the 2nd Law that gives much of the flavor and can be formulated in information theoretic terms. 
	Whereas the 2nd Law states that entropy grows, the Data Processing Inequality states that information shrinks. 
	
		Let X and Y be random variables, and let Z = g(Y), where g is any function g:𝒴→𝒵. Then, 
		
    I(X,Z) ≤ I(X,Y).
 	
	
	This is not the most general possible form of the Data Processing Inequality, but it has the right flavor. 
	The meaning of this theorem is both “obvious” and striking in its generality.
	If you are using Y to predict X, then any processing you do to Y can only reduce your predictive power. 
	Data processing can enable tractable computations; reduce the impact of noise in your observations; and improve your visualizations. 
	The one thing it can't do is create information out of thin air. 
	No amount of processing is a substitute for having sufficient, salient data. 

	We'll pursue the proof the Data Processing Inequality, as the steps are quite enlightening. 
	First, we need the conditional mutual information: 
	[Conditional Mutual Information]
		The conditional mutual information of X and Y given Z is
		
    I(X,Y|Z) = ∑_z ∈𝒵 p_Z(z)d(p_X,Y|Z = z,p_X|Z = z⊗ p_Y|Z = z).

	
	The divergence in the summand is naturally written I(X,Y|Z = z), in which case we have I(X,Y|Z) = ∑_z ∈𝒵 p_Z(z) I(X,Y|Z = z), which has the form of an expectation of mutual informations conditioned on specific values of Z. 
	The conditional mutual information is naturally understood as the value of knowing Y for the prediction of X, given that you already know Z. 
	Somewhat surprisingly, both of the cases I(X,Y|Z) > I(X,Y) and I(X,Y|Z) < I(X,Y) may hold; that is, knowing Z can either increase or decrease the value of knowing Y in the context of predicting X. 

	
		We have 
		
    I(X, (Y,Z)) = I(X, Z) + I(X, Y|Z).

	
	
		The notation I(X, (Y,Z)) refers to the (regular) mutual information between X and the random variable (Y,Z), which we can regard as a single random variable on the alphabet 𝒴×𝒵. 
	
	
		We can compute directly, dividing up sums and remembering relations like p_X,Y,Z(x,y,z) = p_X,Y|Z(x, y|z)p_Z(z). 
		Omitting some of the more tedious algebra,  
		
    I(X,(Y,Z))    = d(p_X, Y, Z, p_X⊗ p_Y,Z) 
       = ∑_x, z ∈𝒳×𝒵 p_X,Y|Z(x,  z)  logp_X,Z(x,z)/p_X(x)p_Z(z)  + 
         ∑_x, y, z ∈𝒳×𝒴×𝒵 p_Z(z)p_X,Y|Z(x, y| z) logp_X,Y|Z(x,y|z)/p_Y|Z(y|z)p_X|Z(x|z)
       = I(X,Z) + I(X,Y|Z) ,

		as was to be shown. 
	
	As always, the Chain Rule has a nice interpretation if you think about estimating X by first learning Z, and then Y.   
	At the end of this process, you know both Y and Z, and therefore have information I(X,(Y,Z)). 
	This information splits into two pieces: the information you gained when you learned Z, and the information you gained when you learned Y after already knowing Z. 

	We are now ready to prove the Data Processing Inequality.[Proof borrowed from <http://www.cs.cmu.edu/ aarti/Class/10704/lec2-dataprocess.pdf>] 
	
		Since Z = g(Y), that is, is a function of Y alone, we have that Z ⊥ X | Y, that is, given Y, Z and X are independent.[In fact, Z ⊥ X|Y is often taken as the hypothesis of the Data Processing inequality rather than Z = g(Y), as it is somewhat weaker and sufficient to prove the result.] 
		So, I(X,Z|Y) = 0. 
		On the other hand, using the chain rule in two ways, 
		
    I(X, (Y,Z))    = I(X,Z) + I(X,Y|Z) 
       = I(X,Y) + I(X,Z|Y).

		Since I(X,Z|Y) = 0 by our argument above, we obtain I(X,Y) = I(X,Z) + I(X,Y|Z). Since I(X,Y|Z) is nonnegative by Gibbs' inequality, we conclude that I(X,Z) ≤ I(X,Y), as was to be shown. 
	

	The Data Processing Inequality states that, in the absence of additional information sources, processing generically leaves you with less information than you started. 
	The 2nd Law of Thermodynamics states that, in the absence of additional energy sources, the system dynamics leave you with less order than you started. 
	These formulations suggest a natural parallel between the concepts of information and order, and therefore a natural parallel between the two theorems. 
	We'll close out this note with an extremely simplistic-yet-suggestive way to think about this. 

	Let X_0 and Y_0 each be random variables reflecting the possible locations and momenta of two particles at time t = 0. 
	We'll assume (a) that the particles don't interact, but that (b) the experimenter has placed the two particles very close to each other with similar momenta. 
	Thus, the initial configuration of the system is highly ordered, reflected by  I(X_0, Y_0) > 0. 
	If we knew Y_0, then we'd also significantly reduce our uncertainty about X_0. 
	How does this system evolve over time?
	We're assuming no interactions, so each of the particles evolve separately according to some short-timescale dynamics, which we can write X_1 = g_x(X_0) and Y_1 = g_y(Y_0). 
	Using the data processing inequality twice, we have 
	
    I(X_1, Y_1) ≤ I(X_0, Y_1) ≤ I(X_0, Y_0).

	Thus, the dynamics tend to reduce information. 
	Of course, we can complicate this picture in various ways, by considering particle interactions or external potentials, either of which require a more sophisticated analysis. 
	The full 2nd Law, which is beyond the scope of these notes, is most appropriate for considering these cases. 

	

§ SOME FURTHER READING


		Those interested in these topics have many opportunities to explore them in more detail. 
		The below is a short list of some of the resources I have found most intriguing and useful, in addition to those cited in the introduction.

		

 §.§ Information Theory “in General”


		
			
  * Claude Shannon's original work <cit.>.
			
  * Shannon's entertaining information-theoretic study of written English <cit.>.
			
  * The text of <cit.> is the standard modern overview of the field for both theorists and practitioners. 
			
  * Colah's blog post “Visual Information Theory” at <http://colah.github.io/posts/2015-09-Visual-Information/> is both entertaining and extremely helpful for getting basic intuition around the relationship between entropy and communication. 
		

		

 §.§ Information Theory, Statistics, and Machine Learning


			
				
  * An excellent and entertaining introduction to these topics is the already-mentioned <cit.>. 
				
  * Those who want to further explore will likely enjoy <cit.>, but I would suggest doing this one after MacKay. 
				
  * Readers interested in pursuing the Bayesian development of entropy much more deeply may enjoy <cit.>, which provides an extremely thorough development of decision theory with a strong information-theoretic perspective.  
				
  * The notes for the course “Information Processing and Learning” at Carnegie-Mellon's famous Machine Learning department are excellent and accessible; find them at <http://www.cs.cmu.edu/ aarti/Class/10704/lecs.html>
			

		

 §.§ Information Theory, Physics, and Biology


		
			
  * Marc Harper has some intriguing papers in which he views biological evolutionary dynamics as learning processes through the framework of information theory; a few are <cit.>. 
			
  * John Baez and his student Blake Pollard wrote a very nice and easy-reading review article of the role of information concepts in biological and chemical systems <cit.>. 
			
  * More generally, John Baez's blog is a treasure-trove of interesting vignettes and insights on the role that information plays in the physical and biological worlds: <https://johncarlosbaez.wordpress.com/category/information-and-entropy/>. For a more thoroughly worked-out connection between information dissipation and the Second Law of Thermodynamics, see this one: <https://johncarlosbaez.wordpress.com/2012/10/08/the-mathematical-origin-of-irreversibility/>. 
		




[Amari and Nagaoka, 2007]Amari2000
Amari, S.-I. and Nagaoka, H. (2007).
Methods of Information Geometry.
American Mathematical Society.

[Baez and Pollard, 2016]Baez2016
Baez, J. and Pollard, B. (2016).
Relative entropy in biological systems.
Entropy, 18(2):46.

[Bernardo and Smith, 2008]Bernardo2008
Bernardo, J. M. and Smith, A. F. (2008).
Bayesian Theory.
John Wiley and Sons, New York.

[Cover and Thomas, 1991]Cover1991
Cover, T. M. and Thomas, J. A. (1991).
Elements of Information Theory.
John Wiley and Sons, New York.

[Csiszar and Shields, 2004]Csiszzr2004
Csiszar, I. and Shields, P. C. (2004).
Information Theory and Statistics: A Tutorial.
Foundations and Trends™ in Communications and Information
  Theory, 1(4):417–528.

[Harper, 2009]Harper2009a
Harper, M. (2009).
Information geometry and evolutionary game theory, arXiv:
  0911.1383.
pages 1–13.

[Harper, 2010]Harper2009
Harper, M. (2010).
The replicator equation as an inference dynamic, arXiv: 0911.1763.
pages 1–10.

[MacKay, 2003]MacKay2005
MacKay, D. J. C. (2003).
Information Theory, Inference, and Learning Algorithms.
Cambridge Univeristy Press, 4th edition.

[Shannon, 1948]Shannon1948
Shannon, C. E. (1948).
A mathematical theory of communication.
The Bell System Technical Journal, 27:379–423.

[Shannon, 1951]Shannon1951
Shannon, C. E. (1951).
Prediction and entropy of printed English.
Bell System Technical Journal, 30(1):50–64.



apalike

