# Entropy rate

In the mathematical theory of probability, the entropy rate or source information rate is a function assigning an entropy to a stochastic process.
For a strongly stationary process, the conditional entropy for latest random variable eventually tend towards this rate value.

## Definition

A process $X$ with a countable index gives rise to the sequence of its joint entropies $H_{n}(X_{1},X_{2},\dots X_{n})$. If the limit exists, the entropy rate is defined as
    $H(X):=\lim _{n\to \infty }{\tfrac {1}{n}}H_{n}.$
Note that given any sequence $(a_{n})_{n}$ with $a_{0}=0$ and letting $\Delta a_{k}:=a_{k}-a_{k-1}$, by telescoping one has $a_{n}={\textstyle \sum _{k=1}^{n}}\Delta a_{k}$. The entropy rate thus computes the mean of the first $n$ such entropy changes, with $n$ going to infinity. The behaviour of joint entropies from one index to the next is also explicitly subject in some characterizations of entropy.

## Discussion

While $X$ may be understood as a sequence of random variables, the entropy rate $H(X)$ represents the average entropy change per one random variable, in the long term.
It can be thought of as a general property of stochastic sources - this is the subject of the asymptotic equipartition property.

### For strongly stationary processes

A stochastic process also gives rise to a sequence of conditional entropies, comprising more and more random variables. For strongly stationary stochastic processes, the entropy rate equals the limit of that sequence
    $H(X)=\lim _{n\to \infty }H(X_{n}|X_{n-1},X_{n-2},\dots X_{1})$
The quantity given by the limit on the right is also denoted $H'(X)$, which is motivated to the extent that here this is then again a rate associated with the process, in the above sense.

### For Markov chains

Since a stochastic process defined by a Markov chain that is irreducible, aperiodic and positive recurrent has a stationary distribution, the entropy rate is independent of the initial distribution.
For example, consider a Markov chain defined on a countable number of states. Given its right stochastic transition matrix $P_{ij}$ and an entropy
    $h_{i}:=-\sum _{j}P_{ij}\log P_{ij}$
associated with each state, one finds
    $\displaystyle H(X)=\sum _{i}\mu _{i}h_{i},$
where $\mu _{i}$ is the asymptotic distribution of the chain.
In particular, it follows that the entropy rate of an i.i.d. stochastic process is the same as the entropy of any individual member in the process.

### For hidden Markov models

The entropy rate of hidden Markov models (HMM) has no known closed-form solution. However, it has known upper and lower bounds. Let the underlying Markov chain $X_{1:\infty }$ be stationary, and let $Y_{1:\infty }$ be the observable states, then we have$H(Y_{n}|X_{1},Y_{1:n-1})\leq H(Y)\leq H(Y_{n}|Y_{1:n-1})$and at the limit of $n\to \infty$, both sides converge to the middle.

## Applications

The entropy rate may be used to estimate the complexity of stochastic processes. It is used in diverse applications ranging from characterizing the complexity of languages, blind source separation, through to optimizing quantizers and data compression algorithms. For example, a maximum entropy rate criterion may be used for feature selection in machine learning.