Source Coding
Source Coding
Chirayu Athalye
Basic Concepts
Source Coding
Theorem
Source Coding
Techniques
Information and its Efficient Representation Applications
AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Chirayu D. Athalye Stochastic Process
References
2026
Source Coding
Let X be a discrete random variable with possible outcomes {x1 , . . . , xn }. The self information Basic Concepts
of the event X = xi is given by Self Information and Mutual
Information
Average Mutual Information
1 and Entropy
I (xi ) := log = − log P(xi ) ≥ 0.
P(xi ) Information Measures for
Continuous RVs
KL Divergence and JS
Remark: Divergence
Source Coding
1 The unit of self information depends on the base of log (Common Choices: 2 or e). Theorem
2 Depending upon whether the base is 2 or e, we have bits or nats as the unit. Source Coding
Techniques
Applications
Chirayu Athalye
Source Coding
Example (Desired Additive Property of log(·) Measure) Techniques
AEP: Asymptotic
Source C consists of two independent binary sources A and B that generates equiprobable Equipartition Property
outputs {0, 1}. Entropy Rate of a
Stochastic Process
Thus, outputs {00, 01, 10, 11} generated by source C are equiprobable. Notice that References
I (cij ) = − log2 P(cij ) = − log2 P(ai ) P(bj ) = − log2 (0.25) = 2 bits.
Thus, the information content of the source C is sum of the information content of sources
A and B.
Source Coding
Chirayu Athalye
Mutual Information
Basic Concepts
Let X and Y be random variables with possible outcomes {x1 , . . . , xn } and {y1 , . . . , ym }. Self Information and Mutual
Information
Source Coding
Interpretation of I (xi ; yj ): Information provided (reduction in uncertainty) by the occurrence of Techniques
AEP: Asymptotic
Equipartition Property
Let random variables X and Y represent the input and output of a BSC. Basic Concepts
Self Information and Mutual
Information
Average Mutual Information
P(Y = 0|X = 0) = 1 − p, and Entropy
Information Measures for
P(Y = 0|X = 1) = p, Continuous RVs
KL Divergence and JS
P(Y = 1|X = 1) = 1 − p, Divergence
Source Coding
Techniques
Let P(X = 0) = P(X = 1) = 0.5. Using the total probability theorem, Applications
AEP: Asymptotic
P(Y = 0) = 0.5(1 − p) + 0.5p = 0.5. Equipartition Property
Entropy Rate of a
P(Y = 1) = 0.5p + 0.5(1 − p) = 0.5. Stochastic Process
References
Mutual information about occurrence of the event X = 0 given that we observed Y = 0 is
1−p
I (x0 ; y0 ) = I (y0 ; x0 ) = log2 = log2 2(1 − p) .
0.5
p
Similarly, I (x1 ; y0 ) = I (y0 ; x1 ) = log2 0.5 = log2 (2p).
Source Coding
Example (Binary Symmetric Channel (BSC)) Chirayu Athalye
Source Coding
Techniques
Applications
AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Stochastic Process
References
Figure: Plot of mutual information I (x0 ; y0 ) = log2 2(1 − p) vs error probability p.
Source Coding
Let random variables X and Y represent the input and output of a binary channel. Basic Concepts
Self Information and Mutual
Information
Average Mutual Information
P(Y = 0 | X = 0) = 1 − p0 , and Entropy
Information Measures for
P(Y = 0 | X = 1) = p1 , Continuous RVs
KL Divergence and JS
P(Y = 1 | X = 1) = 1 − p1 , Divergence
Source Coding
Techniques
Let P(X = 0) = P(X = 1) = 0.5. Using the total probability theorem, Applications
AEP: Asymptotic
P(Y = 0) = 0.5(1 − p0 ) + 0.5p1 = 0.5(1 − p0 + p1 ). Equipartition Property
References
Mutual information about occurrence of the event X = 0 given that we observed Y = 0 is
1 − p0 2(1 − p0 )
I (x0 ; y0 ) = I (y0 ; x0 ) = log2 = log2 .
0.5(1 − p0 + p1 ) 1 − p0 + p1
Similarly, I (x1 ; y0 ) = I (y0 ; x1 ) = log2 1−p2p01+p1 .
Source Coding
Conditional Self Information Chirayu Athalye
Let X and Y be random variables with possible outcomes {x1 , . . . , xn } and {y1 , . . . , ym }.
Basic Concepts
The conditional self information of the event X = xi given Y = yj is defined as Self Information and Mutual
Information
Average Mutual Information
1 and Entropy
I (xi | yj ) := log = − log P(xi | yj ) ≥ 0.
P(xi | yj ) Information Measures for
Continuous RVs
KL Divergence and JS
Interpretation of I (xi | yj ): The self information about the event X = xi having observed the Divergence
Source Coding
Techniques
How self information, mutual information, and conditional self information are related?
Applications
P(yj ) P(xi )
By Bayes’ rule, = . Taking − log(·) of both sides, we get AEP: Asymptotic
P(yj | xi ) P(xi | yj ) Equipartition Property
Entropy Rate of a
Stochastic Process
I (xi ; yj ) = I (xi ) − I (xi | yj ).
References
This follows from the definitions too!
Interpretation:
1 I (xi ): How surprising is the event X = xi .
2 I (xi | yj ): How surprising is the event X = xi once we know Y = yj has occurred.
3 I (xi ; yj ): How much knowing Y = yj reduces/increases the surprise of the event X = xi .
Source Coding
Chirayu Athalye
Source Coding
Theorem
Remark: Source Coding
Techniques
1 I (X ; Y ) ≥ 0; equality holds iff X and Y are statistically independent.
Applications
2 Since I (xi ; yj ) = I (yj ; xi ), we have I (X ; Y ) = I (Y , X ). AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Entropy (Average Self Information) Stochastic Process
References
The average self information of a random variable X with possible outcomes {x1 , . . . , xn } is
given by n n
X X
H(X ) := P(xi ) I (xi ) = − P(xi ) log P(xi ) ≥ 0
i=1 i=1
Source Coding
Chirayu Athalye
Remark
Basic Concepts
1 The term entropy originates from statistical mechanics, where it quantifies the level of Self Information and Mutual
Source Coding
Consider a binary source X that emits 0 and 1 with Techniques
probabilities p and (1 − p), respectively. Applications
Remark: Entropy of a discrete source is maximum when symbols generated from the source are
equiprobable.
Source Coding
Chirayu Athalye
However, all letters don’t have the same probability. If we consider the normalized letter KL Divergence and JS
Divergence
References
Therefore, the redundancy of English is
HL 1.5
REng := 1 − ≥ 1− = 0.681.
log2 (26) log2 (26)
Source Coding
Chirayu Athalye
Conditional Entropy (Average Conditional Self Information)
Basic Concepts
Let X and Y be random variables with possible outcomes {x1 , . . . , xn } and {y1 , . . . , ym }. Self Information and Mutual
Information
Average Mutual Information
The conditional entropy of X given Y is defined as and Entropy
Information Measures for
n X
X m n X
X m Continuous RVs
Source Coding
How Entropy, Average Mutual Information, and Conditional Entropy are related? Techniques
Applications
It follows from the definitions that
AEP: Asymptotic
I (X ; Y ) = H(X ) − H(X | Y ) = H(Y ) − H(Y | X ). Equipartition Property
Entropy Rate of a
Remark: Stochastic Process
References
1 Since I (X ; Y ) ≥ 0, we have H(X ) ≥ H(X | Y ); i.e., observation of Y can only decrease
the entropy.
2 H(X ) = H(X | Y ) iff X and Y are statistically independent.
3 I (X ; X ) = H(X ).
Source Coding
Let X and Y be discrete random variables with the joint PMF pX ,Y . Basic Concepts
Self Information and Mutual
The joint entropy of (X , Y ) is given by Information
Average Mutual Information
n X
X m and Entropy
H(X , Y ) := − pX ,Y (xi , yj ) log pX ,Y (xi , yj ) . Information Measures for
Continuous RVs
Source Coding
Theorem
Source Coding
Techniques
Chain Rule for Entropy
Applications
In general,
n
X
H(X1 , . . . , Xn ) = H(X1 ) + H(Xk | X1 , . . . , Xk−1 ).
k=2
Source Coding
Chirayu Athalye
Basic Concepts
Self Information and Mutual
Information
Average Mutual Information
and Entropy
Information Measures for
Continuous RVs
KL Divergence and JS
Divergence
Source Coding
Example Theorem
Source Coding
Techniques
Applications
AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Stochastic Process
References
Source Coding
Information Measures for Continuous Random Variables (RVs)
Chirayu Athalye
Basic Concepts
Self Information and Mutual
Information
Average Mutual Information Average Mutual Information
and Entropy
Let X and Y be continuous RVs with the joint PDF fX ,Y . Information Measures for
Continuous RVs
KL Divergence and JS
The average mutual information between X and Y is given by Divergence
Z ∞ Z ∞ Source Coding
fX |Y (x | y)
Theorem
I (X ; Y ) := fX ,Y (x, y) log dxdy.
−∞ −∞ fX (x) Source Coding
Techniques
Applications
Remark AEP: Asymptotic
Equipartition Property
1 The definition of average mutual information can be extended to continuous RVs, but not
Entropy Rate of a
the physical interpretation. Stochastic Process
References
2 Note that the information content of a continuous RV is infinite.
3 Thus, instead of entropy, we consider differential entropy for a continuous RV.
4 However, there is no physical interpretation attached to the differential entropy.
Source Coding
Differential Entropy Chirayu Athalye
Source Coding
Theorem
Conditional Differential Entropy Source Coding
Techniques
The conditional differential entropy of a continuous random variable X given Y is defined as Applications
Z ∞ Z ∞
AEP: Asymptotic
h(X | Y ) := − fX ,Y (x, y) log fX |Y (x | y) dxdy. Equipartition Property
−∞ −∞ Entropy Rate of a
Stochastic Process
References
Remark
1 I (X ; Y ) = h(X ) − h(X | Y ) = h(Y ) − h(Y | X ).
n
X
2 Chain Rule for Differential Entropy: h(X1 , . . . , Xn ) = h(X1 ) + h(Xk | X1 , . . . , Xk−1 ).
k=2
3 If X and Y are independent, then h(X + Y ) ≥ h(X ).
Source Coding
Relative Entropy (Kullback-Leibler (KL) Divergence) Chirayu Athalye
x∈X
q(x) Average Mutual Information
and Entropy
Entropy Rate of a
Stochastic Process
Remark References
Chirayu Athalye
Basic Concepts
Self Information and Mutual
Information
Average Mutual Information
Jensen-Shannon Divergence and Entropy
Information Measures for
Jensen-Shannon divergence between two probability distributions p and q is given by Continuous RVs
KL Divergence and JS
Divergence
DKL (p k r ) + DKL (q k r ) p+q
JSD(p k q) = , where r= . Source Coding
2 2 Theorem
Source Coding
Techniques
Remark Applications
1 If we use log2 (·), then 0 ≤ JSD(p k q) ≤ 1. AEP: Asymptotic
Equipartition Property
2 Square root of Jensen-Shannon divergence is a metric (Jensen-Shannon distance). Entropy Rate of a
Stochastic Process
3 Similarity between distributions is greater when Jensen-Shannon distance is closer to 0.
References
Source Coding
Chirayu Athalye
Code and Prefix Code
Basic Concepts
1 A code is a set of codewords (sequence of bits assigned to symbols).
Source Coding
2 A prefix code is a code in which no codeword forms a prefix of any other codeword. Theorem
Code and Prefix Code
Kraft Inequality
Source Coding
1 In a prefix code, when a sequence of bits corresponding to a possible codeword is detected, Techniques
AEP: Asymptotic
2 A prefix codes are uniquely decodable. Equipartition Property
Entropy Rate of a
Stochastic Process
Fixed Length Code (FLC) vs Variable Length Code (VLC) References
Chirayu Athalye
Basic Concepts
Source Coding
Theorem
Code and Prefix Code
Kraft Inequality
Source Coding Theorem
Source Coding
Techniques
Example Applications
AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Stochastic Process
References
Source Coding
1 An equivalent condition for the existence of a binary code with codewords of length Basic Concepts
`
Source Coding
X
n1 ≤ · · · ≤ n` that satisfy the prefix condition is 2−nk ≤ 1. Theorem
Code and Prefix Code
k=1
Kraft Inequality
2 An equivalent condition for the existence of an M-alphabet code with codewords of length Source Coding Theorem
`
X Source Coding
n1 ≤ · · · ≤ n` that satisfy the prefix condition is M −nk ≤ 1. Techniques
Applications
k=1
AEP: Asymptotic
Equipartition Property
References
We want to generate a prefix code for symbols {x1 , . . . , x4 }.
Consider a binary tree with the parent node labeled as n0 .
Two branches with labels 0 and 1 emanating from each node.
First codeword c1 = 0 at node n00 . Ignore all heirs of n00 .
Second codeword c2 = 10 at node n010 . Ignore all heirs of n010 .
c3 = 110 and c4 = 111 at nodes n0110 and n0111 , respectively.
Prefix Code: {0, 10, 110, 111}; satisfies Kraft’s inequality.
Source Coding
Source Coding Theorem Chirayu Athalye
AEP: Asymptotic
Equipartition Property
Remark Entropy Rate of a
Stochastic Process
1 For a prefix code, the minimum average length required to represent source symbols is equal to the
References
entropy of the source.
2 A source with higher entropy requires, on an average, more # of bits to represent source symbols
using a prefix code.
3 Efficient representation of symbols leads to compression of data.
4 Source coding theorem is primarily used for compression of data (speech, text, image, video, etc.)
H(X )
The efficiency of a prefix code is defined as η := ≤ 1.
R̄
Source Coding
Chirayu Athalye
Example
Suppose a source X generates symbols {x1 , . . . , x4 } with probabilities {0.5, 0.3, 0.1, 0.1}. Basic Concepts
Source Coding
4
X Theorem
Source Entropy: H(X ) = − pk log2 pk = 1.685 bits. Code and Prefix Code
Kraft Inequality
k=1 Source Coding Theorem
If we use the prefix code {0, 10, 110, 111} to represent {x1 , . . . , x4 }, then Source Coding
Techniques
4
X Applications
References
Suppose the source symbol probabilities are {0.5, 0.25, 0.125, 0.125}. In this case,
H(X ) = R̄ = 1.7 bits and η = 1.
Source Coding
1 It is a variable length prefix code that is optimal among all prefix codes. Theorem
2
2 It is a greedy algorithm . Source Coding
Techniques
Applications: Huffman Coding
Shannon-Fano-Elias (SFE)
Used in file compression (zip and Deflate), image compression (JPEG), audio compression (MP3 Coding
and AAC), video compression (MPEG and AVC), etc. Arithmetic Coding
Lempel-Ziv Algorithm
Suitable for micro-controllers and real-time systems due to low computational complexity and Run Length Encoding
(RLE)
simple decoding.
Applications
AEP: Asymptotic
How to Construct the Huffman Tree Equipartition Property
Entropy Rate of a
1 Arrange source symbols in a decreasing order of probabilities. Stochastic Process
References
2 In an iterative manner, combine the two symbols with the lowest probabilities into a new symbol
whose probability is their sum.
3 Continue until only one symbol is left. (At each step, we reduce the total # of symbols by 1.)
4 Whenever we combine two symbols, we label the corresponding two branches (edges) with 0 and 1.
5 The codeword for a symbol is obtained using labels on the path from the final (parent) node to
that symbol.
2
An algorithmic strategy that builds a solution step-by-step making the optimal choice at each step.
Source Coding
Basic Concepts
Applications
7
X Symbol Probability Self Information Codeword AEP: Asymptotic
H(X ) = − pk log2 pk Equipartition Property
k=1
x1 p1 = 0.46 1.1203 1
Entropy Rate of a
= 1.9781 bits. x2 p2 = 0.30 1.7370 00 Stochastic Process
x3 p3 = 0.12 3.0589 010 References
7
X x4 p4 = 0.06 4.0589 0110
R̄ = nk pk = 1.99 bits
k=1
x5 p5 = 0.03 5.0589 01110
H(X ) x6 p6 = 0.02 5.6439 011110
η= R̄
= 0.9940.
x7 p7 = 0.01 6.6439 011111
Basic Concepts
Symbol Probability Self Information Codeword
Source Coding
x1 p1 = 0.4 1.3219 1 Theorem
Entropy Rate of a
5
X Stochastic Process
H(X )
R̄ = nk pk = 2.2 bits and η= R̄
= 0.972. References
k=1
Remark
In case of a dyadic distribution, we have the following equality for each symbol:
Self Information = Huffman Codeword Length.
Source Coding
Why Source Coding? Chirayu Athalye
By applying source coding techniques, we can store or transmit the information content of a Basic Concepts
data string using fewer bits than the original representation. Source Coding
Theorem
1 Entropy Encoder: A coding scheme designed for a memoryless source with known
Source Coding
probability distribution. E.g.: Huffman, SFE, Arithmetic Coding, etc. Techniques
Huffman Coding
2 Universal Encoder: A coding scheme for a source with memory whose probability Shannon-Fano-Elias (SFE)
distribution is not known a priori. E.g.: LZ Algorithm, Run Length Coding, etc. Coding
Arithmetic Coding
Lempel-Ziv Algorithm
Run Length Encoding
Coding in Blocks (Efficient Technique) (RLE)
Applications
Instead of encoding symbol-by-symbol, we can encode blocks of B symbols.
AEP: Asymptotic
Equipartition Property
In this case, the bounds of the source coding theorem for a DMS are
Entropy Rate of a
B H(X ) ≤ R̄B < B H(X ) + 1, Stochastic Process
References
where R̄B : average number of bits per block of B symbols.
R̄B
Average number of bits per symbol: R̄ := B
. Notice that
1
H(X ) ≤ R̄ < H(X ) + ,
B
By selecting a large enough block-size B, we can make R̄ arbitrarily close to H(X ).
Source Coding
Example Chirayu Athalye
H(X ) = 1.5589 bits, Symbol Probability Self Information Codeword Basic Concepts
Source Coding
Basic Idea for Encoding Techniques
Huffman Coding
Let X be a source that generates symbols {x1 , . . . , x` } with probabilities {p1 , . . . , p` }. Shannon-Fano-Elias (SFE)
Coding
Arithmetic Coding
1 Compute the CDF FX . Let Lempel-Ziv Algorithm
F (x+ ) + F (x− ) Run Length Encoding
F̄ (x) := . (RLE)
2 Applications
2 The codeword for xk is the binary expansion of F̄ (xk ) truncated to d− log2 pk e + 1 bits. AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Example Stochastic Process
References
1 Lossless data compression technique that represents an entire message as a fraction in the Basic Concepts
interval [0, 1). Source Coding
Theorem
2 Unlike Huffman coding, it encodes the entire (finite-length) sequence at once.
Source Coding
3 Thus, it avoids inefficiencies of Huffman coding that assigns codewords symbol-by-symbol. Techniques
Huffman Coding
4 Arithmetic coding can achieve R̄ (average codeword length) closer to the entropy limit. Shannon-Fano-Elias (SFE)
Coding
Arithmetic Coding
Lempel-Ziv Algorithm
What is Arithmetic Coding? Run Length Encoding
(RLE)
Encoding: Applications
Consider symbols {A, B, C } with probabilities {0.5, 0.25, 0.25}. Divide [0, 1) as
Basic Concepts
Applications
AEP: Asymptotic
Equipartition Property
Entropy Rate of a
Stochastic Process
References
Remark: A symbol with higher probability causes smaller reduction in the interval, and thus
contribute fewer bits
Source Coding
Chirayu Athalye
Basic Concepts
Lempel-Ziv (LZ) Algorithm (Dictionary-Based Method)
Source Coding
Theorem
1 Lossless data compression algorithm that exploits patterns and repetitions in data-stream
Source Coding
without prior knowledge of symbol probabilities. Techniques
Huffman Coding
2 It builds an explicit dictionary of substrings (phrases) during encoding. Shannon-Fano-Elias (SFE)
Coding
3 Each new phrase is encoded as: (index of known prefix-string, next symbol). Arithmetic Coding
Lempel-Ziv Algorithm
4 It uses a fixed length codewords for phrases. Run Length Encoding
(RLE)
5 It is a fast, practical, and adaptive method that learns patterns while encoding. Applications
AEP: Asymptotic
Equipartition Property
Advantages of Lempel-Ziv Algorithm over Huffman and Arithmetic Coding
Entropy Rate of a
Stochastic Process
1 In many real-life scenarios, we do not know symbol probabilities that are essential for
References
Huffman and arithmetic coding.
2 For a source with memory, where the occurrence of one symbol alter the probabilities of
subsequent symbols, Huffman and arithmetic coding are far from being optimal.
Source Coding
Example
Chirayu Athalye
References
1 For a large size string, unlike the example above, we get a rich Lempel-Ziv (LZ) dictionary. As a
result, the Lempel-Ziv algorithm typically gives near-optimal compression.
2 Size of an LZ dictionary grows exponentially with the number of bits assigned for location.
1 A lossless data compression technique that compresses data by replacing consecutive Basic Concepts
repeated symbols (called a run) with a pair (run length, symbol). Source Coding
Theorem
2 It can compress any type of data; the compression ratio depends on the content of data. Source Coding
Techniques
3 Inefficient compared to other compression techniques; thus, often used in conjunction with Huffman Coding
4 Easy to implement and quick to execute. Effective for data with long runs. Arithmetic Coding
Lempel-Ziv Algorithm
5 Supported by file formats such as TIFF, JPG, BMP, PCX, etc. Run Length Encoding
(RLE)
Applications
Fax machines use a combination of a run length code and Huffman code. Read about the
coding technique used in fax machines.
Source Coding
(Non-Uniform) Optimum Quantizer Design Chirayu Athalye
AEP: Asymptotic
Necessary conditions for optimality are obtained by differentiating D w.r.t. xk and x̃k : Equipartition Property
Entropy Rate of a
∂D h i
= fX (xk ) (x̃k − xk )2 − (x̃k+1 − xk )2 = 0, k = 1, . . . , L − 1, Stochastic Process
∂xk References
Z xk
∂D
= (x̃k − x) fX (x) dx = 0, k = 1, . . . , L.
∂ x̃k xk−1
Let X be a random variable with the standard normal distribution N (µ = 0, σ 2 = 1). Basic Concepts
We want to design an 8-level quantizer that minimizes the mean square quantization error: Source Coding
Theorem
8 Z xk
X 1 x2 Source Coding
D= √ |x̃k − x|2 e − 2 dx. Techniques
k=1
2π xk−1 Applications
Optimum Quantizer Design
k xk x̃k P(x̃k ) = P xk−1 < X < xk Huffman Code Image Compression
0 −∞ – – – AEP: Asymptotic
Equipartition Property
1 -1.748 -2.152 0.04 0010
Entropy Rate of a
2 -1.05 -1.344 0.107 011 Stochastic Process
In this case,
3 -0.5 -0.756 0.162 010 References
Chirayu Athalye
Source Coding
Depending on the resolution, an image may require anywhere from 102 to 108 bytes. Theorem
Compared to an arbitrary data, imagery data has higher redundancy. Source Coding
Techniques
Close relationship between neighboring pixels in an image can be exploited to improve the Applications
Lossy Compression: Images can be sampled and quantized sufficiently finely so that they AEP: Asymptotic
Equipartition Property
are satisfactory to discerning eyes; less important data to human eyes can be compromised.
Entropy Rate of a
Lossless Compression: Source coding techniques can be used for compressing imagery data Stochastic Process
n=1 m=1
2N 2M Source Coding
Techniques
In natural images, maximum information (energy) lies in low frequency components (upper-left AEP: Asymptotic
Equipartition Property
corner of the DCT matrix) as opposed to high frequency (lower-right corner of the DCT matrix).
Entropy Rate of a
Stochastic Process
References
1 Small weights (below some threshold) are set to zero. Reduces image complexity at the Basic Concepts
2 Remaining weights are quantized. cost of fidelity. Source Coding
Theorem
Source Coding
Zig-Zag Code: 4 333 222 1 222 00000. Techniques
Applications
Basic Concepts
Weak Law of Large Numbers Source Coding
Theorem
Let X1 , X2 , . . . are independent and identically distributed (i.i.d.) random variables with mean Source Coding
µ. Let Techniques
X1 + · · · + Xn Applications
Mn = .
n AEP: Asymptotic
For every ε > 0, we have Equipartition Property
lim P |Mn − µ| ≥ ε = 0. Entropy Rate of a
n→∞ Stochastic Process
P References
Remark: We say Mn converges to µ in probability, denoted as Mn −
→ µ.
The entropy rate of a discrete stochastic process X = {X1 , X2 , . . .} is given by Basic Concepts
Applications
1 If X1 , X2 , . . . are i.i.d. random variables, then by the chain rule for entropy,
AEP: Asymptotic
H(X1 ) + · · · + H(Xn ) Equipartition Property
H(X ) = lim = H(X1 ). Entropy Rate of a
n→∞ n Stochastic Process
2 If X1 , X2 , . . . are independent but not identically distributed random variables, then References
n
1X
H(X ) = lim H(Xk ).
n→∞ n
k=1
Stationarity
1 A discrete stochastic process {Xk : k ∈ N} is said to be stationary if for all n, m ∈ N, we
have the following PMF equality: pX1 ···Xn = pXm+1 ···Xm+n .
2 A stationary process behaves the same way at different time instances.
3 Stationarity =⇒ {Xk : k ∈ N} are identically distributed.
Source Coding
Markov Chain Chirayu Athalye
AEP: Asymptotic
p11 · · · p1m
Equipartition Property
Chirayu Athalye
Remark (Stationary Markov Chain)
Basic Concepts
νm R1×m of a Markov chain is said to be
1 State-probability distribution ν = ν1 ···
Source Coding
stationary if νP = ν. Theorem
AEP: Asymptotic
Equipartition Property
Entropy Rate of Stationary Markov Chain Entropy Rate of a
Stochastic Process
By using the chain rule for the entropy, the Markov property and stationarity, we get
References
n
!
H(X1 , . . . , Xn ) 1 X
H(X ) = lim = lim H(X1 ) + H(Xk | Xk−1 , . . . , X1 ) (Chain Rule)
n→∞ n n→∞ n
k=2
n
!
1 X
= lim H(X1 ) + H(Xk | Xk−1 ) (Markov Property)
n→∞ n
k=2
1
= lim H(X1 ) + (n − 1) H(X2 | X1 ) (Stationarity)
n→∞ n
= H(X2 | X1 ).
Source Coding
Basic Concepts
Source Coding
Consider a two-state stationary Markov chain with Theorem
1 − p1 p1 Source Coding
P= . Techniques
p2 1 − p2 Applications
AEP: Asymptotic
Solving νP = ν and ν1 + ν2 = 1, we get the stationary distribution as Equipartition Property
Entropy Rate of a
p2 p1 Stochastic Process
ν1 = and ν2 = .
p1 + p2 p1 + p2 References
Chirayu Athalye
Basic Concepts
Source Coding
Theorem
References Source Coding
Techniques
R. Bose, Information Theory, Coding and Cryptography (3rd edition), Chennai, TN, India: McGraw Hill Applications
Education, 2016. AEP: Asymptotic
Equipartition Property
T.M. Cover and J.A. Thomas, Elements of Information Theory (2nd edition), Hoboken, NJ, USA:
Entropy Rate of a
Wiley-Interscience, 2006. Stochastic Process
References
Readings
1 [Information Theory, Coding and Cryptography (Bose), Chapter 1].
2 [Elements of Information Theory (Cover and Thomas), Chapters 2-5 & 9].