Method of types

From HandWiki
Short description: Technique in information theory


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, and it is used to prove Sanov's theorem in the finite support setting.[3]

It was popularized by Imre Csiszár, with the first formal treatment given in the book Information Theory: Coding Theorems for Discrete Memoryless Systems.[4]. Csiszár claimed that the technique was originally motivated by the large deviation bound described in Hoeffding's seminal paper on multinomial hypothesis testing.[5][2]

Motivating example

Given n samples from P, a Bernoulli distribution with probability of success p, there are 2n possible outcomes. We can group outcomes by the number of successful events, since every collection of r successes has the same probability, pr(1p)nr, and there are (nr) such events. This can be summarized by considering the empirical distribution Pr=(1rn,rn) and the type class T(Pr)={Xn:i=1n𝟏{Xi=1}=r}. With some analysis, one finds that [Xn]=pr(1p)nr2n[H(Pr)+D(PrP)],[T(Pr)]=(nr)pr(1p)nr2nD(PrP), where H(Pr),D(PrP) denote the Shannon entropy and relative entropy. These approximations are most accurate when n is taken to be large. A more accruate bound would be (n+1)22nD(PrP)[T(Pr)]2nD(PrP).

For example, if we wanted to get a rough estimate of the probability of seeing r=400 heads in 1000 tosses of a fair coin, we could compute D(PrP)=0.6log0.60.5+0.4log0.40.50.02905 which gives us the (loose) approximation 21000*0.029051.799*109, while the true value is (1000400)210004.6339*1011. The figure below plots the exact probability and the upper and lower bounds.

The probability that n i.i.d. samples of a Bernoulli(1/2) random variable will have type (2/5, 3/5), along with the method-of-types bounds [log scale].

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 Q, Xn=(X1,,Xn)Q, where Xi𝒳. For this sequence, let N(k|Xn)=i=1n𝟏{Xi=k} denote the number of occurrences of the symbol k in the sequence Xn.

Denote the empirical distribution of the samples with PXn, so that PXn[k]=N(k|Xn)n. The sets of sequences having empirical distribution Q, are called the type classes T(Q)={Xn𝒳n:PXn=Q}. To describe the set of all empirical distributions possible from n samples, we use the symbol 𝒫n, which is a subset of the d1 dimensional probability simplex 𝒫.

The method of types is built on top of the following results:[1]

  • |𝒫n|(n+1)|𝒳|
  • Q[Xn]=2n[H(PXn)+D(PXnQ)]
  • 1(n+1)|𝒳|2nH(Q)|T(Q)|2nH(Q)
  • 1(n+1)|𝒳|2nD(PQ)Q[T(P)]2nD(PQ)

Here H(P) denotes the Shannon entropy, and D(PQ) denotes the Kullback–Leibler divergence. The last equation is derived from the previous ones by noticing that every element of T(P) has the same probability when the samples are taken i.i.d.

These bounds are tight in terms of the error exponent,[6] but may give a loose bound in terms of |𝒳| and the sub-exponential terms in n.[7]

Applications

The method of types is used for hypothesis testing problems, when the underlying distributions have finite support[8][2][9], because it provides a tight bound on the error exponent. It was also used to prove some initial conditional limit theorems[10], 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.[11]

See also

References

  1. 1.0 1.1 1.2 Elements of Information Theory. Wiley-Interscience. pp. 347-355. ISBN 9780471241959. 
  2. 2.0 2.1 2.2 Csiszár, Imre (October 1998). "The Method of Types". IEEE Transactions on Information Theory 44. doi:10.1109/18.720546. https://ieeexplore.ieee.org/abstract/document/720546. 
  3. Dembo, Amir; Zeitouni, Ofer (2010). Large Deviations Techniques and Applications. Berlin, Heidelberg: Springer Berlin Heidelberg. ISBN 978-3-642-03310-0. https://link.springer.com/book/10.1007/978-3-642-03311-7. 
  4. Csiszár, Imre; Körner, János (1981). Information Theory: Coding Theorems for Discrete Memoryless Systems (2nd ed.). Cambridge University Press. ISBN 9780511921889. 
  5. Hoeffding, Wassily (April 1965). "Asymptotically Optimal Tests for Multinomial Distributions". The Annals of Mathematical Statistics 36 (2): 369–401. doi:10.1214/aoms/1177700150. https://projecteuclid.org/journals/annals-of-mathematical-statistics/volume-36/issue-2/Asymptotically-Optimal-Tests-for-Multinomial-Distributions/10.1214/aoms/1177700150.full. Retrieved 11 August 2026. 
  6. Harsha, K. V.; Ravi, Jithin; Koch, Tobias (October 2025). "On the Second-Order Asymptotics of the Hoeffding Test and Other Divergence Tests". IEEE Transactions on Information Theory 71 (10): 7459–7483. doi:10.1109/TIT.2025.3588194. https://e-archivo.uc3m.es/rest/api/core/bitstreams/5ccc4646-ccb8-428b-8652-cf0347627cf7/content. Retrieved 10 July 2026. 
  7. Mardia, Jay; Jiao, Jiantao; Tánczos, Ervin; Nowak, Robert D; Weissman, Tsachy (16 December 2020). "Concentration inequalities for the empirical distribution of discrete distributions: beyond the method of types". Information and Inference: A Journal of the IMA 9 (4): 813–850. doi:10.1093/imaiai/iaz025. https://academic.oup.com/imaiai/article/9/4/813/5627733. Retrieved 10 July 2026. 
  8. Singh, Aarti. "Lecture 21: Hypothesis Testing, Method of Types and Large Deviation". Aarti Singh. https://www.cs.cmu.edu/~aarti/Class/10704/lec21-types_largdev.pdf. 
  9. Feder, M.; Merhav, N. (June 2002). "Universal composite hypothesis testing: a competitive minimax approach". IEEE Transactions on Information Theory 48 (6): 1504–1517. doi:10.1109/tit.2002.1003837. ISSN 0018-9448. https://ieeexplore.ieee.org/document/1003837. Retrieved 10 July 2026. 
  10. Csiszar, I.; Cover, T. (November 1987). "Conditional limit theorems under Markov conditioning". IEEE Transactions on Information Theory 33 (6): 788–801. doi:10.1109/TIT.1987.1057385. https://www-isl.stanford.edu/~cover/papers/transIT/0788csis.pdf. Retrieved 11 August 2026. 
  11. Brémaud, Pierre (2017) (in en). Discrete Probability Models and Methods: Probability on Graphs and Trees, Markov Chains and Random Fields, Entropy and Coding. Cham: Springer International Publishing. p. 351. ISBN 978-3-319-43475-9. https://link.springer.com/book/10.1007/978-3-319-43476-6. Retrieved 11 August 2026.