Entropy
H(X)=−x∑p(x)logp(x)=Ep[logp(X)1]
H(X,Y)=−x∑y∑p(x,y)logp(x,y),H(Y∣X)=x∑p(x)H(Y∣X=x)=−x∑y∑p(x,y)logp(y∣x)
H(X,Y)=H(X)+H(Y∣X)=H(Y)+H(X∣Y)
- H(X)≥0, 0 on the corners, log∣X∣ for the uniform.
- H(X)≤log∣X∣.
- Concave with respect to p.
- H(X∣Y)≤H(X).
- Chain rule, H(X1,…,Xn)=∑i=1nH(Xi∣Xi−1,…,X1)≤∑i=1nH(Xi), with equality iff the Xi are independent.
Relative Entropy and Mutual Information
D(p∥q)=x∑p(x)logq(x)p(x)
I(X;Y)=H(X)−H(X∣Y)=H(Y)−H(Y∣X)=H(X)+H(Y)−H(X,Y)=D(p(x,y)∥p(x)p(y))
I(X;Y∣Z)=H(X∣Z)−H(X∣Y,Z),I(X1,…,Xn;Y)=i=1∑nI(Xi;Y∣Xi−1,…,X1)
Asymptotic Equipartition Property
n1∑xi→E[X], and for an observed iid sequence X1,…,Xn,
n1logp(X1,…,Xn)1→H(X)in probability
so p(X1,…,Xn)≈2−nH(X).
Source Coding
For a uniquely decodable D-ary code with lengths li, the expected length satisfies
L≥HD(X)=logDH(X)
with equality only if pi=D−li.