Information Theory
Information Theory is a field which addresses two questions
  1. 1.
    Source Coding: How many bits do I need to losslessly represent an observation.
  2. 2.
    Channel Coding: How reliably and quickly can I communicate a message over a noisy channel.

Quantifying Information

Intuitively, for a PMF of a disrete random variable, the surprise associated with a particular realization is
logpX(x)-\log p_X(x)
since less probable realizations are more surprising. With this intuition, we can try and quantify the “expected surprise” of a distribution.

Definition 40

For a Discrete Random Variable
XpXX\sim p_X
, the Entropy of
XX
is given by
H(x)=E[log2pX(x)]=xXpX(x)log2pX(x).H(x) = \mathbb{E}\left[-\log_2 p_X(x)\right] = -\sum_{x\in\mathcal{X}} p_X(x)\log_2p_X(x).
Alternative interpretations of entropy are the average uncertainty and how random
XX
is. Just like probabilites, we can define both joint and conditional entropies.

Definition 41

For Discrete Random Variables
XX
and
YY
, the joint entropy is given by
H(X,Y)=E[log2pXY(x,y)]=x,yX×YpXY(x,y)log2pXY(x,y).H(X,Y) = \mathbb{E}\left[-\log_2p_{XY}(x, y)\right] = -\sum_{x,y\in\mathcal{X}\times\mathcal{Y}}p_{XY}(x, y)\log_2p_{XY}(x, y).

Definition 42

For Discrete Random Variable
XX
and
YY
, the conditional entropy is given by
H(YX)=E[log2pYX(yx)]=xXpX(x)H(YX=x).H(Y|X) = \mathbb{E}\left[-\log_2p_{Y|X}(y|x)\right] = \sum_{x\in\mathcal{X}}p_X(x)H(Y|X=x).
Conditional entropy has a natural interpretation which is that it tells us how surprised we are to see
Y=yY=y
given that we know
X=xX=x
. If
XX
and
YY
are independent, then
H(Y)=H(YX)H(Y) = H(Y|X)
because realizing
XX
gives no additional information about
YY
.

Theorem 23 (Chain Rule of Entropy)

H(X,Y)=H(X)+H(XY).H(X, Y) = H(X) + H(X|Y).
In addition to knowing how much our surprise changes for a random variable when we observe a different random variable, we can also quantify how much additional information observing a random variable gives us about another.

Definition 43

For random variables
XX
and
YY
, the mutual information is given by
I(X;Y)=H(X)H(XY)=H(Y)H(YX).I(X;Y) = H(X) - H(X|Y) = H(Y) - H(Y|X).

Source Coding

Source coding deals with finding the minimal number of bits required to represent data. This is essentially the idea of lossless compression. In this case, our message is the sequence of realizations of independently and identically distributed random variables
(Xi)i=1npX\left(X_i\right)_{i=1}^n \sim p_X
. The probability of observing a particular sequence is then
P(x1,x2,,xn)=i=1npX(xi).P(x_1, x_2, \cdots, x_n) = \prod_{i=1}^np_X(x_i).

Theorem 24 (Asymptotic Equipartition Property)

If we have a sequence of independently and identically distributed random variables
(Xi)i=1npX\left(X_i\right)_{i=1}^n \sim p_X
, then
1nlogP(x1,x2,,xn)-\frac{1}{n}\log P(x_1, x_2, \cdots, x_n)
converges to
H(X)H(X)
in probability.
Theorem 24 tells us that with overwhelming probability, we will observe a sequence that is assigned probability
2nH(X)2^{-nH(X)}
. Using this idea, we can define a subset of possible observed sequences that in the limit, our observed sequence must belong to with overwhelming probability.

Definition 44

