Skip to content

Commit fc2c858

Browse files
committed
wip on entropy rate
1 parent 031231b commit fc2c858

1 file changed

Lines changed: 18 additions & 20 deletions

File tree

content/applied-math/information-theory/02-entropy-of-a-discrete-information-source.tex

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
\begin{document}
88

9-
\begin{definition}[Entropy of a Source]
10-
Consider a discrete source with $i$ finite number of states, where in state $i$ there is probability $p_i(j)$ of producing symbol $j.$ Then, each state $i$ will have an entropy $H_i,$ and the \textbf{entropy of the source} will be defined as the average of these $H_i$ weighted by the probability of the occurrence of each state ($P_i$):
9+
\begin{definition}[Entropy Rate]
10+
Consider a discrete source with $i$ finite number of states, where in state $i$ there is probability $p_i(j)$ of producing symbol $j.$ Then, each state $i$ will have an entropy $H_i,$ and the \textbf{entropy rate} of the source will be defined as the average of these $H_i$ weighted by the probability of the occurrence of each state ($P_i$):
1111

1212
\bal
1313
H & = \sum_{i} P_i H_i \\
@@ -43,14 +43,14 @@
4343
H & \approx \frac{\log{1/p}}{N}.
4444
\eal
4545

46-
so \@{entropy} is approximately the log of the reciprocal probability of a long sequence divided by the number of symbols in the sequence. The theorem below states this more formally.
46+
so \@{entropy} is approximately the log of the reciprocal probability of a long \@{sequence} divided by the number of symbols in the sequence. The theorem below states this more formally.
4747

4848
\begin{theorem}[Weak Asymptotic Equipartition Property]
4949
Start with a source alphabet with $n$ symbols $a_1, \dots, a_n,$ emitted \@{i.i.d.} with probabilities $p_1, \dots, p_n$ (so $p_i = \Pr(a_i)).$ Its \@{entropy} is, by definition,
5050

5151
\[ H = - \sum_{i=1}^{n} p_i \log{p_i}. \]
5252

53-
A message is a sequence $S = (x_1, \dots, x_N)$ of length $N,$ each $x_j \in \{a_1, \dots, a_n\}.$ By independence,
53+
A message is a \@{sequence} $S = (x_1, \dots, x_N)$ of length $N,$ each $x_j \in \{a_1, \dots, a_n\}.$ By independence,
5454

5555
\[ p_S = \prod_{j=1}^N \Pr(x_j) \]
5656

@@ -87,7 +87,7 @@
8787

8888
$c_i$ is the only random thing in $p_S$ - it doesn't consider position of symbols, just the total count of each symbol (random) and the probability of that symbol being emitted on any given turn (fixed).
8989

90-
Taking advantage of our symbols being emitted \@{i.i.d.}, we can convert our expression about the @surprisal@ of the sequence to an equivalent expression about the surprisal of individual symbols being emitted:
90+
Taking advantage of our symbols being emitted \@{i.i.d.}, we can convert our expression about the \@{surprisal} of the sequence to an equivalent expression about the surprisal of individual symbols being emitted:
9191

9292
\bal
9393
\frac{1}{N} \log{\frac{1}{p_S}} & = \frac{1}{N} \log{\frac{1}{\prod_{i = 1}^n p_i^{c_i}}} \\
@@ -96,7 +96,7 @@
9696
& = - \sum_{i=1}^n \frac{c_i}{N} \log{p_i}.
9797
\eal
9898

99-
This final term is very similar to $H = - \sum_{i=1}^{n} p_i \log{p_i};$ we just need to show that $\frac{c_i}{N} \to p_i$ as $N \to \infty.$ The expected value of $c_i$ for $N$ draws is the expected count of $a_i$ in $N$ draws, and is
99+
This final term is very similar to $H = - \sum_{i=1}^{n} p_i \log{p_i};$ we just need to show that $\frac{c_i}{N} \to p_i$ as $N \to \infty.$ The \@{expected-value} of $c_i$ for $N$ draws is the expected count of $a_i$ in $N$ draws, and is
100100

101101
\[ \mathbb{E}(c_i) = N p_i. \]
102102

