2.1 Entropy
Entropy
The entropy of a discrete RV is defined by
Note: the log is in base as we express entropy in bits (changing the base of entropy just rescales it by a constant factor)
- we use the convention that (which can be seen from the limit)
- we can also just sum over .
This definition is equivalent to writing .
You can immediately see that the entropy depends only on the probabilities, not the values that takes.
→ Entropy basically measures how concentrated the PMF is.
Where does Entropy Come from
The definition of entropy as the negative sum over logs arises naturally from the conditions we pose to our “measure of information” or “surprise”
- depends continuously on
- is decreasing in
- if are independent
Example: Entropy of a coinflip for varying . is concave, vanishes at , and reaches its maximum of bit at .

Nonnegativity of Entropy
For every it holds that:
Proof: For every we have , so . Entropy is an average of these terms.
2.2 Joint and Conditional Entropy
We can also define the entropy for multiple RVs:
Joint Entropy
For a pair of discrete random variables , the joint entropy is
Note: This adds nothing new → = single vector-valued RV
Conditional Entropy
For , the conditional entropy of given is the entropy of the conditional distributions, averaged over :
2.2.1 Chain Rule
Proof: Since ,
A shorter route: take expectations of both sides of .
Conditional Chain Rule
Note: In general , but the differences always agree: .
→ this value is , the mutual information (i.e. what they share)
2.3 Relative Entropy and Mutual Information
Relative Entropy (Kullback–Leibler Distance)
For two probability mass functions on , the relative entropy is
The following conventions apply: , , and for . So if some has and , then .
Note: .
Cross entropy vs. Entropy is not the same as ! is called cross-entropy! With cross-entropy, we can compare two pmf's on the same .
Cross-Entropy Framing: if you code with a code designed for when the true distribution is , you pay bits on average instead of .
Note: is not a metric:
- not symmetric, i.e. in general)
- doesn’t satisfy the triangle inequality
Example: Asymmetry of knowledge about a coin. Assume we have and two coins.
-
if we have a string of events → for sure must be , since cannot have heads
-
but for → can only say it’s probably .
→ this is reflected in but .
Mutual Information
Let have joint pmf and marginals , . The mutual information is the relative entropy between the joint distribution and the product of the marginals:
2.4 Relationship Between Entropy and Mutual Information
Mutual Information and Entropy
The following properties hold:
Proof: Use :
→ is the reduction in uncertainty about from knowing , and tells you exactly as much about as tells you about .
- → entropy is sometimes called self-information.

