Let be IID with full-support mass function on a finite alphabet , and let the empirical distribution be
Suppose is a set of probability mass functions satisfying and that the information projection minimizes over . Then the limiting Sanov theorem is
For each -type , the method of types gives
and there are at most types. Summing the upper bounds over types in gives the large-deviation upper bound. For the lower bound, choose types converging to an interior distribution arbitrarily close to and use the lower type-class bound. Polynomial factors disappear after applying , and continuity of divergence finishes the proof.
Define the closed set
It does not contain . Since the probability simplex is compact, has full support, and Kullback-Leibler divergence is continuous and vanishes only at ,
The event in the question is exactly . The upper-bound half of Sanov theorem gives probability at most a polynomial factor times , which tends to zero. This proves the weak law of large numbers.
Let be i.i.d. with mass function on a finite alphabet, and let be their empirical distribution. Sanov theorem states that for every set of probability mass functions,
and
where interior and closure use the probability-simplex topology. Thus the empirical distributions satisfy a large deviation principle with rate function .
For a string of empirical distribution , independence gives
Multiplying this by the size of a type class gives its exact probability. The entropy bounds for a type class then imply
These bounds apply to one attainable empirical distribution, not automatically to a tail event containing many classes.[ref] If but , every string in that class is impossible and .
As an exact example, take an independent and identically distributed binary source with . Each balanced four-symbol string has probability . There are six such strings, so
The relative entropy is . The exponential upper bound is , visibly larger than the exact probability. It captures the cost of an atypical frequency without supplying the exact finite-length prefactor.
For , the exact probability of twenty ones is
while the exponential upper bound is approximately . At the source frequency , relative entropy is zero and the upper bound is one; the exact probability of ten ones is only about . A likely neighborhood of frequencies need not give a large probability to a single exact profile.
Figure 1.
Relative entropy controls the rarity of an empirical frequency
. Exact probabilities from the binomial distribution for each possible number of ones in forty independent and identically distributed trials with , compared with the exponential relative entropy upper bound. The curves are calculated from a stipulated model, not observed data; the vertical scale is logarithmic. Details.
The striking cancellation is that there are about strings in a class, but each costs about . The information entropy terms cancel, leaving relative entropy as the rarity exponent. Summing over polynomially many classes preserves that leading exponential scale. This is the elementary counting mechanism behind finite-alphabet versions of Sanov theorem and many error exponents in hypothesis testing.