InformationTheory.Shannon.Sanov.Basic
Sanov's theorem — type class probability upper bound (A form) #
Cover-Thomas (method of types):
Q^n(T(P)) ≤ exp(-n · D(P‖Q))
where T(P) := { x : Fin n → α | ∀ a, #{i | x i = a} = n · P(a) }.
Main definitions #
typeCount x a— number of occurrences ofain sequencex : Fin n → α.typeClass P n— type class: sequences whose empirical distribution equalsP.klDivSumForm P Q— finite-alphabet KL sum form:∑ a, P(a) · (log P(a) - log Q(a)).
Main statements #
typeClass_Qn_le—Q^n(T(P)) ≤ exp(-n · klDivSumForm P Q).klDivSumForm_eq_toReal_klDiv—klDivSumForm P Q = (klDiv P Q).toReal(under absolute continuity).typeClass_Qn_le_klDiv— corollary with(klDiv P Q).toRealexponent.
Implementation notes #
- The proof avoids the two-step
|T(P)| ≤ exp(n H(P))+Q^n({x}) = exp(-n(H+D)): it goes directly viaQ^n(T) = exp(-n D) · P^n(T) ≤ exp(-n D). klDivSumFormis used in the main bound; the equality to(klDiv P Q).toRealis separated intoklDivSumForm_eq_toReal_klDiv.
References #
- T. M. Cover and J. A. Thomas, Elements of Information Theory (2nd ed.), Wiley, 2006.
Type class definition #
InformationTheory.Shannon.typeCount
sourceNumber of occurrences of letter a in sequence x : Fin n → α.
Equations
- InformationTheory.Shannon.typeCount x a = {i : Fin n | x i = a}.card
Instances For
Used by
InformationTheory.Shannon.typeClass
sourceType class T(P): sequences x : Fin n → α whose empirical distribution equals P,
i.e., ∀ a, (typeCount x a : ℝ) = n · P.real {a}.
Equations
Instances For
Used by
InformationTheory.Shannon.klDivSumForm
sourceFinite-alphabet KL sum form:
klDivSumForm P Q := ∑ a, P(a) · (log P(a) - log Q(a)).
Shorthand for the Sanov exponent; equals (klDiv P Q).toReal under P ≪ Q
(see klDivSumForm_eq_toReal_klDiv).
Equations
Instances For
Used by
InformationTheory.Shannon.sum_llrPmf_eq_of_mem_typeClass
sourceUsed by
InformationTheory.Shannon.typeClass_prod_ratio
sourcePer-point ratio identity: x ∈ typeClass P n implies
∏ i, Q.real {x i} = (∏ i, P.real {x i}) · exp(-n · klDivSumForm P Q).
Used by
Sanov A main theorem #
InformationTheory.Shannon.typeClass_Qn_le
sourceSanov's theorem (A form): Q^n(T(P)) ≤ exp(-n · klDivSumForm P Q).
Used by
(klDiv P Q).toReal form (corollary) #
InformationTheory.Shannon.klDivSumForm_eq_toReal_klDiv
sourceklDivSumForm P Q = (klDiv P Q).toReal when P ≪ Q (both probability measures).
Used by
InformationTheory.Shannon.typeClass_Qn_le_klDiv
sourceSanov's theorem (A form), klDiv exponent:
Q^n(T(P)) ≤ exp(-n · (klDiv P Q).toReal).
See also typeClass_Qn_le.