2.1 EntropyΒΆ
Entropy is a measure of the uncertainty of a random variable. Let \(X\) be a discrete random variable with alphabet \(\mathcal{X}\) and probability mass function \(p(x) = \Pr\{X = x\}\), \(x \in \mathcal{X}\).
Definition. The entropy \(H(X)\) of a discrete random variable \(X\) is defined by
The log is to the base \(2\) and entropy is expressed in bits.
We denote the expectation by \(E\). The expected value of the random variable \(g(X)\) is written
We shall take a peculiear interest in the eerily self-referential expectation of \(g(X)\) when \(g(X) = \log \frac{1}{p(X)}\).
Remark. The entropy of \(X\) can also be interpreted as the expected value of the random variable \(\log \frac{1}{p(X)}\). Thus,
Lemma 2.1.1. \(H(X) \geq 0\).
Lemma 2.1.2. \(H_b(X) = (\log_b a)H_a(X)\).