@@ -122,29 +122,27 @@
122122
\end{theorem}
123123

124124
\begin{theorem}[Strong Asymptotic Equipartition Property (Shannon--McMillan--Breiman)]
125-
Start with a source of $n$ states $a_1, \dots, a_n,$ emitted by a \@{stationary}
126-
\@{ergodic} \@{Markov-chain} with transition probabilities
125+
Start with a source of $n$ states $a_1, \dots, a_n,$ emitted by a \@{stationary} \@{ergodic} \@{Markov-chain} with transition probabilities
127126
\[ p_{ik} = \Pr(X_{t+1} = a_k \mid X_t = a_i), \qquad \textstyle\sum_{k=1}^n p_{ik} = 1, \]
128-
and \@{stationary distribution} $P = (P_1, \dots, P_n)$ --- the left eigenvector
129-
solving $P = PT$ for the transition matrix $T = (p_{ik})$ (eigenvalue $1,$
130-
normalized so $\sum_i P_i = 1$). Its \@{entropy rate} is, by definition,
127+
and \@{stationary distribution} $P = (P_1, \dots, P_n)$. Its \@{entropy rate} is, by definition,
131128
\[ H = -\sum_{i=1}^n \sum_{k=1}^n P_i\, p_{ik} \log{p_{ik}}. \]
132-
A message is a sequence $S = (x_1, \dots, x_N)$ of length $N,$ each
133-
$x_t \in \{a_1, \dots, a_n\}$ --- a path through the network --- with probability
129+
A message is a \@{sequence} $S = (x_1, \dots, x_N)$ of length $N,$ each $x_t \in \{a_1, \dots, a_n\}$. Such a message is a path through the network with probability
134130
\[ p_S = P_{x_1} \prod_{t=1}^{N-1} p_{x_t\, x_{t+1}}. \]
135-
Let $\epsilon, \delta > 0.$ Then there exists $N_0$ such that for all $N \geq N_0$
136-
the length-$N$ sequences split into two classes:
131+
Let $\epsilon, \delta > 0.$ Then there exists $N_0$ such that for all $N \geq N_0$ the length-$N$ sequences split into two classes:
137132
\begin{enumerate}
138133
\item The typical set,
139134
$A_\delta^{(N)} = \left\{ S : \left| \dfrac{1}{N} \log{\dfrac{1}{p_S}} - H \right| \leq \delta \right\}.$
140135
\item The atypical set, $\overline{A_\delta^{(N)}},$ with total probability
141136
$\Pr\!\left(\overline{A_\delta^{(N)}}\right) < \epsilon.$
142137
\end{enumerate}
143-
Moreover --- and this is the strengthening past convergence in probability --- the
144-
convergence holds \@{almost surely}:
138+
Moreover the convergence holds \@{almost surely}:
145139
\[ \Pr\!\left( \lim_{N \to \infty} \frac{1}{N} \log{\frac{1}{p_S}} = H \right) = 1, \]
146-
so with probability $1$ a drawn sequence is typical for all sufficiently large $N$
147-
--- a statement about whole trajectories, not merely each $N$ separately.
140+
so with probability $1$ a drawn sequence is typical for all sufficiently large $N$
141+
\begin{proof}
142+
--- the left eigenvector
143+
solving $P = PT$ for the \@{transition-matrix} $T = (p_{ik})$ (eigenvalue $1,$
144+
normalized so $\sum_i P_i = 1$).
145+
\end{proof}
148146
\end{theorem}
149147

150148

@@ -161,7 +159,7 @@
161159

162160
so the unit of $C/H$ is symbols per second.
163161

164-
The best transmitter is one which codes the message in such a way that maximizes the signal entropy and makes it equal to the capacity of the channel, which allows reaching the maximum rate $C/H$ for the transmission of symbols.
162+
The best transmitter is one which codes the message in such a way that maximizes the signal \@{entropy} and makes it equal to the \@{capacity} of the channel, which allows reaching the maximum rate $C/H$ for the transmission of symbols.
165163
\end{note}
166164

167165
\end{document}

0 commit comments

Comments
 (0)