Typical set

In information theory, the typical set is a set of sequences whose probability is close to two raised to the negative power of the entropy of their source distribution. That this set has total probability close to one is a consequence of the asymptotic equipartition property (AEP) which is a kind of law of large numbers. The notion of typicality is only concerned with the probability of a sequence and not the actual sequence itself. This has great use in compression theory as it provides a theoretical means for compressing data, allowing us to represent any sequence Xn using nH(X) bits on average, and, hence, justifying the use of entropy as a measure of information from a source.

The AEP can also be proven for a large class of stationary ergodic processes, allowing typical set to be defined in more general cases.

## Contents

* 1 (Weakly) typical sequences (weak typicality, entropy typicality)
* 1.1 Properties
* 1.2 Example
* 2 Strongly typical sequences (strong typicality, letter typicality)
* 3 Jointly typical sequences
* 4 Applications of typicality
* 4.1 Typical set encoding
* 4.2 Typical set decoding
* 4.3 Universal null-hypothesis testing
* 4.4 Universal channel code
* 5 See also
* 6 References

## (Weakly) typical sequences (weak typicality, entropy typicality)

If a sequence x1, ..., xn is drawn from an i.i.d. distribution X defined over a finite alphabet [math]\displaystyle{ \mathcal{X} }[/math], then the typical set, Aε(n)[math]\displaystyle{ \in\mathcal{X} }[/math](n) is defined as those sequences which satisfy:

[math]\displaystyle{ 2^{-n( H(X)+\varepsilon)} \leqslant p(x_1, x_2, \dots , x_n) \leqslant 2^{-n( H(X)-\varepsilon)} }[/math]

where

[math]\displaystyle{ H(X) = - \sum_{x \isin \mathcal{X}}p(x)\log_2 p(x) }[/math]

is the information entropy of X. The probability above need only be within a factor of 2n ε. Taking the logarithm on all sides and dividing by -n, this definition can be equivalently stated as

[math]\displaystyle{ H(X) - \varepsilon \leq -\frac{1}{n}\log_2 p(x_1, x_2, \ldots, x_n) \leq H(X) + \varepsilon. }[/math]

For i.i.d sequence, since

[math]\displaystyle{ p(x_1, x_2, \ldots, x_n) = \prod_{i=1}^n p(x_i), }[/math]

we further have

[math]\displaystyle{ H(X) - \varepsilon \leq -\frac{1}{n} \sum_{i=1}^n \log_2 p(x_i) \leq H(X) + \varepsilon. }[/math]

By the law of large numbers, for sufficiently large n

[math]\displaystyle{ -\frac{1}{n} \sum_{i=1}^n \log_2 p(x_i) \rightarrow H(X). }[/math]

### Properties

An essential characteristic of the typical set is that, if one draws a large number n of independent random samples from the distribution X, the resulting sequence (x1, x2, ..., xn) is very likely to be a member of the typical set, even though the typical set comprises only a small fraction of all the possible sequences. Formally, given any [math]\displaystyle{ \varepsilon\gt 0 }[/math], one can choose n such that:

1. The probability of a sequence from X(n) being drawn from Aε(n) is greater than 1 − ε, i.e. [math]\displaystyle{ Pr[x^{(n)} \in A_\epsilon^{(n)}] \geq 1 - \varepsilon }[/math]
2. [math]\displaystyle{ \left| {A_\varepsilon}^{(n)} \right| \leqslant 2^{n(H(X)+\varepsilon)} }[/math]
3. [math]\displaystyle{ \left| {A_\varepsilon}^{(n)} \right| \geqslant (1-\varepsilon)2^{n(H(X)-\varepsilon)} }[/math]
4. If the distribution over [math]\displaystyle{ \mathcal{X} }[/math] is not uniform, then the fraction of sequences that are typical is

[math]\displaystyle{ \frac{|A_\epsilon^{(n)}|}{|\mathcal{X}^{(n)}|} \equiv \frac{2^{nH(X)}}{2^{n\log_2|\mathcal{X}|}} = 2^{-n(\log_2|\mathcal{X}|-H(X))} \rightarrow 0 }[/math]

