The method of types, universal source coding, Sanov's theorem and large deviations, the conditional limit theorem, hypothesis testing, Chernoff–Stein and Chernoff information, and Fisher information
·37 min read·7,252 words
Motivation: from typical sequences to exact empirical distributions
The AEP focused our attention on a small
subset of typical sequences — those whose sample entropy is close to H.
The method of types is an even more powerful procedure: instead of grouping
sequences by their sample entropy, we group them by their exact empirical
distribution.
IntuitionWhy the finer grouping is stronger
Typicality is a one-number summary: a tape is typical if its average surprise
is right. Two tapes with wildly different letter frequencies can both be
typical of different sources. Grouping by the full empirical distribution
keeps all that information, and with this restriction we can derive strong
bounds — not just “to first order in the exponent” — on the number of
sequences with a particular empirical distribution and on the probability of
each.
This buys us, in this chapter alone: strong error bounds for channel coding, a
variety of rate distortion results, the probability of rare events (large
deviations), the existence of universal source codes, the best possible
error exponents in hypothesis testing, and the connection to parameter
estimation via Fisher information.
NoteNotational convention for this chapter
Capital letters denote types and distributions. We write xn and x
interchangeably for a sequence x1,…,xn, and use “distribution”
loosely to mean a probability mass function.
The method of types
DefinitionType
The typePx (or empirical probability distribution) of a sequence
x1,…,xn is the relative proportion of occurrences of each symbol:
Px(a)=nN(a∣x)for all a∈X
where N(a∣x) is the number of times a occurs in x∈Xn.
The type is itself a pmf on X.
DefinitionProbability simplex, Pn, type class
The probability simplex in Rm is
{x:xi≥0,∑i=1mxi=1} — an (m−1)-dimensional manifold in
m-space. For m=3 it is a triangular flat in R3, which is why we
draw the simplex as a triangle.
Pn denotes the set of types with denominator n. For
X={0,1}:
Pn={(n0,nn),(n1,nn−1),…,(nn,n0)}
If P∈Pn, the type class is
T(P)={x∈Xn:Px=P}, sometimes called the
composition class.
ExampleA ternary sequence
Let X={1,2,3} and x=11321. Then
Px(1)=53, Px(2)=51, Px(3)=51. The type class is
all length-5 sequences with three 1’s, one 2 and one 3:
There are ∣X∣ components in the vector specifying Px,
and the numerator in each can take only n+1 values, so there are at most
(n+1)∣X∣ choices. These are not independent (the last
is fixed by the others), but the bound is good enough.
∎
ImportantThe crucial point
There are only a polynomial number of types of length n, while the number
of sequences is exponential in n. It follows that at least one type has
exponentially many sequences in its class — in fact the largest type class has
essentially the same number of elements as the entire set of sequences, to first
order in the exponent. Polynomially many buckets, exponentially many items:
this asymmetry is the engine of the whole chapter.
Theorem2. The probability of a sequence depends only on its type
If X1,…,Xn are i.i.d. ∼Q(x), then
Qn(x)=2−n(H(Px)+D(Px∥Q))
ProofRewrite the product by symbol counts, then add and subtract logPx(a)
A fair die producing a sequence with precisely n/6 of each face has
probability 2−nH(1/6,…,1/6)=6−n — obvious. But if the die has pmf
(31,31,61,121,121,0), the probability of a
particular sequence with precisely these frequencies is exactly
2−nH(1/3,1/3,1/6,1/12,1/12,0) (for n a multiple of 12). That is more
interesting: whenever the type matches the source, D vanishes and the
probability is exactly 2−nH.
Theorem3. Size of a type class
For any type P∈Pn,
(n+1)∣X∣12nH(P)≤∣T(P)∣≤2nH(P)
ProofUpper bound from total probability; lower bound from ”T(P) is the most likely class under P”
The exact size is the multinomial
(nP(a1),…,nP(a∣X∣)n), hard to manipulate,
so we derive exponential bounds. (Stirling’s formula also works; this argument is
cleaner.)
Upper bound. A type class has probability at most 1 under its own
distribution:
Lower bound. Let S∼Binomial(n,p). Its most likely value is
S=np (check via P(S=i)P(S=i+1)=i+1n−i1−pp,
considering i<np and i>np). Since there are n+1 terms,
Setting p=k/n and rerunning the algebra above gives
(kn)≥n+112nH(k/n).
Theorem4. Probability of a type class
For any P∈Pn and any distribution Q,
(n+1)∣X∣12−nD(P∥Q)≤Qn(T(P))≤2−nD(P∥Q)
ProofCombine Theorems 2 and 3
Qn(T(P))=∑x∈T(P)Qn(x)=∣T(P)∣2−n(D(P∥Q)+H(P))
and substitute the bounds on ∣T(P)∣: the 2nH(P) cancels the
2−nH(P) exactly, leaving 2−nD(P∥Q) up to the polynomial factor.
∎
The four equations
ImportantEverything that follows rests on these
∣Pn∣≤(n+1)∣X∣,Qn(x)=2−n(D(Px∥Q)+H(Px))
∣T(P)∣≐2nH(P),Qn(T(P))≐2−nD(P∥Q)
In words: only polynomially many types; exponentially many sequences of each
type; an exact formula for a sequence’s probability; and an approximate formula
for a type class’s probability.
IntuitionThe two exponents and what they mean
Read the middle equation as a decomposition of surprise: a sequence’s
improbability under Q splits into H(Px) — how spread out its own empirical
distribution is — plus D(Px∥Q) — how far that empirical distribution sits
from the truth. The first term is paid by every sequence of that type; the
second is the penalty for looking unlike the source, and it is what makes
atypical types exponentially rare.
Law of large numbers, via types
DerivationThe weak law falls out of the four equations
Define a typical set by relative entropy: TQϵ={xn:D(Pxn∥Q)≤ϵ}.
Then
using Theorem 4 then Theorem 1. This is the whole argument: an exponentially
small probability per bad type, times only polynomially many bad types. The
bound →0, so Qn(TQϵ)→1.
TheoremConvergence of the empirical distribution
Let X1,…,Xn be i.i.d. ∼P. Then
Pr{D(Pxn∥P)>ϵ}≤2−n(ϵ−∣X∣nlog(n+1))
and consequently D(Pxn∥P)→0with probability 1.
ProofBorel–Cantelli
The inequality is the derivation above. Summing over n gives
∑n=1∞Pr{D(Pxn∥P)>ϵ}<∞, so the expected
number of occurrences of the event is finite, hence the actual number is finite
with probability 1 (Borel–Cantelli) — giving almost-sure convergence, stronger
than the in-probability statement of the AEP.
∎
DefinitionStrongly typical set
Aϵ∗(n)={x∈Xn:n1N(a∣x)−P(a)<∣X∣ϵ if P(a)>0;N(a∣x)=0 if P(a)=0}
The type must not differ from the true probabilities by more than
ϵ/∣X∣ in any component. By the strong law, its
probability →1.
NoteWhere strong typicality is needed
The additional power is useful in universal coding, rate distortion theory,
and large deviation theory — in particular the two-sided bound that
the covering argument
required.
Universal source coding
The problem. Huffman coding compresses an i.i.d. source with knownp(x)
to its entropy limit H(X). If the code is designed for the wrong distribution
q(x), a penalty of D(p∥q) is incurred — so Huffman coding is
sensitive to the assumed distribution. What if the true distribution is
unknown? Is there a universal code of rate R that suffices to describe
every i.i.d. source with H(X)<R?
IntuitionThe surprising answer is yes, and the four equations say why
There are 2nH(P) sequences of type P, and only polynomially many
types. So an enumeration of all sequences xn whose type satisfies
H(Pxn)<R requires roughly nR bits — the polynomial factor costs a
vanishing number of bits per symbol. Describing all such sequences prepares us
for any distribution Q with H(Q)<R, without knowing which.
DefinitionUniversal code
A fixed-rate block code of rate R for a source with unknown distribution
Q is an encoder fn:Xn→{1,…,2nR} and decoder
ϕn:{1,…,2nR}→Xn, with
Pe(n)=Qn(Xn:ϕn(fn(Xn))=Xn).
It is universal if fn and ϕndo not depend on Q and
Pe(n)→0 whenever R>H(Q).
TheoremExistence of universal source codes
There exists a sequence of (2nR,n) universal source codes with
Pe(n)→0 for every source Q with H(Q)<R.
ProofEncode every sequence whose type has low enough entropy
Step 1: Define the set. Let
Rn=R−∣X∣nlog(n+1) (the rate, discounted by
the polynomial type count) and
This is exactly why Rn was defined with that discount — it is sized
precisely to absorb the polynomial number of types.
Step 3: Encode.fn(x) is the index of x in A if x∈A, else 0. The
decoder maps each index to the corresponding element, so all of A is recovered
and everything else errs.
Step 4: Error probability. With true distribution Q, H(Q)<R:
Since Rn↑R and H(Q)<R, there is n0 beyond which Rn>H(Q);
then the minimizing D is strictly positive and Pe(n)→0 exponentially.
∎
FormulaError exponent for the universal code
DR,Q∗=minP:H(P)>RD(P∥Q)
IntuitionThe geometric picture
Draw the simplex with a circle H(P)=R around it. Sequences whose type lies
outside the circle are encoded by their index — there are fewer than 2nR
of them. Types inside are encoded by 0 and lost. Conversely, if H(Q)>R
the sequence will with high probability have a type outside A, and the
probability of error is close to 1: capacity-like sharpness again.
NoteWhat universality costs
This scheme is universal over i.i.d. distributions. Others exist — the
Lempel–Ziv algorithm is a variable-rate universal code for all ergodic
sources, widely used on data that cannot be modelled simply, like English text
or source code.
So why ever use Huffman? Universal codes need a longer block length to match
the performance of a code designed for the known distribution, and we pay for
that in encoder/decoder complexity. A distribution-specific code is best when you
actually know the distribution.
Large deviation theory and Sanov’s theorem
IntuitionSmall versus large deviations
If X1,…,Xn are i.i.d. Bernoulli(31), what is the probability
that n1∑Xi is near 31? A small deviation — probability
near 1. What about n1∑Xi>43? A large deviation —
exponentially small. The central limit theorem gives a poor approximation more
than a few standard deviations out.
The type view makes it exact: n1∑Xi=43 is equivalent to
Px=(41,43), so the question becomes “what is the probability
that the type is near (43,41)?” — and Theorem 4 answers it:
about 2−nD((43,41)∥(31,32)).
Let E be a subset of the set of pmfs, and write (slightly abusing notation)
Qn(E)=Qn(E∩Pn)=∑x:Px∈E∩PnQn(x).
NoteConstraints on sample averages become half-spaces of types
An observation like n1∑ig(xi)≥α is equivalent to
PX∈E∩Pn where
E={P:∑a∈Xg(a)P(a)≥α}
because n1∑ig(xi)=∑aPX(a)g(a). So E is a half-space in
the space of probability vectors — this is why all the pictures in this chapter
are a triangle cut by a line.
TheoremSanov’s theorem
Let X1,…,Xn be i.i.d. ∼Q and E a set of distributions. Then
Qn(E)≤(n+1)∣X∣2−nD(P∗∥Q),P∗=argminP∈ED(P∥Q)
the distribution in E closest to Q in relative entropy. If in addition E
is the closure of its interior, then
n1logQn(E)→−D(P∗∥Q)
ProofUpper bound by largest term; lower bound needs a “nice” set
Upper bound. Sum over types in E, bound each by Theorem 4, replace each by
the maximum, and count types with Theorem 1:
Note P∗ need not be a member of Pn — it is the minimizer over
all of E, not over types.
Lower bound. Here we need a nice set so that for large n we can find a
type in E close to P∗. If E is the closure of its interior (so the
interior is nonempty), then since ∪nPn is dense in the set of
all distributions, E∩Pn is nonempty for n≥n0, and we can
find Pn∈E∩Pn with D(Pn∥Q)→D(P∗∥Q). Then
Qn(E)≥Qn(T(Pn))≥(n+1)∣X∣12−nD(Pn∥Q)
and taking liminf of n1log kills the polynomial factor, giving
≥−D(P∗∥Q).
∎
ImportantThe principle of the largest term
The whole proof is: the probability of a set of types is the sum of
exponentially small terms, and since there are only polynomially many terms, the
sum equals the largest one to first order in the exponent. Everything reduces
to finding the single closest distribution P∗ — a variational problem, not a
summation.
The form of P∗
DerivationLagrange multipliers for constrained closest distribution
To find Pr{n1∑igj(Xi)≥αj,j=1,…,k}, minimize
D(P∥Q) over
E={P:∑aP(a)gj(a)≥αj}. Construct
Differentiating gives the closest distribution as an exponential tilt of Q.
FormulaThe closest distribution is a tilted version of Q
P∗(x)=∑a∈XQ(a)e∑iλigi(a)Q(x)e∑iλigi(x)
with the λi chosen to satisfy the constraints. If Q is uniform,
P∗ is the maximum entropy distribution — which is why maximum-entropy
distributions keep appearing as the answers to large-deviation questions.
ExampleDice
Toss a fair die n times; what is the probability that the average throw is
≥4? Sanov gives Qn(E)≐2−nD(P∗∥Q) where P∗ minimizes
D(P∥Q) subject to ∑i=16iP(i)≥4, so
P∗(x)=2λx/∑i2λi. Solving numerically:
λ=0.2519,
P∗=(0.1031,0.1227,0.1461,0.1740,0.2072,0.2468), and
D(P∗∥Q)=0.0624 bits. So the probability that the average of 10,000
throws is ≥4 is about 2−624.
ExampleCoins
Probability of more than 700 heads in 1000 fair tosses:
P∗=(0.7,0.3), Q=(0.5,0.5), and
D(P∗∥Q)=1−H(0.7)=0.119. So the probability is about 2−119.
ExampleMutual dependence — recovering the joint AEP
Let Q0(x,y)=Q(x)Q(y) be the product of Q‘s marginals. How likely is a
sample drawn from Q0 to appear jointly distributed according to Q? The
joint-typicality conditions define a set E of joint distributions, and Sanov
gives Q0n(E)≐2−nD(P∗∥Q0). As ϵ→0, P∗ is the
joint Q itself and Q0 is the product, so the probability is
2−nD(Q(x,y)∥Q(x)Q(y))=2−nI(X;Y)
exactly the joint AEP result from
Chapter 7. The mysterious
2−nI that governed rival codewords is a large-deviation exponent.
Conditional limit theorem
The problem. Sanov tells us the probability of the rare event E is
governed by the closest point P∗. But we can say much more: given that the
rare event occurred, what does the sample look like? The answer is that it looks
like P∗ and nothing else — the other types in E are negligible even
relative to each other.
First a geometric fact that makes D behave like a squared distance.
TheoremPythagorean theorem for relative entropy
For a closed convex set E and Q∈/E, let P∗∈E achieve
D(P∗∥Q)=minP∈ED(P∥Q). Then
D(P∥Q)≥D(P∥P∗)+D(P∗∥Q)for all P∈E
ProofThe derivative along the path P∗→P is non-negative at P∗
Let Pλ=λP+(1−λ)P∗; by convexity of E,
Pλ∈E for 0≤λ≤1, and Pλ→P∗ as λ→0.
Since D(P∗∥Q) is the minimum along this path, the derivative of
Dλ=D(Pλ∥Q) is non-negative at λ=0:
dλdDλ=∑(P(x)−P∗(x))[logQ(x)Pλ(x)+1]
Setting λ=0 (so Pλ=P∗) and using
∑P(x)=∑P∗(x)=1 to kill the +1:
Take a convex set in Rn, a point A outside it, B the closest
point in the set, and C any other point in the set. The angle at B must be
obtuse, which gives lAC2≥lAB2+lBC2 — the same form as
the theorem. So D behaves like the square of Euclidean distance, not like
a distance.
The use we make of it: if D(Pn∥Q)→D(P∗∥Q), the theorem
forces D(Pn∥P∗)→0 as well. Being close in distance-to-Q implies
close to P∗ itself.
With A={x:P1(x)>P2(x)}, expanding the sum over A and Ac gives
∥P1−P2∥1=2(P1(A)−P2(A)), and
maxB(P1(B)−P2(B))=∥P1−P2∥1/2 — the variational
distance.
ProofBinary case by calculus, general case by data processing
Binary case. For p≥q, let
g(p,q)=plogqp+(1−p)log1−q1−p−2ln24(p−q)2. Then
dqdg=q(1−q)ln2q−p−ln24(q−p)≤0
since q(1−q)≤41 and q≤p. As g(p,p)=0, we get g(p,q)≥0 for
q≤p.
General case. Let A={x:P1(x)>P2(x)} and Y=1A(X), with
P^1,P^2 the induced binary distributions. By the data processing
inequality for relative entropy,
Step 3: Bound the near shell below. For n large there is at least one type
in SD∗+δ∩E∩Pn, and a sum exceeds one of its terms:
Qn(A)≥Qn(SD∗+δ∩E)≥(n+1)∣X∣12−n(D∗+δ)
Step 4: The ratio vanishes.
Pr(PXn∈B∣PXn∈E)≤Qn(A)Qn(B)≤(n+1)2∣X∣2−nδ→0
so the conditional probability of A goes to 1. The δ gap between the
two shells is what makes the exponentials separate.
Step 5: Everything in A is close to P∗. For P∈A we have
D(P∥Q)≤D∗+2δ, so by the Pythagorean theorem
D(P∥P∗)+D∗≤D(P∥Q)≤D∗+2δ⟹D(P∥P∗)≤2δ
Step 6: Transfer to the marginal. Small relative entropy implies small L1
by Pinsker, so maxa∣PXn(a)−P∗(a)∣ is small with conditional
probability →1, i.e. Pr(X1=a∣PXn∈E)→P∗(a).
∎
NoteA stronger version, and its limit
The same argument gives
Pr(X1=a1,…,Xm=am∣PXn∈E)→∏i=1mP∗(ai)
for fixed m as n→∞: the first few elements are asymptotically
independent with common distribution P∗. It fails for m=n because of
end effects — given the type, the last elements are determined by the rest, so
they cannot be independent.
ExampleDice conditioned on a high sum
Roll n fair dice and suppose the sum exceeds 4n. Then the first die shows
a with probability approximately P∗(a)=2λa/∑i2λi
with ∑iP∗(i)=4 — the maximum entropy distribution subject to the
constraint. The first few dice inspected behave as if drawn independently from
an exponential distribution.
ImportantThis strengthens the maximum entropy principle
Maximum entropy is usually presented as a modelling choice — “assume the
least-committed distribution consistent with what you know.” The conditional
limit theorem says it is a theorem about conditioning: if a constraint
actually holds, the empirical distribution really does converge to the
maximum-entropy (tilted) one. Nature does the tilting, not the modeller.
Hypothesis testing
DefinitionThe testing problem
Let X1,…,Xn be i.i.d. ∼Q. Two hypotheses: H1:Q=P1 and
H2:Q=P2. A decision function g(x1,…,xn)∈{1,2} is specified
by the acceptance region A where g=1. The two error probabilities are
α=Pr(g=2∣H1)=P1n(Ac),β=Pr(g=1∣H2)=P2n(A)
IntuitionThe trade-off
We want both small, but they pull against each other: enlarging A shrinks
α and grows β. So we minimize one subject to a constraint on the
other. The best achievable exponent in that setting is the
; the symmetric Bayesian version is
.
TheoremNeyman–Pearson lemma
Define, for T≥0,
An(T)={xn:P2(x1,…,xn)P1(x1,…,xn)>T}
with errors α∗=P1n(Anc(T)), β∗=P2n(An(T)). If any other
region Bn has α≤α∗, then β≥β∗.
ProofOne pointwise inequality, summed
For all x, (ϕA(x)−ϕB(x))(P1(x)−TP2(x))≥0 — check the cases
x∈A and x∈/A separately. Summing over the space:
The test compares which hypothesis the sample type is closer to. The boundary
— the set of types where the difference of distances is constant — is the analog
of the perpendicular bisector in Euclidean geometry.
DerivationThe boundary distribution is an exponential interpolation
By Sanov, αn≐2−nD(P1∗∥P1) and
βn≐2−nD(P2∗∥P2) where Pi∗ is the closest element of
the relevant region. Minimizing D(P∥P2) subject to
D(P∥P2)−D(P∥P1)=n1logT by Lagrange multipliers gives:
FormulaThe geodesic between P1 and P2
Pλ(x)=∑aP1λ(a)P21−λ(a)P1λ(x)P21−λ(x)
with λ chosen so that
D(Pλ∥P1)−D(Pλ∥P2)=n1logT. By symmetry
P1∗=P2∗ — the same distribution governs both error exponents.
IntuitionA convex combination in the exponent
As λ→1, Pλ→P1; as λ→0, Pλ→P2. The
curve Pλ traces a geodesic in the simplex — a normalized convex
combination taken in the exponent rather than in the probabilities. This one
family parametrizes every optimal test between the two hypotheses.
Chernoff–Stein lemma
The setting. Hold one error probability fixed and make the other as small
as possible. The method of proof is a relative-entropy version of the AEP.
TheoremAEP for relative entropy
For X1,…,Xn i.i.d. ∼P1 and any other P2,
n1logP2(X1,…,Xn)P1(X1,…,Xn)→D(P1∥P2)in probability
ProofWeak law of large numbers
The log-ratio is n1∑ilogP2(Xi)P1(Xi), a sample mean of
i.i.d. terms with expectation
EP1logP2(X)P1(X)=D(P1∥P2).
∎
DefinitionRelative entropy typical set
(x1,…,xn) is relative entropy typical iff
D(P1∥P2)−ϵ≤n1logP2(xn)P1(xn)≤D(P1∥P2)+ϵ
The set is denoted Aϵ(n)(P1∥P2).
TheoremProperties of the relative entropy typical set
For xn∈Aϵ(n)(P1∥P2):
P1(xn)2−n(D(P1∥P2)+ϵ)≤P2(xn)≤P1(xn)2−n(D(P1∥P2)−ϵ)
P1(Aϵ(n))>1−ϵ for n sufficiently large.
P2(Aϵ(n))<2−n(D(P1∥P2)−ϵ).
P2(Aϵ(n))>(1−ϵ)2−n(D(P1∥P2)+ϵ)
for n sufficiently large.
ProofCounting measure replaced by P2
Property 1 is the definition rearranged; property 2 is the relative entropy AEP.
For property 3:
Property 4 is the same with the other side of property 1 and P1(A)≥1−ϵ.
∎
IntuitionThe structural analogy
This is the discrete AEP
with counting measure replaced by the probability measure P2. Where the
old theorem said “the typical set has about 2nH elements”, this one says
“the relative entropy typical set has P2-probability about 2−nD.”
LemmaAny high-P1-probability set has high P2-probability too
If P1(Bn)>1−ϵ and D(P1∥P2)<∞, then
P2(Bn)>(1−2ϵ)2−n(D(P1∥P2)+ϵ).
ProofIntersect with the typical set
Since P1(Bn)>1−ϵ and P1(An)>1−ϵ, the union bound gives
P1(An∩Bn)>1−2ϵ. Then
Let X1,…,Xn be i.i.d. ∼Q, testing Q=P1 vs. Q=P2 with
D(P1∥P2)<∞. With αn=P1n(Anc),
βn=P2n(An), and for 0<ϵ<21,
βnϵ=minAn:αn<ϵβn
Then
limn→∞n1logβnϵ=−D(P1∥P2)
ProofAchievability from property 3, optimality from the lemma
Achievability. Take An=Aϵ(n)(P1∥P2). By property 2,
P1(Anc)<ϵ for n large; by property 3,
limn1logP2(An)≤−(D(P1∥P2)−ϵ).
No better sequence exists. For any Bn with P1(Bn)>1−ϵ, the
lemma gives P2(Bn)>(1−2ϵ)2−n(D+ϵ), so
limn1logP2(Bn)>−(D(P1∥P2)+ϵ).
∎
ImportantRelative entropy is the best error exponent
This is the cleanest operational meaning of D(P1∥P2) yet: it is exactly
the exponential rate at which the second error probability can be driven down
while the first is held fixed. Note the asymmetry is intrinsic — D is not
symmetric, and neither is the setup.
WarningAsymptotically optimal is not optimal
The relative entropy typical set achieves the best asymptotic rate, but it is
not the optimal set for any fixed hypothesis-testing problem. The set that
minimizes the error probabilities is the one given by
Neyman–Pearson.
Chernoff information
The problem. The Chernoff–Stein setup lacks symmetry — we fixed αn
and optimized βn. A Bayesian approach assigns priors π1,π2
and minimizes the overall error
The best achievable exponent in the Bayesian probability of error is
D∗=D(Pλ∗∥P1)=D(Pλ∗∥P2)
where Pλ is the geodesic family above and λ∗ is the value
making the two relative entropies equal.
ProofBoth errors are Sanov exponents; the worst one dominates, so equalize them
The optimum test is the likelihood ratio test, dividing the simplex into two
regions. The closest point of Ac to P1 lies on the boundary of A and has
the form Pλ; it is simultaneously the point of A closest to P2. By
Sanov,
since the exponential rate is set by the worst exponent. Now
D(Pλ∥P1)increases with λ while
D(Pλ∥P2)decreases, so the maximum of their minimum is
attained where they cross. Hence choose λ with
D(Pλ∥P1)=D(Pλ∥P2).
∎
FormulaChernoff information (standard form)
C(P1,P2)=−min0≤λ≤1log(∑xP1λ(x)P21−λ(x))
(Equivalence with the D(Pλ∗∥P1) form is left as an exercise.)
ProofThe usual derivation, via the MAP rule
The maximum a posteriori rule minimizes Bayesian error, with acceptance
region A={x:π2P2(x)π1P1(x)>1}, giving
Pe=π1αn+π2βn=∑min{π1P1,π2P2}
Now use min{a,b}≤aλb1−λ for 0≤λ≤1:
Pe≤∑(π1P1)λ(π2P2)1−λ≤∑P1λP21−λ
For i.i.d. observations the product factorizes, giving
Pe(n)≤(∑xP1λP21−λ)n and hence
n1logPe(n)≤log∑xP1λ(x)P21−λ(x).
Minimizing over λ gives the bound.
∎
IntuitionThe prior washes out
The Bayesian error exponent does not depend on π1,π2, as long as they
are nonzero. Taking logs of the MAP test:
n1logπ2π1+n1∑ilogP2(Xi)P1(Xi)≷0
The second term tends to ±D depending on the truth; the first term tends
to 0. For large samples the data overwhelms the prior.
ExampleConditional limit theorem in action: mistaking one Gaussian for another
Major league players bat 260 with s.d. 15; minor leaguers bat 240 with s.d. 15.
A group of 100 players from one league has a group average above 250 and is
judged major league. We are told this is wrong — they are minor leaguers. What
does the distribution of their batting averages look like?
Abstract it: test f1=N(1,σ2) vs. f2=N(−1,σ2)
with the Bayes rule “accept f1 if Xˉn>0”, and condition on an error of
the first kind. Candidate answers:
A (21,21)mix of the two normals — plausible, but wrong.
Xi≈0 for all i — very unlikely, though Xˉn is near 0.
Correct: the conditional limit theorem gives the distribution in A
closest to f2, which by symmetry is λ=21:
Strange but true: if we mistake one normal population for another, the
population still looks normal with the same variance and a different mean.
This rare event does not result from bizarre-looking data. Back in baseball
terms: the misjudged players have mean 250 and s.d. 15.
ExampleLarge deviations and football
A coach chooses between running (a few yards with very high probability) and
passing (huge gains with low probability). At the start of the game he uses
whichever has the greatest expected gain. But in the closing minutes, trailing
badly with only n plays left and l≫n⋅E[gain] yards
needed, winning requires luck — so play as though you will be lucky.
The probability of winning with pure passing is
2−nD(P1∗∥P1) and with pure running 2−nD(P2∗∥P2), where
E={P:∑aP(a)a≥α}. Can a mixed strategy
Pλ=λP1+(1−λ)P2 beat both? The somewhat surprising
answer is yes, as can be shown by example — giving a reason to mix strategies
beyond confusing the defense.
LemmaChernoff bound
For any random variable Y with moment generating function
ψ(s)=EesY, for all s≥0:
Pr(Y≥a)≤e−saψ(s),hencePr(Y≥a)≤mins≥0e−saψ(s)
ProofMarkov’s inequality applied to esY, a non-negative random variable.
∎
Fisher information and the Cramér–Rao inequality
The problem. Determine the parameters of a distribution from a sample. For
X1,…,Xn i.i.d. ∼N(θ,1), we could estimate θ
by X1 — whose expectation is θ — but clearly we can do better using
more of the data. How much better, and is there a limit?
Let {f(x;θ)}, θ∈Θ, be an indexed family of densities.
An estimator for sample size n is a function T:Xn→Θ.
The bias is EθT−θ; the estimator is unbiased
if the bias is 0 for all θ.
T is consistent in probability if T→θ in probability.
T1dominatesT2 if
E(T1−θ)2≤E(T2−θ)2 for all θ.
NoteBias alone is not enough
For Xi i.i.d. exponential with mean λ, both X1 and Xˉn are
unbiased — yet one is obviously worse. Zero bias does not guarantee the error
is small with high probability, so we rank estimators by expected squared
error instead.
DefinitionScore and Fisher information
The score is the random variable
V=∂θ∂lnf(X;θ)=f(X;θ)∂θ∂f(X;θ),X∼f(x;θ)
The Fisher information is the variance of the score:
TheoremFisher information is additive over i.i.d. samples
Jn(θ)=nJ(θ)
ProofThe score of a product is a sum of independent, zero-mean scores
f(xn;θ)=∏if(xi;θ), so
V(Xn)=∑iV(Xi) with the V(Xi) i.i.d. and zero mean. Hence
EV2(Xn)=∑iEV2(Xi)=nJ(θ) — the cross terms
vanish by independence and zero mean.
∎
TheoremCramér–Rao inequality
The mean-squared error of any unbiased estimator T(X) of θ is
lower bounded by the reciprocal of the Fisher information:
var(T)≥J(θ)1
ProofCauchy–Schwarz between the score and the estimator
Step 1: Cauchy–Schwarz.
(Eθ[(V−EθV)(T−EθT)])2≤Eθ(V−EθV)2Eθ(T−EθT)2
Step 2: Simplify both sides.T unbiased gives
EθT=θ; EθV=0 gives
E[(V−EV)(T−ET)]=E(VT); and
var(V)=J(θ) by definition. So
[Eθ(VT)]2≤J(θ)var(T).
(the interchange of differentiation and integration justified by bounded
convergence for well-behaved f, and the last step by unbiasedness). Substituting
gives var(T)≥1/J(θ).
∎
NoteGeneral (biased) version
E(T−θ)2≥J(θ)(1+bT′(θ))2+bT2(θ)
where bT(θ)=EθT−θ.
DefinitionEfficient estimator
An unbiased estimator T is efficient if it meets the Cramér–Rao bound with
equality, var(T)=1/J(θ).
ExampleThe sample mean is efficient for a Gaussian mean
For Xi i.i.d. ∼N(θ,σ2) with σ2 known,
J(θ)=n/σ2. With T=Xˉn,
Eθ(Xˉn−θ)2=σ2/n=1/J(θ). So Xˉn
is the minimum variance unbiased estimator, achieving the bound.
NoteMultiparameter version
Jij(θ)=∫f(x;θ)∂θi∂lnf(x;θ)∂θj∂lnf(x;θ)dx
and Cramér–Rao becomes the matrix inequality Σ⪰J−1(θ),
meaning Σ−J−1 is nonnegative definite.
ImportantFisher information versus entropy
Fisher information measures the amount of “information” about θ present in
the data, lower-bounding the estimation error. Note the definitional asymmetry:
Fisher information is defined for a parametric family, whereas entropy is
defined for any distribution. We can bridge them by parametrizing any f(x) by a
location parameter and defining J with respect to the translated family
f(x−θ).
The relationship, promised back in
Chapter 8: entropy
is related to the volume of the typical set; Fisher information is related to its
surface area.
WarningA bound is not a guarantee
Cramér–Rao gives a lower bound on the variance of all unbiased estimators — but
it is possible that no estimator meets it. Efficiency is a property to be
checked, not assumed.
Quick reference
Object
Statement
Note
Number of types
∣Pn∣≤(n+1)∣X∣
Polynomial — the key asymmetry.
Sequence probability
Qn(x)=2−n(H(Px)+D(Px∥Q))
Exact, not asymptotic.
Type class size
∣T(P)∣≐2nH(P)
Exponential.
Type class probability
Qn(T(P))≐2−nD(P∥Q)
Distance from truth is the exponent.
Universal coding
exists with Pe→0 whenever H(Q)<R
Error exponent minP:H(P)>RD(P∥Q).
Sanov
Qn(E)≐2−nD(P∗∥Q)
P∗ = closest point of E to Q.
Tilted distribution
P∗(x)∝Q(x)e∑iλigi(x)
Max-entropy when Q uniform.
Pythagoras
D(P∥Q)≥D(P∥P∗)+D(P∗∥Q)
D behaves like squared distance.
Pinsker
D(P1∥P2)≥2ln21∥P1−P2∥12
Small D⇒ small L1.
Conditional limit
Pr(X1=a∣PXn∈E)→P∗(a)
Max-entropy as a theorem, not a choice.
Neyman–Pearson
optimal test is P2P1>T
Equivalently D(Px∥P2)−D(Px∥P1)>n1logT.
Geodesic
Pλ∝P1λP21−λ
Convex combination in the exponent.
Chernoff–Stein
n1logβnϵ→−D(P1∥P2)
D is the best error exponent.
Chernoff information
D∗=D(Pλ∗∥P1)=D(Pλ∗∥P2)
Bayesian; prior washes out.
Fisher information
J(θ)=E[(∂θlnf)2], Jn=nJ
Variance of the score.
Cramér–Rao
var(T)≥1/J(θ)
For unbiased T; Xˉn attains it for a Gaussian mean.
Facts to keep to hand:
Every exponent in this chapter is a relative entropy to the closest point of a set. Universal coding, Sanov, hypothesis testing, Chernoff — same shape, different sets.
The recurring argument is the principle of the largest term: exponentially small probabilities summed over polynomially many types equal the largest term to first order in the exponent.
D is not a metric but obeys a Pythagorean inequality, which is what converts “close in distance-to-Q” into “close to P∗”.
Constraints on sample averages become half-spaces in the simplex; maximizing entropy subject to them produces exponentially tilted distributions.
Chernoff–Stein fixes one error and optimizes the other (→D(P1∥P2)); Chernoff information weights both (→ the crossing point of the two relative entropies along the geodesic).
The chapter’s two halves connect through the typical set: entropy ↔ volume, Fisher information ↔ surface area.
References
[[lit/cover2006-elements|Cover & Thomas, Elements of Information Theory]] — Chapter 11