Consider a binary state and a report with the following joint probability mass function:
Before the report, is strongly favored: its information entropy is bits, where is binary entropy. A report makes the two states equally likely, so bit, strictly larger than before. This report occurs with probability . The more common report determines , giving . Therefore the averaged conditional entropy is
The resulting mutual information is bits. The rare report increases uncertainty about the state; that increase does not make the report useless. Together the reports remove uncertainty on average. These are stipulated probabilities in an exact model, not measured frequencies.
Figure 1.
A rare report raises entropy although the weighted average falls
. Details.
For a stationary source of independent and identically distributed fair bits, with Hamming distortion and binary reconstruction alphabet,
The binary entropy convention is . Once , always reconstructing zero meets the distortion constraint without sending any bits. The formula must not be extended to : a looser constraint cannot increase the required rate.[ref]
The short argument identifies both sides of the optimum. For any feasible binary reconstruction, put , using exclusive or. Knowing makes and determine one another, so the conditional entropy obeys
when . The last step uses the increase of binary entropy on that interval. Hence . Conversely, choose with an independent Bernoulli random variable of parameter . This binary symmetric channel has expected distortion and mutual information , attaining the bound.
Chain rule for information entropy Created 2026-09-24 Updated 2026-10-18
For finite discrete random variables, the chain rule counts uncertainty in two stages:
The joint entropy equals the first variable's information entropy plus the average conditional entropy left in the second. All logarithms here have base two, so the unit is the bit; zero-probability terms contribute zero. The identity holds without assuming independence.[ref]
Iterating gives . The first summand means , with no earlier observations. Each later summand counts only the new uncertainty after the preceding random variables are known. For independent random variables, every term is its ordinary information entropy; for dependent ones, adding those ordinary information entropies can count shared uncertainty repeatedly. This is the reason the chain rule for information entropy is useful in lossless source coding and in calculating an entropy rate.
A short proof starts from the factorization of the joint probability mass function into a marginal distribution and a conditional probability:
Use this only where , then average with those joint probabilities. Summing over in the first term gives ; the second is precisely . Repeating the same step with a longer random vector proves the iterated identity. Reversing the order also gives : the two contributions can change with the order, but their total cannot.
Chain rule for mutual information Created 2026-09-24 Updated 2026-10-14
For finite discrete random variables, the mutual information supplied by two observations equals the information supplied by the first plus the additional conditional mutual information supplied by the second:
The order changes the individual contributions but leaves the total unchanged.[ref] To prove the first identity, add and subtract the intermediate conditional entropy:
With base-two logarithms, all contributions are in bits. Repeatedly inserting intermediate conditional entropies makes them cancel, as in a telescoping series, and gives the rule for any finite list of observations:
where the term is . The same calculation with already known gives .
For the fair-bit exclusive or example in conditional mutual information, observing alone tells nothing about , but observing after tells everything:
Here by independence and because . In the reverse order, , so and : the two observations are individually uninformative but jointly reveal one bit. Simply adding their separate mutual informations would miss all of it.
The chain rule is useful for measuring the value of each new observation without double counting information already supplied. It also guarantees by nonnegativity of conditional mutual information. Keeping and adding can help, even though discarding and retaining only a processed is constrained by the data processing inequality. Equating the two observation orders gives the precise identity
which explains why there is no general rule that conditioning decreases mutual information.
Conditional entropy Created 2026-09-24 Updated 2026-10-14
For finite discrete random variables, conditional entropy is the average remaining information entropy of after the value of is known:
Each observation changes the probability distribution used to describe ; the average weights that uncertainty by how often the observation occurs. An observation can increase uncertainty for one particular outcome, even though conditioning reduces entropy on average for finite variables.
For example, let choose with probabilities , and let report whether . If it reports yes, there is no remaining uncertainty. Otherwise the conditional probabilities are , whose information entropy is bits. The two reports each occur with probability , so of a bit. The original uncertainty was bits: this observation removes exactly one bit on average.
If is a function of , then : the observation determines the answer. If and are independent random variables, then : the observation gives no improvement. These endpoints make conditional entropy useful for separating relevant observations from irrelevant ones. They also lead to the chain rule for information entropy, , which counts the first uncertainty and the remaining uncertainty without double counting.
For finite random variables , let be the error probability of maximum a posteriori decoding of from . Then when conditional entropy is measured in bits. At each positive-probability output , the optimum success probability is the largest posterior atom , so its conditional error is . Apply the entropy lower bound from the largest atom to that posterior to get , then average over . An arbitrary decoder need not satisfy this bound; it uses the optimum conditional decision rule.
Conditional mutual information Created 2026-09-24 Updated 2026-10-14
For finite discrete random variables, conditional mutual information measures the average reduction in uncertainty about from observing , when is already known. With base-two logarithms, it is measured in bits:
The second expression follows from the chain rule for conditional entropy and makes the symmetry in visible. Equivalently, compute the mutual information separately in each conditional probability distribution and then average:
Here is the Kullback-Leibler divergence, also computed with base-two logarithms; zero-probability terms contribute zero. The Gibbs inequality gives , with equality exactly when and have conditional independence given : the conditional joint probability mass function factors for every of positive probability.[ref]
For a fully computed example, take independent random variables that are fair bits, and let , where is exclusive or. The complete joint probability distribution has only these four positive entries:
Table 1.
Joint probabilities for two independent fair bits and their exclusive or
.
Every pair has probability , so . But . Given , the pairs each have conditional probability , while both conditional marginals are fair. Thus
Given , the pairs give the same calculation. Therefore
The conditional entropy calculation tells the same story: because either value of leaves fair, whereas because . Learning the exclusive or does not reveal either bit alone; it reveals whether they agree, so learning one then determines the other.
Figure 1.
Conditioning on the exclusive or reveals one bit of dependence between independent fair bits
. Details.
This example distinguishes conditional independence from ordinary independence. It also disproves the claim that conditioning always reduces mutual information, despite conditioning reduces entropy. There is no general ordering between and : the example above increases it from zero to one, while taking and for a fair bit decreases it from one to zero. The chain rule for mutual information explains why both are possible.[ref]
Conditional mutual information is useful for asking whether an additional observation tells us anything after information already available has been accounted for. Its zero case expresses conditional independence exactly; in a Markov chain, this is the step that turns the chain rule for mutual information into the data processing inequality.
Conditioning reduces entropy Created 2026-09-24 Updated 2026-10-14
For finite discrete random variables , knowing reduces the information entropy of on average:
Equality holds exactly when and are independent random variables. The average over observations is essential: can exceed for a particular . All logarithms here have base two, giving bits, and zero-probability terms contribute zero.[ref]
For Bayesian inference, this compares a prior distribution with the posterior distributions produced by possible observations. An unexpected report can make previously unlikely alternatives plausible, while useful reports reduce uncertainty overall. For lossless source coding, an observation shared by encoder and decoder lets them choose descriptions for the appropriate conditional distribution; sending that observation also has a cost. The example below makes both the saving and that cost explicit.
In A Mathematical Theory of Communication by Claude Shannon (1948), the definition of conditional entropy is already an average over observations, followed by the inequality and its independence condition in section 6, property 6. The phrase “knowledge reduces uncertainty” must be read with that averaging convention.[ref]
Let be a fair bit, let be an independent Bernoulli random variable with , and set , where is exclusive or. Thus flips the first bit. This constructs a binary symmetric channel with a fair input, for . The joint probability mass function is
The column sums show that is also a fair bit, whatever is. Both marginal distributions therefore have information entropy one bit. Given , only the flip decision remains unknown, giving conditional entropy , where
is the binary entropy, with . The chain rule for information entropy and the definition of mutual information now give
Take . The four joint probabilities, in row order, are . Directly from the definition of joint entropy,
Conditioning on either value of gives probabilities and for the two values of , hence
Adding would overcount by exactly . These are average uncertainties under the stipulated probability distribution; the four possible pairs are still represented by four distinct outcomes.
Figure 1.
A correlated binary pair contains one bit plus the remaining flip uncertainty
. Original exact-model joint probability mass function for . The bars compare the sum of marginal information entropies with the joint entropy from the chain rule for information entropy. The hatched portion is the mutual information counted twice by the marginal sum. Values are calculated, not empirical frequencies. Details.
There is another way to see the decomposition: is a bijection. It merely relabels the four outcomes, so it preserves joint entropy. The independence of and then gives . Describing the initial bit and the flip decision separates shared uncertainty from new uncertainty.
At , the bits are identical: , so and . At , they are complementary: , with exactly the same conditional entropy and mutual information. In either case, observing one determines the other. At , all four joint probabilities are ; the bits are independent, , and . Perfect disagreement is therefore just as informative as perfect agreement.
Figure 2.
Identical and complementary bits both reveal one full bit of information
. Original calculated curves for the constructed pair : joint entropy , conditional entropy , and mutual information , all in bits. The horizontal line marks the one-bit information entropy of either marginal distribution. Reflection about exchanges likely agreement with likely disagreement while preserving these quantities. Details.
For , guessing succeeds with probability , better than guessing . Changing to replaces by and preserves mutual information, since the relabeling is invertible. What matters is how well the observation distinguishes the input, rather than how often its symbol matches the input. The same symmetry makes the binary entropy curve peak at independence, while the mutual information curve reaches its minimum there.
A discrete memoryless channel on the additive group maps to with probability and to with probability . Every input gives the same conditional entropy , whereas the output Shannon entropy is at most . A uniform input produces a uniform output since every column of the transition matrix sums to one. Hence the channel capacity is bits per use. This cyclic-error channel differs from a channel distributing its error probability equally over both other output symbols.
For a random finite binary string of length , conditioning on leaves at most possible strings. Thus its conditional entropy is at most . Since the length is a function of the string, the chain rule for information entropy gives
The term cannot generally be removed. For concatenations of words from a fixed finite decipherable code with maximum length , it is at most . Decipherability preserves the Shannon entropy of the source block. For an independent source block, dividing the resulting inequality by and taking proves the expected codeword length is at least the one-symbol Shannon entropy.
If are independent random variables taking values in a countable additive group, conditioning on makes a translate of . Consequently , and conditional entropy gives . If the two information entropies are finite, equality holds exactly when and are independent.
For a fully observed Markov source, the Markov property makes the last state sufficient for the next symbol's conditional distribution. With stationary distribution , the conditional entropy is therefore
using . The chain rule for information entropy gives the exact finite-block identity
Dividing by proves the displayed entropy rate. The weighting by matters: rows with high uncertainty contribute in proportion to how often their states occur.
For an original asymmetric example, take
The equality verifies the stationary distribution. The single-symbol information entropy is , whereas
This formula describes observed states. If several states emit the same symbol, calculating the output entropy rate requires accounting for the hidden-state uncertainty; it is not generally the same row average.
Fano's inequality Created 2026-09-29 Updated 2026-10-14
Fano's inequality turns remaining uncertainty into a constraint on decision errors. If an observation leaves many plausible answers, a decoder cannot usually recover the answer reliably. Its elegant idea is to separate two uncertainties: whether the guess was wrong, and which alternative was correct when it was wrong.
Let be discrete random variables, with taking values in a finite alphabet of cardinality . Choose any deterministic decoder whose output lies in , and define its average error probability . With base-two logarithms, Fano's inequality states
Here is conditional entropy and is binary entropy, with at the endpoints. Both sides are measured in bits; using natural logarithms throughout gives the same inequality in nats. No uniform source, independence of , or optimality of the decoder is assumed. Requiring its output to belong to the same alphabet is what leaves at most alternatives after an error.[ref]
For an exact toy example, give the discrete uniform distribution on . A channel reports with probability and reports each of the other three symbols with probability , where . Use the decoder . The output is uniform, and the conditional probabilities after any report are
Thus and direct calculation of the conditional entropy gives
This is equality in Fano's inequality for every . At , each report leaves probabilities , up to their order, and bits. The two contributions are bits for the error flag and bits for identifying the correct alternative after an error. These are theoretical probabilities, not measured data.
Figure 1.
A symmetric four-symbol toy channel makes every step of Fano's bound an equality
. Details.
The identity decoder in this example minimizes error only for : its guessed symbol has the largest posterior probability exactly when . At , are independent random variables and all four guesses tie. For , guessing any one of the three other symbols has error probability . Equality in Fano's inequality therefore does not certify an optimal decoder.
For usefulness, combine with to obtain the simpler consequence
For a uniform , , so this becomes . This connects mutual information to unavoidable decision error in channel coding or classification in statistical learning; it can rule out reliable recovery regardless of the chosen decoder.[ref]
The sharper right-hand side increases from zero to on , then decreases: in the interior, . When interpreting the inequality by inverting a curve, use its increasing branch to obtain a lower error threshold. A decoder that chooses a largest posterior probability, as in maximum a posteriori decoding, always has , since the largest of conditional probabilities is at least . Arbitrary decoders can have larger error. In particular, low conditional entropy does not force every decoder to work well: with a fair binary and , the rule has even though . Fano's inequality supplies a constraint, not an exact error prediction for each rule.
A binary erasure channel marks its failed transmissions with a special output symbol, whereas a binary symmetric channel changes a bit without announcing whether it changed. At the same nominal failure probability , the two communication channels therefore leave different uncertainty. With a fair input, an unerased output determines the input exactly, while the erasure flag leaves one bit of conditional entropy. Thus and for the binary erasure channel. This is the binary case of capacity of a finite-alphabet erasure channel.
For the binary symmetric channel at , neither possible received symbol rules out either input, and . Its channel capacity is only . A receiver benefits from knowing where information was lost, even when the fraction of affected transmissions is the same.
Figure 1.
Announced erasures preserve more information than hidden bit flips at the same low failure probability
. Solid arrows carry probability and dashed arrows carry probability in the two illustrated laws of transition probabilities. The erasure flag is distinct from both bits. The lower plot compares channel capacity for , using for the binary erasure channel and for the binary symmetric channel. Details.
This comparison concerns the specified transition probabilities, rather than a general ordering of every error mechanism. In particular, at , an erasure flag conveys no input information, while deterministic inversion still conveys a full bit. Reporting only an error percentage loses the distinction between hidden corruption, announced loss, and a predictable reversible transformation.
Let be a Bernoulli random variable with . Independently of , a Bernoulli random variable with decides whether to reveal it:
The symbol means “hidden” and is distinct from both binary states. This is a binary erasure channel with erasure probability . The hidden report leaves the posterior distribution equal to the prior distribution, because hiding is independent of the state. Either visible report determines . Weighting these three reports gives the exact conditional entropy and mutual information:
For and , bits, while bits. With the report tells us nothing; with it reveals the state completely. If , every positive reveal probability makes the conditioning inequality strict. At or , the state was already known and every value of gives equality.
Figure 1.
Independent revelation divides binary entropy into remaining uncertainty and revealed information
. Details.
For a Bayesian inference problem, this model distinguishes an uninformative missing report from a decisive observed state. If hiding depended on , even could carry mutual information, and the displayed calculation would change. In lossless source coding, suppose both encoder and decoder already know the reveal pattern for repeated independent and identically distributed pairs. Only the hidden states require descriptions. Applying Shannon's source coding theorem to those states gives an asymptotic average rate bits per original state. A single hidden state need not have a codeword of that fractional length.
The reveal pattern itself has information entropy . If that pattern must also be sent, the chain rule for information entropy gives , since and are independent random variables. Equivalently, and . Thus a saving in the description of given assumes that is already available; it is not a free saving in the description of the whole pair.
Information entropy Created 2026-09-24 Updated 2026-10-14
For a finite discrete random variable with probability mass function , its information entropy is the expected value of its information content:
Base-two logarithms give bits; choosing a different base rescales the units. The convention is justified by a limit, so outcomes of zero probability contribute nothing. The definition also applies to countable distributions, but the sum may be infinite.
A fair bit has . A certain outcome has . A Bernoulli random variable that is one with probability has bits, because most of its outcomes are predictable. A rare outcome still has large information content: the outcome of probability contributes bits of surprise when it occurs. Entropy is the average surprise, rather than the surprise of each outcome.
For possible outcomes, , with the upper bound attained exactly by the uniform distribution on a finite set. The Gibbs inequality proves this by comparing with the uniform distribution: . Thus increasing predictability reduces the required average description length. The four-symbol prefix code in information theory attains bits exactly; for general probabilities, integer codeword lengths prevent such a perfect match for every individual symbol. Shannon's source coding theorem explains how coding sufficiently long independent blocks approaches the entropy per symbol.
The logarithm is especially natural because independent outcomes have additive surprise: . Taking expected values gives additive information entropy for independent random variables; for dependent ones, the chain rule for information entropy replaces the second term by conditional entropy. This is why the same quantity can govern both a single observation and a long message.
Information theory Created 2026-09-24 Updated 2026-10-18
Information theory quantifies how much uncertainty messages contain, how efficiently they can be represented, and how reliably they can pass through a noisy channel. Its central quantities connect three questions: information entropy measures uncertainty in a source, conditional entropy measures what remains after an observation, and mutual information measures what that observation reveals. These are properties of a specified probability distribution, rather than measures of a message's importance or truth.
For a concrete source, suppose symbols have probabilities . A fixed-length binary representation needs two bits per symbol. Instead assign the prefix code , , , . Reading from left to right gives an unambiguous decoding because no codeword begins another. The expected value of the length is
This saves an average of of a bit per symbol, or of the fixed-length representation, with no loss of symbols. The lengths are exactly , so the average equals the source's Shannon entropy. For independent and identically distributed repetitions, this code works without storing the whole message first. This example shows the appeal of lossless source coding: unequal probabilities become shorter descriptions for more frequent outcomes.
Figure 1.
A four-symbol source reaches its entropy with a binary prefix code
. Details.
Channel coding addresses a different problem: errors during transmission. A shorter representation removes predictable structure; an error-correcting representation adds carefully chosen structure that helps recover corrupted symbols. Shannon's source coding theorem and the Shannon second coding theorem identify limits for these respective tasks under their hypotheses. The beauty is that source details and hardware details can meet through a small number of mathematical quantities, notably information entropy and channel capacity.
Claude E. Shannon's A Mathematical Theory of Communication appeared in the Bell System Technical Journal in July and October 1948. Its introduction separates the engineering problem of reproducing messages from their semantic meaning; subsequent sections develop probabilistic source models, noiseless coding, and transmission with noise. It also acknowledges earlier work by Harry Nyquist and Ralph Hartley.[ref]
Joint entropy Created 2026-10-14 Updated 2026-10-25
Joint entropy is the information entropy of an entire random vector, treating its coordinates together as one outcome. For random variables with finite alphabets and joint probability mass function ,
It is measured in bits. The distinction from separate information entropies is whether shared uncertainty is counted once or repeatedly. Two copies of the same fair bit have joint entropy one bit, since only and can occur. Two independent fair bits have joint entropy two bits, since all four pairs are possible and equiprobable.
For a less symmetric example, assign probabilities to respectively. Then
Here is fair, while . Thus and bits, where is binary entropy. Adding the separate information entropies would give approximately bits, overcounting by the mutual information bits.
The chain rule for information entropy makes the shared information explicit:
In this example is certain given and fair given , so its average conditional entropy is bit. Sending the first coordinate changes how much uncertainty remains in the second. A prefix code with codewords 0, 10, 11 for the three possible pairs has average length bits, exactly the joint entropy in this stipulated law.
For finite alphabets,
The lower bound follows because knowing the full random vector determines every coordinate; the upper bound follows from conditioning reduces entropy in the chain rule for information entropy. Equality in the upper bound means joint independence. The difference from that upper bound is total correlation, whose noisy parity total correlation example shows why separate pairwise comparisons need not find all the dependence.
If a uniform index has possibilities and every proposed success neighbourhood contains at most possibilities, then any estimator has failure probability at least the displayed expression. Condition on its success indicator: conditional entropy is at most . Subtract this from to bound the mutual information and rearrange. A metric Hamming ball gives approximate recovery rather than exact index decoding.