Lecture 1: Entropy and Mutual Information: 2.1 Example
Lecture 1: Entropy and Mutual Information: 2.1 Example
1 Introduction
Imagine two people Alice and Bob living in Toronto and Boston respectively. Alice (Toronto) goes
jogging whenever it is not snowing heavily. Bob (Boston) doesnt ever go jogging.
Notice that Alices actions give information about the weather in Toronto. Bobs actions give
no information. This is because Alices actions are random and correlated with the weather in
Toronto, whereas Bobs actions are deterministic.
How can we quantify the notion of information?
2 Entropy
Definition The entropy of a discrete random variable X with pmf pX (x) is
X
H(X) = p(x) log p(x) = E[ log(p(x)) ] (1)
x
The entropy measures the expected uncertainty in X. We also say that H(X) is approximately
equal to how much information we learn on average from one instance of the random variable X.
Note that the base of the algorithm is not important since changing the base only changes the
value of the entropy
P by a multiplicative constant.
P
Hb (X) = x p(x) logb p(x) = logb (a)[ x p(x) loga p(x)] = logb (a)Ha (X). Customarily, we use
the base 2 for the calculation of entropy.
2.1 Example
Suppose you have a random variable X such that:
0 with prob p
X= (2)
1 with prob 1 p,
Note that the entropy does not depend on the values that the random variable takes (0 and 1
in this case), but only depends on the probability distribution p(x).
1
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu
The joint entropy measures how much uncertainty there is in the two random variables X and Y
taken together.
The conditional entropy is a measure of how much uncertainty remains about the random variable
X when we know the value of Y .
2.3 Properties
The entropic quantities defined above have the following properties:
2
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu
Maximum entropy: Let X be set from which the random variable X takes its values
(sometimes called the alphabet), then
Non increasing under functions: Let X be a random variable and let g(X) be some
deterministic function of X. We have that:
so we have
H(X) H(g(X) = H(X|g(X)) 0. (14)
with equality if and only if we can deterministically guess X given g(X), which is only the
case if g is invertible.
Definition The differential entropy of a continuous random variable X with p.d.f f (x) is
Z
h(X) = f (x) log f (x)dx = E[ log(f (x)) ] (15)
Definition Consider a pair of continuous random variable (X, Y ) distributed according to the joint
p.d.f f (x, y). The joint entropy is given by
Z Z
h(X, Y ) = f (x, y) log f (x, y)dxdy, (16)
3
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu
3.1 Properties
Some of the properties of the discrete random variables carry over to the continuous case, but some
do not. Let us go through the list again.
Monotonicity:
h(X|Y ) h(X) (21)
The proof follows from the non-negativity of mutual information (later).
Maximum entropy: We do not have a bound for general p.d.f functions f (x), but we do
have a formula for power-limited functions. Consider a R.V. X f (x), such that
Z
E[x ] = x2 f (x)dx P,
2
(22)
then
1
max h(X) = log(2eP ), (23)
2
and the maximum is achieved by X N (0, P ).
To verify this claim one can useR standard Lagrange multiplier Rtechniques from calculus to
solve the problem max h(f ) = f log f dx, subject to E[x2 ] = x2 f dx P .
Non increasing under functions: Doesnt necessarily hold since we cant guarantee
h(X|g(X)) 0.
4 Mutual information
Definition The mutual information between two discreet random variables X, Y jointly distributed
according to p(x, y) is given by
X p(x, y)
I(X; Y ) = p(x, y) log (24)
x,y
p(x)p(y)
= H(X) H(X|Y )
= H(Y ) H(Y |X)
= H(X) + H(Y ) H(X, Y ). (25)
4
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu
Definition The mutual information between two continuous random variables X, Y with joint p.d.f
f (x, y) is given by
Z Z
f (x, y)
I(X; Y ) = f (x, y) log dxdy. (26)
f (x)f (y)
For two variables it is possible to represent the different entropic quantities with an analogy
to set theory. In Figure 4 we see the different quantities, and how the mutual information is the
uncertainty that is common to both X and Y .
H(X) H(Y )
Figure 1: Graphical representation of the conditional entropy and the mutual information.
Jensens inequality tells us something about the expected value of a random variable after
applying a convex function to it.
We say a function is convex on the interval [a, b] if, x1 , x2 [a, b] we have:
Another way stating the above is to say that the function always lies below the imaginary line
joining the points (x1 , f (x1 )) and (x2 , f (x2 )). For a twice-differentiable function f (x), convexity is
equivalent to the condition f 00 (x) 0, x [a, b].
5
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu
Lemma Jensens inequality states that for any convex function f (x), we have
Relative entropy A very natural way to measure the distance between two probability distribu-
tions is the relative entropy, also sometimes called the Kullback-Leibler divergence.
Definition The relative entropy between two probability distributions p(x) and q(x) is given by
X p(x)
D(p(x)||q(x)) = p(x) log . (30)
x
q(x)
The reason why we are interested in the relative entropy in this section is because it is related
to the mutual information in the following way
Thus, if we can show that the relative entropy is a non-negative quantity, we will have shown that
the mutual information is also non-negative.
Proof of non-negativity of relative entropy: Let p(x) and q(x) be two arbitrary probability distri-
butions. We calculate the relative entropy as follows:
X p(x)
D(p(x)||q(x)) = p(x) log
x
q(x)
X q(x)
= p(x) log
x
p(x)
q(x)
= E log
p(x)
q(x)
log E (by Jensens inequality for concave function log())
p(x)
!
X q(x)
= log p(x)
x
p(x)
!
X
= log q(x)
x
= 0.
6
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu
The conditional mutual information is a measure of how much uncertainty is shared by X and
Y , but not by Z.
4.3 Properties
Chain rule: We have the following chain rule
n
X
I(X ; Y1 Y2 . . . Yn ) = I(X; Yi |Y i1 ), (33)
i=1
To illustrate the last point, consider the following two examples where conditioning has different
effects. In both cases we will make use of the following equation
I(X; Y Z) = I(X; Y Z)
I(X; Y ) + I(X; Z|Y ) = I(X; Z) + I(X; Y |Z). (35)
Increasing example: If we have some X, Y, Z such that I(X; Z) = 0 (which means X and Z
are independent variables), then equation (35) becomes:
I(X; Y ) + I(X; Z|Y ) = I(X; Y |Z), (36)
so I(X; Y |Z) I(X; Y ) = I(X; Z|Y ) 0, which implies
I(X; Y |Z) I(X; Y ). (37)
Decreasing example: On the other hand if we have a situation in which I(X; Z|Y ) = 0,
equation (35) becomes:
I(X; Y ) = I(X; Z) + I(X; Y |Z), (38)
which in implies that I(X; Y |Z) I(X; Y ).
So we see that conditioning of the mutual information can both increase or decrease it depending
on the situation.
7
Tufts University EE194 Network Information Theory
Electrical and Computer Engineering Prof. Mai Vu