Skip to content
ISEGORIABenjamin Haire

ISEGORIA / MATH ENCYCLOPEDIA

Information theory: uncertainty and codes

Entropy, noisy channels, and information distance.

Before you begin: Probability and logarithms

Predict, manipulate, then check your reasoning against the example and question. Graphs illustrate the mathematics; they do not replace a proof.

1. Entropy

Tune a binary source. On the left each outcome is a block whose width is its probability and whose height is its surprise −log₂ p(x), so the total shaded area is the entropy, the average surprise. On the right, the entropy peaks at one bit for a fair coin.

Worked example. For p = 0.9, H = 0.9·log₂(1/0.9) + 0.1·log₂(10) ≈ 0.469 bits.

Watch out. Entropy measures uncertainty in a distribution, not the meaning of a message.

When is binary entropy maximal?

At p=1/2.

Reference: Cover and Thomas · Elements of Information Theory

2. A noisy channel

Each bit is flipped with probability f. The mutual information is the output uncertainty H(Y) minus the part caused by noise, H(Y | X) = H(f). Drag the input probability: the gap is widest for a uniform input, and that maximum is the capacity 1 − H(f).

Worked example. The noiseless binary channel (f = 0) has one bit of capacity; at f = 0.1 the capacity is about 0.531 bits.

Watch out. Capacity is an asymptotic coding limit, not the success rate of one short message.

What happens at a flip probability of one half?

The output is independent of the input and mutual information is zero.

Reference: Cover and Thomas · Elements of Information Theory

3. Divergence

Compare an observed two-outcome distribution P with a model Q. The left panel shows the two terms of the sum; one can be negative, yet the total is never negative. The right panel shows D(P ‖ Q) and the reverse D(Q ‖ P) as the model moves, both zero only at q = p.

Worked example. \(D_{\mathrm{KL}}(P\|Q)\) is zero only when the two distributions agree: for p = 0.7 and q = 0.5 it equals 0.7·log₂(1.4) + 0.3·log₂(0.6) ≈ 0.119 bits.

Watch out. It is not symmetric and is not a metric.

Why can a tiny Q(x) be costly?

Underestimating an event that occurs makes log(P/Q) large.

Reference: Cover and Thomas · Elements of Information Theory

Continue exploring

Linear algebra: the geometry of transformationsFourier analysis: functions made of wavesDynamical systems: stability and chaosOptimization: the geometry of the best choiceProbability: learning from uncertaintyGroup theory: symmetry as algebraAlgebraic topology: detecting holesNumerical analysis: when computation misleadsNumber theory: patterns in the integersGraph theory: routes, trees, and networksPartial differential equations: fields in motionCalculus of variations: paths and principlesClassical mechanics: motion and forcesElectromagnetism: fields and inductionOptics: rays, waves, and colourThermodynamics: energy, work, and entropyQuantum mechanics: amplitudes and spinComplex analysis: maps, residues, and harmonic fieldsFluid dynamics: flow, pressure, and vorticityStatistics and inference: signals in dataSpecial relativity: space, time, and lightDifferential geometry: curvature and shapeStatistical mechanics: microstates and temperatureMeasure theory: size, approximation, and convergenceMarkov chains: transition, stationarity, and absorptionDifferential forms: circulation, curl, and pullbacksGeneral relativity: curvature, clocks, and lightFunctional analysis: norms, projections, and operatorsPlasma physics: screening, orbits, and wavesLie groups and Lie algebras: continuous symmetryHamiltonian mechanics: phase space and its geometryStochastic processes: Brownian motion and noiseSolid-state physics: waves in a crystalControl theory: feedback, poles, and stabilityLogic and computability: what can be computedHyperbolic geometry: where parallels multiplyRigid-body dynamics: spinning, tumbling, precessingElliptic curves: geometry that addsAtomic physics: orbitals and spectraQuaternions: rotation as multiplicationPush-forward and pullback: integrating through a mapKnot theory: telling tangles apartFractal geometry: dimension between the integersQuantum information: entanglement and its limitsCosmology: the expanding universeCellular automata: computation from local rulesComplex systems: order from many simple partsGalois theory: the symmetry of equationsMagnetism and the Ising model: order from alignmentOscillators and escapements: how a watch keeps timeGears and mechanisms: transmitting motion exactlyQuartz resonators: a crystal that keeps timeLoudspeakers: the moving-coil driverFilters and crossovers: splitting sound between driversRoom acoustics: the room is part of the speakerWavelets: zooming in on a signalLaser physics: light that copies itselfRepresentation theory: groups acting as matricesSemiconductor physics: bands, doping, junctions

Back to the math encyclopedia