as n becomes very large, since [math]\displaystyle{ H(X) \lt \log_2|\mathcal{X}|, }[/math] where [math]\displaystyle{ |\mathcal{X}| }[/math] is the cardinality of [math]\displaystyle{ \mathcal{X} }[/math].

For a general stochastic process {X(t)} with AEP, the (weakly) typical set can be defined similarly with p(x1, x2, ..., xn) replaced by p(x0τ) (i.e. the probability of the sample limited to the time interval [0, τ]), n being the degree of freedom of the process in the time interval and H(X) being the entropy rate. If the process is continuous-valued, differential entropy is used instead.

### Example

Counter-intuitively, the most likely sequence is often not a member of the typical set. For example, suppose that X is an i.i.d Bernoulli random variable with p(0)=0.1 and p(1)=0.9. In n independent trials, since p(1)>p(0), the most likely sequence of outcome is the sequence of all 1's, (1,1,...,1). Here the entropy of X is H(X)=0.469, while

[math]\displaystyle{ -\frac{1}{n}\log_2 p\left(x^{(n)}=(1,1,\ldots,1)\right) = -\frac{1}{n}\log_2 (0.9^n) = 0.152 }[/math]

So this sequence is not in the typical set because its average logarithmic probability cannot come arbitrarily close to the entropy of the random variable X no matter how large we take the value of n.

For Bernoulli random variables, the typical set consists of sequences with average numbers of 0s and 1s in n independent trials. This is easily demonstrated: If p(1) = p and p(0) = 1-p, then for n trials with m 1's, we have

[math]\displaystyle{ -\frac{1}{n} \log_2 p(x^{(n)}) = -\frac{1}{n} \log_2 p^m (1-p)^{n-m} = -\frac{m}{n} \log_2 p - \left( \frac{n-m}{n} \right) \log_2 (1-p). }[/math]

The average number of 1's in a sequence of Bernoulli trials is m = np. Thus, we have

[math]\displaystyle{ -\frac{1}{n} \log_2 p(x^{(n)}) = - p \log_2 p - (1-p) \log_2 (1-p) = H(X). }[/math]

For this example, if n=10, then the typical set consist of all sequences that have a single 0 in the entire sequence. In case p(0)=p(1)=0.5, then every possible binary sequences belong to the typical set.

## Strongly typical sequences (strong typicality, letter typicality)

If a sequence x1, ..., xn is drawn from some specified joint distribution defined over a finite or an infinite alphabet [math]\displaystyle{ \mathcal{X} }[/math], then the strongly typical set, Aε,strong(n)[math]\displaystyle{ \in\mathcal{X} }[/math] is defined as the set of sequences which satisfy

[math]\displaystyle{ \left|\frac{N(x_i)}{n}-p(x_i)\right| \lt \frac{\varepsilon}{\|\mathcal{X}\|}. }[/math]

where [math]\displaystyle{ {N(x_i)} }[/math] is the number of occurrences of a specific symbol in the sequence.

It can be shown that strongly typical sequences are also weakly typical (with a different constant ε), and hence the name. The two forms, however, are not equivalent. Strong typicality is often easier to work with in proving theorems for memoryless channels. However, as is apparent from the definition, this form of typicality is only defined for random variables having finite support.

## Jointly typical sequences

Two sequences [math]\displaystyle{ x^n }[/math] and [math]\displaystyle{ y^n }[/math] are jointly ε-typical if the pair [math]\displaystyle{ (x^n,y^n) }[/math] is ε-typical with respect to the joint distribution [math]\displaystyle{ p(x^n,y^n)=\prod_{i=1}^n p(x_i,y_i) }[/math] and both [math]\displaystyle{ x^n }[/math] and [math]\displaystyle{ y^n }[/math] are ε-typical with respect to their marginal distributions [math]\displaystyle{ p(x^n) }[/math] and [math]\displaystyle{ p(y^n) }[/math]. The set of all such pairs of sequences [math]\displaystyle{ (x^n,y^n) }[/math] is denoted by [math]\displaystyle{ A_{\varepsilon}^n(X,Y) }[/math]. Jointly ε-typical n-tuple sequences are defined similarly.