2.5 Chain Rules for Entropy, Relative Entropy, and Mutual Information
Chain Rule for Entropy
Let . Then
We can repeatedly apply the two variable expansion rule to get the general chain rule:
Proof: Write . Then
Conditional Mutual Information
The conditional mutual information of and given is the reduction in uncertainty about from learning when is already known:
Note From exercise sheet 3 we know that has no relation to in general.
Chain Rule for Mutual Information
Proof:
We can also define conditionality for relative entropy (i.e. Kullback-Leibler distance).
Conditional Relative Entropy
For joint pmfs and , the conditional relative entropy is the relative entropy between the conditionals and , averaged over :
Which we can also write as follows:
Chain Rule for Relative Entropy
Proof: Factor both joints as marginal times conditional and split the logarithm:
Marginals
For two joint distributions on , the divergence of the joints is at least the divergence of the marginals:
with equality iff for all with .
Note: this follows directly from the chain rule and .
2.6 Jensen’s Inequality and Its Consequences
From Jensen’s inequality we can derive things like QM-GM, AM-GM, etc… and it will be very useful in general.
Jensen's Inequality
If is convex and is a random variable, then
Note If is strictly convex and this implies with probability , so is constant.
Proof: For discrete , induct on the number of mass points. For the inequality is exactly the definition of convexity. For the inductive step, set for . Then
It holds more generally for any with .
Information Inequality (or Gibb's)
For pmfs on ,
with equality if and only if for all .
Proof: Let be the support of . Then
→ this uses inverse Jensen’s (for concave) in the second step (as is concave).
Equality If , then are equal.
- as is strictly concave, we only have the equals for a constant function.
- This means that .
Nonnegativity of Mutual Information
For any random variables , with equality if and only if and are independent.
Proof: , with equality if and only if .
Nonnegativity of Conditional Relative Entropy
with equality if and only if for all and all with .
Nonnegativity of Conditional Mutual Information
with equality if and only if and are conditionally independent given .
2.6.1 Entropy Inequalities
We can show that the uniform distribution maximises entropy.
Uniform Distribution Maximizes Entropy
with equality if and only if is uniform on .
Proof: Let . Then
New information cannot “hurt” → it always lowers entropy → we now know more.
Nothing about variable could make us know less about on average.
Conditioning Reduces Entropy
with equality if and only if and are independent.
Proof: .
Note: This holds only on average. A particular observation can increase uncertainty, so is possible.
Example: Let have distribution:
- Then bit.
- Observing gives , while observing gives bit, which is more than .
- On average, though, bit, which is less.
Entropy of combined variables cannot be higher then the sum of entropies:
Independence Bound on Entropy
Let . Then
with equality if and only if the are independent.
Proof: By the chain rule and the fact that conditioning reduces entropy,
Equality each is independent of → equivalent to the being mutually independent.
2.7 Log Sum Inequality and Its Applications
Log Sum Inequality
For nonnegative numbers and ,
with equality if and only if is constant.
The conventions are , for , and .
Proof: Without loss of generality, all . The function is strictly convex, since .
- Apply Jensen’s inequality with weights and points :
- Multiplying through by gives the claim.
Example: The log sum inequality gives a second proof that :
Convexity of Relative Entropy
is convex in the pair . That is, for pairs of pmfs , and ,
Proof: For each fixed , apply the log sum inequality with , , , , :
→ Summing over gives the result.
Concavity of Entropy
is a concave function of .
Proof: , where is uniform. With fixed, is convex, and it’s → so is concave.
→ mixing two gases of equal entropy produces a gas with higher entropy.
Concavity and Convexity of Mutual Information
Let . Then is
- concave in for fixed , and
- convex in for fixed .
Note: channel capacity: is a omaximization of a concave function
TODO → Understand this better
2.10 Fano’s Inequality
We want to quantify the error when guessing the value of RV , knowing only the value of RV .
- if , i.e. is a function of we can know with 0 error probability
- for other cases, the lower conditional entropy, the lower the guess
→ Fano’s inequality makes this quantitative.
Suppose we want to guess the value of RV , using . We calculate , where is an estimate of and takes on values in .
- doesn’t need to be = to
- can be random.
Probability of Error
Let , where is an estimator of taking values in . The estimator may be randomized, and need not equal . The probability of error is
Note: is a Markov Chain.
Fano's Inequality
For any estimator with and ,
Weaker but often more convenient forms are
Proof: Define the error indicator if and otherwise. Expand with the chain rule in two ways:
The three marked bounds hold for the following reasons:
- is a function of , so .
- Conditioning reduces entropy, and is binary, so .
- Given we have , and given the entropy is at most , so
This proves .
Data processing Inequality on gives
- which is equivalent to .
Note: In particular, forces .
Fano Without an Estimator
For any random variables , let . Then
Proof: Apply Fano’s inequality with .
If we force the estimator to take values in , we can sharpen the bound:
Sharpened Fano
If the estimator takes values in , that is , then
Proof: proof is the same as for Fano’s inequality, except for one bound:
- Given and , the value can only lie in the values other than .
- So .
Fano’s inequality is sharp:
- For the worst possible , i.e. suppose there is no observation and , and .
- The best guess is , with , and Fano gives .
Collision Probability Bound
If and are i.i.d. with entropy , then
with equality if and only if is uniform.
Proof: The function is convex, so by Jensen’s inequality . That is,
Collision Bound for Different Distributions
Let and be independent on . Then
Proof: For the first bound,
The inequality is Jensen’s inequality for the convex function . The second bound follows by swapping the roles of and .