Lec 2,3
Lec 2,3
Institute of
Technology
Information
Theory and
Coding
Lec-03 & 04 Entropy, Joint
and Mutual Entropy
Ajay Kumar
Assistant Professor
Dept. of ECE
MIT Muzaffarpur
Entropy of a DMS
{So, S1, S2……..….Sx……………Sk-1 }
§
Properties Of Entropy
0≤ H(S) ≤ log2(k)
H(S) = 𝑗=0 P𝑗 ∗
𝑘−1
log2(1/P𝑗)
For :
0 < P𝑗 < 1 P𝑗 log2(1/P𝑗) > 0
Pj = 1 P𝑗 log2(1/P𝑗) = 0
Pj = 0 P𝑗 log2(1/P𝑗) = 0
MIT Muzaffarpur
pj→0 1
𝑑(𝑝 )
𝑗
pj→0 (−𝑝 ) 2
𝑗
𝑑𝑝𝑗
= log 2 𝑒 lim pj = 0
pj→0
Pjlog 2 (1/𝑝𝑗) = 0, iff pj =0 or 1
H(S) = 0 iff Pj =1 for some „j‟ and all the rest are
zero.
MIT Muzaffarpur
= 0.
∴ 𝑘−1𝐾−1
𝑝𝑘 log
𝑘=0𝑘=0 2 (𝑞𝑘/𝑝𝑘)
𝑝𝑘 log ≤0
2 (𝑞𝑘/𝑝𝑘) ≤ 0
MIT Muzaffarpur
Continued…
Equality holds if qk = pk ∀ k
Let qk = 1/k………. ∀ k
H(S) = 𝐾−1
𝑘=0 𝑞𝑘 log 2 (1/𝑞𝑘 ) = log 2 (𝑘)…..(3)
∴ 𝐾−1
𝑘=0 𝑝𝑘 log 2 (1/𝑝𝑘 ) ≤ log2K
H(S) ≤ log2K
MIT Muzaffarpur
Example
consider the situation where you have just two symbols
with
probabilities “p‟ and “(1-p)‟.
Average information per symbol is
Entropy of a binary memoryless source
S = {0,1} p0
p1 = (1 – p0)
H(S) = -polog2p0 – (1-p0)log2(1-p0)
At p =0, H =0 and at p = 1, H = 0 again,
The maximum value of H can be obtained as,
Hmax = ½ log2 2 + ½ log 2 = log22 = 1
Hmax = 1 bit / message
Plot of H can be shown as
MIT Muzaffarpur
Continue…
H(p) =-plog2p – (1-p)log2(1-p) {H(p)→”Entropy Function”}
𝑑𝐻(𝑝) 𝑝 1−𝑝
= -log2p – 𝑝*log2e + log2(1-p) + 1−𝑝 log2e = log2((1-p)/p)
𝑑𝑝
𝑑2𝐻(𝑝) log2e
=- < 0 for all p : 0<p<1
𝑑𝑝2 𝑝(1−𝑝)
𝑑𝐻(𝑝) 1
=0⇒𝑝=
𝑑𝑝 2
H(p = ½) = 1
H(p) is “concave”
MIT Muzaffarpur
Information Rate
Average rate at which information is transferred
is called information rate.
Question
Q1:- Verify the equation I(xixj) = I(xi) + I(xj), if xi and xj are
independent.
Q2:- DMS X produces four symbols x1, x2, x3, and x4 with
probabilities P(x1) = 0.4, P(x2) = 0.3, P(x3) = 0.2, and P(x4) =
0.1, respectively. Determine H(X). Also obtain the
information contained in the message x1x2x1x3 and
x4x2x3x2 .
Question
Q4:-Consider that a digital source sends M independent
messages. Show that the source entropy attains a
maximum value if all the messages are equally likely.
Conditional entropy
MIT Muzaffarpur
Continued..
If xi and yj are independent events, we
know that P(xi,yj) = P(xi)P(yj) then,
1. I(X;Y) =I(Y;X)
2. I(X;Y) ≥ 0
Question:-
Consider a BSC with P(x1) = α.
(a) Prove that the mutual information I(X; Y) is given by
I(X; Y) = H(Y) + p log2p + (1 – p) log2(1 – p).
(b) Compute I(X; Y) for α = 0.5 and p = 0.1.
(c) Repeat (b) for α = 0.5 and p = 0.5 and comment on
the result.
MIT Muzaffarpur
Five Entropies
• H(X): Average information per character at the transmitter,
or entropy of the transmitter.
Analysis of entropies
H(X) and H(Y) give indications of the
probabilistic nature of the transmitter and
receiver respectively.