Let [math]\displaystyle{ \tilde{X}^n }[/math] and [math]\displaystyle{ \tilde{Y}^n }[/math] be two independent sequences of random variables with the same marginal distributions [math]\displaystyle{ p(x^n) }[/math] and [math]\displaystyle{ p(y^n) }[/math]. Then for any ε>0, for sufficiently large n, jointly typical sequences satisfy the following properties:

1. [math]\displaystyle{ P\left[ (X^n,Y^n) \in A_{\varepsilon}^n(X,Y) \right] \geqslant 1 - \epsilon }[/math]
2. [math]\displaystyle{ \left| A_{\varepsilon}^n(X,Y) \right| \leqslant 2^{n (H(X,Y) + \epsilon)} }[/math]
3. [math]\displaystyle{ \left| A_{\varepsilon}^n(X,Y) \right| \geqslant (1 - \epsilon) 2^{n (H(X,Y) - \epsilon)} }[/math]
4. [math]\displaystyle{ P\left[ (\tilde{X}^n,\tilde{Y}^n) \in A_{\varepsilon}^n(X,Y) \right] \leqslant 2^{-n (I(X;Y) - 3 \epsilon)} }[/math]
5. [math]\displaystyle{ P\left[ (\tilde{X}^n,\tilde{Y}^n) \in A_{\varepsilon}^n(X,Y) \right] \geqslant (1 - \epsilon) 2^{-n (I(X;Y) + 3 \epsilon)} }[/math]

## Applications of typicality

### Typical set encoding

Further information: Shannon's source coding theorem

In information theory, typical set encoding encodes only the sequences in the typical set of a stochastic source with fixed length block codes. Since the size of the typical set is about 2nH(X), only nH(X) bits are required for the coding, while at the same time ensuring that the chances of encoding error is limited to ε. Asymptotically, it is, by the AEP, lossless and achieves the minimum rate equal to the entropy rate of the source.

### Typical set decoding

In information theory, typical set decoding is used in conjunction with random coding to estimate the transmitted message as the one with a codeword that is jointly ε-typical with the observation. i.e.

[math]\displaystyle{ \hat{w}=w \iff (\exists w)( (x_1^n(w),y_1^n)\in A_{\varepsilon}^n(X,Y)) }[/math]

where [math]\displaystyle{ \hat{w},x_1^n(w),y_1^n }[/math] are the message estimate, codeword of message [math]\displaystyle{ w }[/math] and the observation respectively. [math]\displaystyle{ A_{\varepsilon}^n(X,Y) }[/math] is defined with respect to the joint distribution [math]\displaystyle{ p(x_1^n)p(y_1^n|x_1^n) }[/math] where [math]\displaystyle{ p(y_1^n|x_1^n) }[/math] is the transition probability that characterizes the channel statistics, and [math]\displaystyle{ p(x_1^n) }[/math] is some input distribution used to generate the codewords in the random codebook.

### Universal null-hypothesis testing

### Universal channel code

## See also

* Asymptotic equipartition property
* Source coding theorem
* Noisy-channel coding theorem

## References

* C. E. Shannon, "A Mathematical Theory of Communication", Bell System Technical Journal, vol. 27, pp. 379–423, 623-656, July, October, 1948
* Cover, Thomas M. (2006). "Chapter 3: Asymptotic Equipartition Property, Chapter 5: Data Compression, Chapter 8: Channel Capacity". Elements of Information Theory. John Wiley & Sons. ISBN 0-471-24195-4.
* David J. C. MacKay. Information Theory, Inference, and Learning Algorithms Cambridge: Cambridge University Press, 2003. ISBN 0-521-64298-1

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Typical set. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Typical_set&oldid=2631603"