InformationTheory.Shannon.Stein.Achievability
Stein's lemma: achievability #
Stein's lemma for binary hypothesis testing (Cover–Thomas): the optimal
type-II error of an n-sample test with type-I error at most ε decays exponentially in n
at the rate of the Kullback–Leibler divergence klDiv P Q. This file develops the achievability
(lower bound) side: the log-likelihood-ratio plumbing, the Stein-typical set, and the
tensorization of the KL divergence.
Main definitions #
llrPmf P Q— the alphabet-side log-likelihood ratiolog P{x} − log Q{x}.logLikelihoodRatio P Q Xs i— the per-sample log-likelihood ratio along a processXs.steinTypicalSet P Q n ε— blocks whose empirical log-likelihood ratio is withinεofklDiv P Q.
Main statements #
stein_strong_law— the empirical mean of the log-likelihood ratio converges almost surely to(klDiv P Q).toReal.stein_inProbability— the same convergence holds in probability.stein_achievability— there existε-level tests whose type-II error decays at rateklDiv P Q.
Implementation notes #
- The log-likelihood-ratio plumbing is obtained as the two-distribution specialization of the AEP development, which lets most measurability, identical-distribution, and independence lemmas be reused rather than reproved.
- Over a finite alphabet
αwith0 < Q.real {x}for everyx, all quantities are expanded point-wise, avoiding the general Radon–Nikodym derivative machinery for product measures.
References #
- T. M. Cover and J. A. Thomas, Elements of Information Theory (2nd ed.), Wiley, 2006.
Log-likelihood ratio plumbing #
InformationTheory.Shannon.llrPmf
sourceThe alphabet-side log-likelihood ratio log P{x} − log Q{x}. On the support of P and
assuming Q{x} > 0 for all x, this equals Real.log ((P.rnDeriv Q x).toReal).
Instances For
Used by
InformationTheory.Shannon.measurable_llrPmf
sourceUsed by
InformationTheory.Shannon.logLikelihoodRatio
sourcePer-symbol log-likelihood ratio: llrPmf P Q (Xs i ω).
Equations
- InformationTheory.Shannon.logLikelihoodRatio P Q Xs i ω = InformationTheory.Shannon.llrPmf P Q (Xs i ω)
Instances For
Used by
InformationTheory.Shannon.logLikelihoodRatio_eq_comp
sourceUsed by
InformationTheory.Shannon.measurable_logLikelihoodRatio
sourceUsed by
InformationTheory.Shannon.integrable_logLikelihoodRatio
sourceUsed by
InformationTheory.Shannon.integral_logLikelihoodRatio_under_P
sourceThe expected log-likelihood ratio under P equals (klDiv P Q).toReal.
Used by
InformationTheory.Shannon.identDistrib_logLikelihoodRatio
sourceUsed by
InformationTheory.Shannon.indepFun_logLikelihoodRatio
sourceUsed by
InformationTheory.Shannon.stein_strong_law
sourceThe empirical mean of the per-sample log-likelihood ratio converges almost surely to
(klDiv P Q).toReal.
Used by
InformationTheory.Shannon.stein_inProbability
sourceThe empirical mean of the log-likelihood ratio converges to (klDiv P Q).toReal in
probability.
Used by
Stein-typical set and achievability #
InformationTheory.Shannon.steinTypicalSet
sourceThe Stein-typical set: blocks x : Fin n → α whose empirical log-likelihood ratio is within
ε of (klDiv P Q).toReal.
Equations
Instances For
Used by
InformationTheory.Shannon.mem_steinTypicalSet_iff
sourceUsed by
InformationTheory.Shannon.measurableSet_steinTypicalSet
sourceUsed by
InformationTheory.Shannon.steinTypicalSet_P_prob_tendsto_one
sourceUnder P, the probability that a block lands in the Stein-typical set tends to 1.
Used by
InformationTheory.Shannon.steinTypicalSet_Q_prob_le
sourceThe Qⁿ-mass of the Stein-typical set is at most exp(-n · ((klDiv P Q).toReal − ε)).
Used by
InformationTheory.Shannon.stein_achievability
sourceStein's lemma (achievability): eventually there exist ε-level tests whose type-II
error decays as exp(-n · ((klDiv P Q).toReal − δ)). The statement is in product-measure form;
the translation from the random-variable form is supplied by the hypothesis
hMapJoint : μ.map (jointRV Xs n) = Measure.pi (fun _ : Fin n => P).
Used by
Tensorization of the KL divergence #
The KL divergence between i.i.d. product measures factorizes as n times the single-sample KL
divergence: klDiv (Π_{Fin n} P) (Π_{Fin n} Q) = n · klDiv P Q.
InformationTheory.Shannon.klDiv_pi_zero
sourceBase case of the KL tensorization: the product measures over Fin 0 → α agree, so their KL
divergence is 0.
Used by
InformationTheory.Shannon.klDiv_pi_succ
sourceStep case of the KL tensorization:
klDiv (Π_{n+1} P) (Π_{n+1} Q) = klDiv P Q + klDiv (Π_n P) (Π_n Q).
Used by
InformationTheory.Shannon.klDiv_pi_eq_n_smul
sourceKL tensorization: klDiv (Π_{Fin n} P) (Π_{Fin n} Q) = n · klDiv P Q.