In his 1998 retrospective, Imre Csiszár describes the method of types as a 1970s refinement of the typical set approach, with older counting ingredients. He credits his research group with turning those ingredients into a general tool, while explicitly declining to give a complete discovery history.[ref] The useful shift is from an approximately typical collection to exact frequency classes: the latter retain enough structure to study how fast error probabilities decay.
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. Define
Here 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 .
Let and let the daily distances be independent and identically distributed random variables with probabilities , . The unconditioned mean daily distance is , whereas the observed trip requires a daily average near . Conditioning on that rare average changes the typical frequencies substantially. It does not determine an exact boost count.
Use the method of types: for a fixed finite alphabet, the probability of an empirical distribution is
where is relative entropy, using natural logarithms. This follows directly from Stirling's approximation. There are only polynomially many types, so the empirical distribution conditional on a mean constraint concentrates at its unique relative entropy minimizer, when admissible lattice types approximate that minimizer. Any fixed neighborhood of it has a strictly smaller minimum cost than its complement.
Minimize subject to and . The entropy minimization under a prescribed sample mean gives the exponential tilting
To verify minimization without relying only on Lagrange multipliers, any feasible distribution satisfies
Relative entropy nonnegativity makes the unique minimizer. Its mean determines through , or
The derivative of the tilted mean is the tilted variance, which is strictly positive. The mean rises from at to as , so this equation has one positive solution. Numerically,
The predicted boost count is . Thus the conditional large-deviation estimate is about 382 boosts.
For exact arrival at total distance , let count days of distances . The constraints give
Consequently can be any even integer from to . In particular, a unique count cannot be inferred from the return time. The exact conditional weights are proportional to
Their most probable count is , consistent with the exponential tilting calculation. This finite-sample inference is a conditional probability statement, not an assertion that all journeys with the stated duration have that count.
If returning home means first crossing the distance threshold on day , the final total instead lies between and . The last increment must exceed the overshoot; for fixed counts this selects the corresponding fraction of possible last days. Near the tilted optimum that factor is bounded away from zero, so it does not alter the leading exponential type cost. The same approximate answer follows. Exact conditional enumeration of this first-arrival interpretation also has mode .
For an independent identically distributed source with mass function on a finite alphabet and a fixed compression rate , the optimal probability of decoding error has exponent
meaning that the best fixed-rate codes satisfy
at continuity points of the exponent.
For the direct part, let and
Encode every sequence whose type satisfies . The method of types bounds the number of such sequences by
so they fit into a rate- codebook. The error probability obeys
Compactness of the probability simplex and continuity of entropy and relative entropy on the support of give
which is the direct bound.
The test accepts when . Under , the method of types gives
so
Under , accepting requires a type in the closed set . Therefore
where
Consequently for . The first exponent is positive when . Because relative entropy vanishes only when its arguments agree, the second is positive exactly while lies outside the constraint set. Thus both are strictly positive for
The type of is its empirical distribution
Its type class is
Every string in has -probability
while the method of types gives . Therefore
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.
For an IID finite-alphabet source and a fixed rate , let be the smallest probability that a block is not represented by a fixed-to-fixed code having at most codewords. The fixed-rate source-coding error exponent theorem states
For the direct part, encode all type classes whose empirical entropy is at most , where and . Since a type class has at most sequences and there are at most types, this codebook has at most entries for large . An error can occur only when . The method of types bounds its probability by
Taking the lower limit of the exponent and using compactness and continuity gives at least , proving achievability.
Here . The method of types gives at most possible values of type, and a type class has
Every type in has , so
The polynomial prefactor has zero exponential rate. Therefore
Type (information theory) Created 2026-09-24 Updated 2026-10-14
A type summarizes a string by how often each symbol occurs. Fix a finite alphabet of cardinality and a positive length . For a string , its empirical distribution is the probability mass function
The empirical distribution forgets order. The strings and both assign probability to each binary symbol; assigns to zero and to one. Thus a long string can have a short summary even though that summary does not reconstruct the original order.
For independent and identically distributed symbols, this loss of order has a useful consequence: all strings with the same empirical distribution have the same probability. The method of types uses this symmetry to turn questions about exponentially many strings into counting questions about relatively few frequency profiles.[ref]