Classical Information and Shannon Entropy
Before we can quantify quantum information, we need a sharp notion of classical information. That notion is Shannon entropy — the quantity that measures, in bits, how much we learn on average when we observe the outcome of a random source, or equivalently how uncertain we are about that outcome beforehand.
Surprise and its average
Suppose a source emits a symbol drawn from a finite alphabet with probability . The surprise (or surprisal) of observing is
A near-certain outcome () carries almost no surprise; a rare outcome () is highly surprising. The base-2 logarithm fixes the unit: one bit is the surprise of a fair coin landing heads, .
The Shannon entropy is the expected surprise:
with the universal convention , justified because as .
Properties
- Non-negativity. , since each for . It is zero iff the distribution is deterministic (one symbol has probability ).
- Maximum at uniform. Over an alphabet of size , , with equality iff for all . Uncertainty is greatest when every outcome is equally likely.
- Concavity. is a concave function of the probability vector, a fact that underlies many inequalities in information theory.
The binary entropy function
For a two-outcome source with and , the entropy specializes to the binary entropy function
It is symmetric about , where it attains its maximum bit, and vanishes at and . A biased coin with has
less than the full bit of a fair coin, because the bias makes the outcome partly predictable.
Why entropy is the right measure
Shannon's source coding theorem gives entropy its operational meaning: a source of entropy bits per symbol can be compressed to, and no further than, bits per symbol on average in the limit of long sequences. Entropy is not an arbitrary formula — it is exactly the number of bits you must pay to record the source's output. In the next lesson we lift this idea to quantum states, where the von Neumann entropy plays the same role for density operators.
Try it
Compute the Shannon entropy, in bits, of a biased coin with and , using the convention . Return the value as a number.
Sign in on the full site to ask questions and join the discussion.