For a fixed
ϵ>0\epsilon > 0
, for each
n1n\geq 1
, the typical set is given by
Aϵ(n)={(x1,x2,,xn):2n(H(X)+ϵ)P(x1,x2,,xn)2n(H(X)ϵ)}.A_\epsilon^{(n)} = \left\{ (x_1, x_2, \cdots, x_n) : 2^{-n(H(X)+\epsilon)}\leq P(x_1, x_2, \cdots, x_n) \leq 2^{-n(H(X)-\epsilon)} \right\}.
Two important properties of the typical set are that
  1. 1.
    limnP((x1,x2,,xn)Aϵ(n))=1\lim_{n\to\infty}P\left((x_1, x_2, \ldots, x_n) \in A_{\epsilon}^{(n)}\right) = 1
  2. 2.
    Aϵ(n)2n(H(X)+ϵ)|A_{\epsilon}^{(n)}| \leq 2^{n(H(X)+\epsilon)}
The typical set gives us an easy way to do source coding. If I have
NN
total objects, then I only need
logN\log N
bits to represent each object, so I can define a simple protocol which is
  1. 1.
    If
    (xi)i=1nAϵ2(n)(x_i)_{i=1}^{n} \in A^{(n)}_{\frac{\epsilon}{2}}
    , then describe them using the
    logAϵ2(n)n(H(X)+ϵ2)\log|A^{(n)}_{\frac{\epsilon}{2}}| \leq n\left(H(X)+\frac{\epsilon}{2}\right)
    bits
  2. 2.
    If
    (xi)i=1n∉Aϵ2(n)(x_i)_{i=1}^n \not \in A^{(n)}_{\frac{\epsilon}{2}}
    , then describe them naiively with
    nlogXn\log|\mathcal{X}|
    bits.
This makes the average number of bits required to describe a message
E[# of Bits]n(H(X)+ϵ2)P((xi)i=1nAϵ2(n))+nlogXP((xi)i=1nAϵ2(n))n(H(X)+ϵ2)+nϵ2n(H(X)+ϵ)\begin{aligned} \mathbb{E}\left[\text{\# of Bits}\right] &\leq n\left(H(X)+\frac{\epsilon}{2}\right)P\left((x_i)_{i=1}^n\in A_{\frac{\epsilon}{2}}^{(n)}\right) + n\log |\mathcal{X}|P\left((x_i)_{i=1}^n\in A_{\frac{\epsilon}{2}}^{(n)}\right) \\ &\leq n(H(X)+\frac{\epsilon}{2}) + n \frac{\epsilon}{2} \leq n(H(X)+\epsilon)\end{aligned}
This is the first half of a central result of source coding.

Theorem 25 (Source Coding Theorem)

If
(Xi)i=1npX(X_i)_{i=1}^n \sim p_X
are a sequence of independently and identically distributed random varibles, then for any
ϵ>0\epsilon > 0
and
nn
sufficiently large, we can represent
(Xi)i=1n(X_i)_{i=1}^n
using fewer than
n(H(X)+ϵ)n(H(X) + \epsilon)
bits. Conversely, we can not losslessly represent
(Xi)i=1n(X_i)_{i=1}^n
using fewer than
nH(X)nH(X)
bits.
This lends a new interpretation of the entropy
H(X)H(X)
: it is the average number of bits required to represent
XX
.

Channel Coding

Whereas source coding deals with encoding information, channel coding deals with transmitting it over a noisy channel. In general, we have a message
MM
, and encoder, a channel, and a decoder as in Figure 1.
Figure 1: Channel Coding
Each channel can be described by a conditional probability distribution
pYX(yx)p_{Y|X}(y|x)
for each time the channel is used.

Definition 45

For a channel described by
pYXp_{Y|X}
, the capacity is given by
C=maxpXI(X;Y).C = \max_{p_X} I(X; Y).
In words, the capacity describes the maximum mutual information between the channel input and output.

Definition 46

Suppose we use the channel
nn
times to send a message that takes on average
H(m)H(m)
bits to encode, then the rate of the channel is
R=H(M)nR = \frac{H(M)}{n}

Theorem 26 (Channel Coding Theorem)

For a channel decsribed by
pYXp_{Y|X}
and
ϵ>0\epsilon>0
and
R<CR < C
, for all
nn
sufficiently large, there exists a rate
RR
communication scheme that achieves a probability of error less than
ϵ\epsilon
. If
R>CR > C
, then the probability of error converges to 1 for any communication scheme.