Method of types
Technique in information theory
From Wikipedia, the free encyclopedia
The method of types is a tool in information theory and large deviation theory to analyze events from the perspective of the empirical distribution.[1][2] It classifies events as typical when the empirical distribution closely matches the true distribution.
It has been used to prove results in hypothesis testing, channel coding,[2][3] and universal source coding,[1][4] and it is used to prove Sanov's theorem in the finite support setting.[5][6] It is often used to simplify complex probability expressions into more natural expressions involving the Kullback–Leibler divergence. The topic is considered a traditional method in information theory,[7][8] is usually covered in introductory courses on information theory,[3][4][9][10][11] and textbooks.[1][8][12][13]
It was popularized by Imre Csiszár,[14] with the first formal treatment given in the book Information Theory: Coding Theorems for Discrete Memoryless Systems.[8][12]. Csiszár claimed that the technique was originally motivated by the large deviation bound described in Hoeffding's seminal paper on multinomial hypothesis testing.[15][2]
Motivating example
Given samples from , a Bernoulli distribution with probability of success , there are possible outcomes. We can group outcomes by the number of successful events, since every collection of successes has the same probability, , and there are such events. This can be summarized by considering the empirical distribution and the type class . With some analysis, one finds that where denote the Shannon entropy and relative entropy. These approximations are most accurate when is taken to be large. A more accruate bound would be
For example, if we wanted to get a rough estimate of the probability of seeing heads in 1000 tosses of a fair coin, we could compute which gives us the (loose) approximation while the true value is The figure below plots the exact probability and the upper and lower bounds.

The method of types generalizes the above example to multivariate distributions.
Mathematical formulation
Let be an alphabet with a finite number of elements. We start with a sequence of i.i.d. random variables following a finite support distribution , , where . For this sequence, let denote the number of occurrences of the symbol in the sequence .
Denote the empirical distribution of the samples with , so that . The sets of sequences having empirical distribution , are called the type classes . To describe the set of all empirical distributions possible from samples, we use the symbol , which is a subset of the dimensional probability simplex .
The method of types is built on top of the following results:[1]
Here denotes the Shannon entropy, and denotes the Kullback–Leibler divergence. The last equation is derived from the previous ones by noticing that every element of has the same probability when the samples are taken i.i.d.
These bounds are tight in terms of the error exponent,[16] but may give a loose bound in terms of and the sub-exponential terms in .[17]
Applications
The method of types is used for hypothesis testing problems, when the underlying distributions have finite support[18][2][19], because it provides a tight bound on the error exponent. It was also used to prove some initial conditional limit theorems[20], which are special cases of the general class of limit theorems. The bound on the size of a type class can be used to prove tight bounds on the exact value on binomial coefficients[1]. It is also used to prove the principle of maximum entropy.[21]