Entropy measures expected surprisal, while mutual information measures the uncertainty removed by observing another variable. Can two fair bits each have one bit of uncertainty while one reveals only part of the other?
Summary
Use finite discrete variables and base-two logarithms unless stated otherwise. Our teaching fixture sends a fair bit through independent noise that flips it with probability . We will compute the joint table before subtracting uncertainty. Population information is not a causal effect or a guarantee about an empirical estimate.
Discrete entropy and units
Outcome has surprisal for logarithm base . Entropy averages that quantity:
Base two gives bits, base gives nats, and base ten gives hartleys. The conversion is . A deterministic variable has zero entropy. On a fixed support of outcomes, uniform mass maximizes entropy at . Relabeling preserves entropy; merging outcomes can reduce it.
Three worked examples
Fair bit
For , each outcome has surprisal one bit. Therefore .
Perfect copy
If , observing determines . The remaining entropy is zero, so the removed uncertainty is one bit. The pair has only two possible states, not four equally likely states.
Binary noisy channel
Let be independent of the fair input, and set . Multiply input mass by the copy or flip probability:
| Joint mass | Row total | ||
|---|---|---|---|
| Column total |
Both marginals are fair, but agreement has probability . Independent fair bits would instead give in every cell.
Reference drawing
Worked uncertainty budget
Fair marginals can still share 0.531 bits of information
Derivation
One bit splits into 0.531 bits removed by Y and 0.469 bits still uncertain.
Conditional entropy
Given either output, the input matches it with probability . Write . Average the posterior entropies over the output probabilities:
Conditioning reduces entropy on average, not necessarily for every particular observed value. Using inside the logarithm proves the chain rule:
Mutual information in equivalent forms
Subtract remaining uncertainty:
The reference gives bits. The table independently gives , the same result. The middle expression proves symmetry; it does not supply a causal direction. Gibbs’ inequality applied to the last expression gives nonnegativity, with equality exactly at independence. Nonnegative conditional entropies also give .
Change the input prior
Set , retaining independent flips with probability . The four joint cells become in row order. Now , and
Recompute marginals when class priors change; the fair-input shortcut no longer applies.
Information gain in decision trees
Let be a label and identify its tree child. Split four balanced-label records into one pure record and three records with class counts one and two.
Use record weights, not an unweighted child average. Perfect separation gives one bit; unchanged child proportions give zero. This is mutual information under the node’s empirical distribution, not evidence of generalization.
Conditional mutual information
For independent fair , the target is independent of either input alone. Thus , while bit. Marginal ranking misses the interaction. Conditional information measures the added association after context is known:
For XOR, bit. Conditioning can create association, including through a common effect; this is not automatically a causal test.
Reconstruct: what changes at flip probability , or when the observation is replaced by a constant?
Answer
Inverting the channel recovers the channel, preserving bits. A constant observation leaves all input uncertainty, giving zero mutual information.
Coding interpretation
For known iid symbols, a binary prefix code’s expected length is at least . Huffman coding achieves expected length below . Arithmetic coding over sequences can approach the entropy rate more closely. These are average-length statements, not lengths promised for every message. Dependent symbols instead permit conditional coding:
Cross-entropy and KL divergence
For source law and model law , expected log loss decomposes as
Add and subtract to obtain the identity. For fixed , minimizing cross-entropy minimizes forward KL. Missing support where makes both quantities infinite. A mismatched ideal coder incurs this same expected excess length.
The joint-table expression above is . Equivalently, information averages posterior-to-prior divergence:
Independence, symmetry, and processing
Zero Pearson correlation does not imply independence. For a Markov chain , data processing gives
Processing without new access to cannot create information about it. Invertible transformations preserve information. A useful representation can discard nuisance details while retaining task information.
Continuous variables need different care
For a density, differential entropy is . It can be negative and depends on scale:
A uniform variable on has differential entropy bit. Converting meters to centimeters adds without adding information. Continuous mutual information remains nonnegative and invariant under suitable invertible reparameterizations. For a non-atomic continuous variable, an exact copy has infinite mutual information. The joint law is singular relative to the product law, so an ordinary joint-density formula is unavailable. Binning creates a discrete variable whose entropy depends on bin width. State whether the quantity uses densities, quantized values, or a continuous information estimator.
Estimation from finite data
The plug-in entropy substitutes empirical frequencies:
It is downward biased; unseen outcomes receive zero mass. For well-sampled fixed discrete support, Miller-Madow adds approximately
Here counts observed categories and counts iid observations. Under regular fixed-support independence, plug-in mutual information has approximate upward null bias
Sparse joint tables invalidate these expansions; more dimensions rapidly exhaust observed support. Continuous estimators use bins, kernels, neighbors, density ratios, or learned critics, each with tuning assumptions. Report the estimator, units, sample size, preprocessing, and tuning choices. Use an appropriate permutation null for spurious dependence and repeated sampling for uncertainty. Bootstrap variation cannot restore unseen support or eliminate structural estimator bias.
Feature selection does not establish causation
Compute feature selection inside each training fold; full-data ranking leaks target information into evaluation. Confounding, target-derived fields, and logging policies can all create association. None establishes the effect of intervening on the feature. Duplicate features can each score highly while adding nothing together; XOR shows the opposite interaction. Conditional information asks about incremental association but requires estimating a larger conditioning space. Validate selected features on held-out data and inspect provenance. Tree split searches can exploit accidental gain; constrain leaf size, prune, and evaluate independently. Regression trees usually optimize variance or squared-error reduction, not Shannon entropy.
InfoNCE and representation learning
Under the standard construction, comes from the joint law. The other candidates are independent marginal draws. With natural logarithms and critic , the expected loss satisfies
This lower bound is capped at and can be loose. Correlated negatives or sampling shortcuts can violate its construction or weaken its relevance. Semantically matching negatives can also occur under valid marginal sampling; semantics alone do not invalidate the bound. Lower loss demonstrates discrimination against sampled alternatives, not an exact information measurement or universal downstream preservation.
Predictive entropy, calibration, and confidence
Predictive entropy measures spread within the model’s stated distribution. A wrong prediction with probability can have very low entropy. High entropy can reflect ambiguity, missing inputs, or model failure. Calibration compares predicted probabilities with frequencies in a stated population. Proper population log loss does not make finite, misspecified, selected, or shifted predictions automatically calibrated. Entropy is not a confidence interval. Ensemble and parameter-label information also depend on model and posterior assumptions.
Interview procedure
Name the variables, probability law, and log base. Rebuild marginals, then conditionals, before calculating removed uncertainty. Check the entropy and joint-ratio forms agree. State sampling, causation, and confidence limitations separately from population identities.
Common mistakes
- Missing units or child weights changes the reported quantity.
- Symmetry is not causation, and zero correlation is not independence.
- Discrete and differential entropies have different scale behavior.
- InfoNCE and plug-in estimates are not exact population measurements.
- Low predictive entropy is not calibrated confidence.
- Dependent observations cannot contribute independent information merely because they occupy different rows.
Changed-assumption practice
At flip probability , every joint cell is and information is zero. At , invert the output to recover the reference information. With prior , recompute the output mass instead of assuming fairness. A constant transformation discards all information; inversion preserves it. Two conditionally independent -flip copies yield about bits jointly, not twice . Their outputs are dependent through the shared input. A unique-per-row tree feature can memorize labels; fresh-data evaluation or leaf constraints are still required.