Bernoulli typical-set example 2026-10-14
Take an IID random variable source of bits with . Its binary entropy isA word of length containing ones has probability . Its information content per symbol isThus weakly typical sequences for this biased source have near . With tolerance bits per symbol, the exact condition isFor , this includes exactly . There are words with each count: a type class with that many possible orderings. Summing the counts and their probability masses givesThese are fewer than one percent of the possible words, yet they carry nearly 64 percent of the probability. The most likely individual word is all zeros, with probability ; it is outside this typical set. No contradiction is involved: the type classes near ten ones each contain many more individual words.
The most likely individual word differs from the counts carrying most probability
. The left plot gives the information content of one word with each number of ones. The right includes the binomial coefficient counting every such word, giving the exact binomial distribution of the count. Both use , ; the green band marks the typical set with tolerance bits per symbol. Details. Information projection and rare sample means 2026-10-14
Take independent and identically distributed draws from the uniform three-outcome reference above. An observed sample mean at least is unusual because the source expected value is zero. For two draws, the only successful ordered pairs are , giving probability .
For long samples, the relevant empirical distributions have mean at least . The method of types assigns a profile a leading probability cost . The least costly admissible profile is the information projection on three outcomes: in this example the minimizing mean is on the boundary , and the leading exponent is approximately nats per draw. The exponential scale is not an exact finite-sample probability formula.[ref]
The attraction of this connection is that a constrained optimization problem predicts the most probable way an unusual aggregate observation can occur. It links relative entropy, expected value constraints and rare empirical distributions without identifying a rare event with just one exact attainable type class.
Method of types Created 2026-09-24 Updated 2026-10-14
The method of types combines two facts: there are few possible empirical distributions, and strings within each type class are equiprobable under an independent and identically distributed source. Information entropy determines how many strings share a frequency profile; relative entropy determines how unlikely that profile is under a specified source law. The connection is useful both for lossless source coding and for understanding rare observations.
The following formulas use natural logarithms, so information entropy and relative entropy are measured in nats. DefineHere is the source probability mass function and is an attainable empirical distribution. Use ; first assume every . Base-two logarithms give the equivalent formulas with and .
Number of empirical types 2026-10-14
A possible empirical distribution corresponds to nonnegative integer counts with sum . Stars and bars therefore givesThe bound also follows by letting each count independently range from zero to , which overcounts tuples whose sum is wrong. With the alphabet fixed, the count grows polynomially in , whereas there are strings when . For binary symbols there are exactly profiles: the number of ones can be any integer from zero through .
This reduces a rare-event calculation to a sum over profiles when the event depends only on counts. An event that depends on order may instead require counting the relevant subset inside each type class. A source with statistical dependence need not make strings of the same empirical distribution equiprobable; the memoryless assumption cannot simply be dropped.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 224 3 b Solution Created 2026-09-28 Updated 2026-10-03
The type class isWe first prove a multinomial-mode lemma. If has the multinomial law with parameters and an -type , then is a mode. Indeed, if and , moving one count from to changes the probability by the factorRepeated transfers reach without decreasing probability. There are at most count vectors, so the modal vector has probability at least .
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 224 2 a Solution Created 2026-09-28 Updated 2026-10-03
The type of is its empirical distributionIts type class isEvery string in has -probabilitywhile the method of types gives . Therefore
Type class Created 2026-09-28 Updated 2026-10-14
The type class contains all length- strings with empirical distribution . Each must be a nonnegative integer and the counts must sum to ; otherwise the class is empty. Distinct type classes partition : every string belongs to exactly one class.
For four binary symbols there are five type classes, indexed by the number of ones. Their cardinalities are , which sum to . The balanced class contains exactly . These are six different strings, not six different empirical distributions.
Sixteen binary strings form five type classes
. An exact enumeration of all four-symbol strings. Each column fixes the number of ones; the central column has six orderings of the same empirical distribution. Details.
