Conditional entropy is a quantity in information theory that measures the average uncertainty remaining about a random variable after another variable is observed. Written , it averages the Shannon entropy of the conditional distributions of over possible observations of . It describes uncertainty under a specified probabilistic model, rather than uncertainty about any particular observed outcome. (math.mit.edu)
Definition and interpretation
For discrete variables and , let denote their joint probability distribution and their conditional probability. Conditional entropy is defined by
Equivalently,
Terms with zero joint probability contribute zero. Observations having are omitted because their conditional distributions do not affect the average. (math.mit.edu)
The logarithm’s base determines the unit: base two gives bits, while the natural logarithm gives nats. In expected-value notation,
Thus it is the average conditional self-information of . Unlike , which concerns one observation, averages over the entire probability distribution of observations. A discrete can also be conditioned on a continuous , using an expectation rather than a discrete sum over . (people.lids.mit.edu)
Fundamental identities and inequalities
The entropy chain rule expresses joint uncertainty as uncertainty about one variable plus the uncertainty remaining about the other:
For a finite sequence, its extension is
where the first term is . These identities follow by factoring joint probabilities into conditional probabilities. When entropies are finite, the first identity also gives . Direct definitions remain important when subtraction would produce the undefined expression . (people.csail.mit.edu)
For finite-valued variables,
The upper equality holds precisely when and exhibit statistical independence. The lower equality holds precisely when is a deterministic function of , except on events of probability zero. Conditional entropy is generally asymmetric: knowing may determine , without knowing determining . (ocw.mit.edu)
Additional conditioning cannot increase average discrete entropy:
The difference is conditional mutual information, , which is nonnegative. For finite-valued variables, equality holds exactly when and have conditional independence given . Likewise, mutual information satisfies
quantifying how much observing reduces uncertainty about on average. (ocw.mit.edu)
Examples and the role of averaging
Consider a fair binary variable , and let equal with probability , otherwise taking the opposite value, independently of . Applying the definition gives
At , the observation identifies . At , it provides no information, leaving one bit of uncertainty. At , it again identifies , because the observed value is always inverted. These are direct consequences of the conditional distributions. (math.mit.edu)
“Conditioning reduces entropy” is an average statement, not a guarantee for every observation. For example, let and be independent fair binary variables, and set . Then , approximately bits. Observing leaves , raising uncertainty to one bit; observing determines . Their average is nevertheless bits, below the unconditional entropy. (ocw.mit.edu)
Coding and statistical learning
In lossless data compression with side information, conditional entropy determines an asymptotic coding threshold. For independent, identically distributed finite-alphabet pairs , rates above permit reconstruction of -blocks with error probability tending to zero when the decoder knows the corresponding -blocks. The Slepian–Wolf theorem establishes that this threshold remains achievable even when the encoder does not know those observations. (people.lids.mit.edu)
Conditional entropy also describes uncertainty in dependent sequences. For a stationary finite-alphabet stochastic process, the uncertainty about the next symbol conditioned on increasingly long histories converges to the entropy rate. In a stationary first-order Markov chain, this rate is . (stanforddatacompressionclass.github.io)
In machine learning, measures uncertainty about a label given features . It is distinct from the conditional cross-entropy of a model . Their difference is the expected Kullback–Leibler divergence between the true conditional distribution and the model. Consequently, under unrestricted prediction, conditional entropy is the minimum achievable population logarithmic loss, rather than necessarily the loss attained by a trained model. (s3-us-west-2.amazonaws.com)
Continuous variables
For continuous variables admitting a joint probability density function, conditional differential entropy is
When the relevant quantities are finite, . Unlike discrete conditional entropy, it can be negative and changes when the scale of changes. It is therefore not directly interpretable as a nonnegative number of bits required for exact representation of a continuous observation. Mutual information remains nonnegative and equals when that difference is well defined. (s3-us-west-2.amazonaws.com)
References
- 600: Lecture 33 — Entropymath.mit.edu
- Information Theory — Polyanskiy and Wupeople.lids.mit.edu
- 441S16: Course Notesocw.mit.edu
- ST06 — Lecture 3people.csail.mit.edu
- Non IID Sources and Entropy Ratestanforddatacompressionclass.github.io
- 11. Information Theory — Dive into Deep Learnings3-us-west-2.amazonaws.com