Information Theory and Entropy
Information theory quantifies information, uncertainty, and the limits of communication. Its central quantity, Shannon entropy , measures the average uncertainty (in bits) of a random variable. It governs data compression (source coding) and reliable transmission (channel coding). Founded by Claude Shannon in his 1948 paper A Mathematical Theory of Communication.
Information is the resolution of uncertainty. The amount of information in an event is inversely related to its probability: rare events are surprising and informative; certain events tell us nothing. Entropy is the expected surprise. Once you measure uncertainty in bits, the entire theory of compression and communication follows as a matter of counting.
Formal Statement
The self-information of an event with probability is
Derivation hint: Demand that information be (i) decreasing in probability, (ii) additive for independent events , and (iii) continuous. Cauchy's functional equation forces a logarithm. The base fixes the unit: gives bits, gives nats, gives dits/hartleys. Symbol is the probability mass of outcome .
For a discrete random variable with alphabet and pmf , the entropy is the expected self-information:
Derivation hint: Take the expectation of equation [1] under . The convention is used, justified by . Here is measured in bits, is the (finite or countable) set of outcomes, and the sum runs over all with .
For two random variables :
Derivation hint: Apply equation [2] to the joint pmf over the product alphabet .
Derivation hint: Average the entropy of given over : . The chain-rule form follows from and splitting the log.
Derivation hint: Mutual information is the KL divergence between the joint and the product of marginals; expand the log of the ratio and regroup using [2] and [4].
The relative entropy between distributions and on the same alphabet is
Derivation hint: Measure the expected number of extra bits paid for coding samples from using a code optimal for ; this is . is not symmetric and is not a metric, but with equality iff .
Let be i.i.d. samples from . For any , there exists a lossless code with expected length per symbol satisfying for large enough, and no lossless code can achieve . Entropy is the fundamental limit of lossless compression.
For a discrete memoryless channel with transition law , define capacity
Derivation hint: Capacity is the largest mutual information achievable by optimizing the input distribution; the max exists because is continuous and concave in over a compact simplex. For any rate , there exist codes of block length with error probability as . For , error probability is bounded away from zero.
Why It Holds / Derivation
We establish and . 1. Non-negativity of . Each term since makes . Hence , with equality iff some (a deterministic variable). 2. Gibbs' inequality (KL ). Use for . Then
Derivation hint: Apply with , multiply by , and sum; both distributions normalize to 1. 3. Therefore , with equality iff everywhere, i.e. . 4. Maximum entropy. Set to the uniform distribution . Then
Derivation hint: Substitute into [6], split the logarithm, and recognize . Non-negativity from step 2 gives the bound. 5. Hence , with equality iff is uniform. Uncertainty is maximized when all outcomes are equally likely.
∎An American mathematician and electrical engineer at Bell Labs, Shannon single-handedly founded information theory with his 1948 monograph. His earlier 1937 master's thesis showed that Boolean algebra could describe switching circuits—arguably the most influential master's thesis ever, birthing digital logic design. Shannon was famously playful: he built juggling machines, a mechanical mouse that solved mazes ("Theseus"), and rode a unicycle through Bell Labs corridors. He chose the word "entropy" on the advice of John von Neumann, who reportedly told him no one understands entropy, so he'd always win an argument.
Building Intuition
Think of entropy as the average number of yes/no questions needed to pin down an outcome using an optimal questioning strategy. If a horse race has 8 equally likely horses, you need 3 questions ("Is it in the top half?" etc.)—and bits. If one horse is a near-certain favorite, you often guess right with one question, so the average drops below 3. The biased coin is the cleanest mental model. A fair coin gives 1 bit. A coin that lands heads 90% of the time is mostly predictable: most flips tell you little, so its entropy is only about 0.47 bits. A two-headed coin gives 0 bits—you learn nothing. Mutual information is the overlap of uncertainties: how much knowing shaves off your uncertainty about . It is symmetric—learning about smoke tells you exactly as much about fire as vice versa.
Worked Examples
Given: A coin lands heads with probability , tails with .
Steps: 1. Apply equation [2]: . 2. bits. 3. bits. 4. Sum: bits.
Interpretation: a long sequence of such flips can be compressed to roughly bits, versus bits for naive storage—an 19% saving.
Given: A binary symmetric channel (BSC) flips each transmitted bit independently with probability .
Steps: 1. Capacity of a BSC: bits per channel use, where is the binary entropy of the flip probability. 2. Compute . 3. bits. 4. bits. 5. bits, so .
Interpretation: despite 10% noise, you can transmit reliably (with vanishing error) at up to about 0.53 information bits per physical bit sent, using a good error-correcting code.
Common Misconceptions
Entropy is not disorder, and high entropy is not "bad." In information theory, entropy measures uncertainty about which message will occur, not physical messiness. A maximally compressed file looks like random noise precisely because it has maximal entropy—every bit is informative.
Information is not the same as meaning. Shannon's theory is deliberately semantic-free: the string "asdfjkl" and a Shakespeare sonnet of equal length and letter statistics carry the same Shannon information. Meaning lives outside the theory.
Bits-the-unit vs. bits-the-storage. A source with entropy 0.8 bits/symbol still requires whole physical bits to store one symbol; the entropy is the amortized limit over long sequences, not a per-symbol storage size.
"More outcomes always means more entropy." False. Consider over 1000 outcomes where one outcome has probability and the remaining 999 share . Its entropy is about bits—far less than a fair coin's 1 bit over only 2 outcomes. Entropy depends on the shape of the distribution, not the alphabet size alone. Only the uniform distribution attains the maximum .
Connections
Information theory sits at a crossroads. Its entropy formula is mathematically identical (up to Boltzmann's constant) to the Statistical Mechanics entropy , linking information to thermodynamics via Maxwell's Demon and Landauer's principle. The KL divergence is the workhorse of Bayesian Inference and underlies Maximum Likelihood Estimation, since maximizing likelihood minimizes . Mutual information is a central objective in Machine Learning, from feature selection to the information bottleneck. The maximum-entropy principle connects to Probability Theory as a least-biased way to assign distributions under constraints, recovering the Gaussian and exponential families.
Real-World Applications
Historical Development
Subtleties & Limits
Several deep issues remain active. Differential entropy for continuous variables can be negative and is not coordinate-invariant, requiring care; the right invariant object is relative entropy or mutual information. Finite-blocklength information theory (Polyanskiy–Poor–Verdú, 2010) sharpens Shannon's asymptotic limits for the short codes used in real low-latency systems—an ongoing refinement. The information bottleneck as a theory of deep learning generalization is debated. In the quantum realm, computing capacities of quantum channels exhibits superadditivity and remains only partially understood. Finally, algorithmic (Kolmogorov) complexity offers an alternative, individual-object notion of information that is provably uncomputable, sitting uneasily alongside Shannon's ensemble-based theory.
See Also
Shannon Entropy · Kullback–Leibler Divergence · Mutual Information · Channel Capacity · Maximum Entropy Principle · Kolmogorov Complexity · Statistical Mechanics · Error-Correcting Codes