20. Entropy of a Continuous Distribution
Differential Entropy
For a continuous random variable \(X\) with probability density \(p(x)\), the differential entropy is:
This looks like the discrete formula with sums replaced by integrals, but there's a critical subtlety: differential entropy can be negative, and it changes under coordinate transformations.
Why Differential Entropy Is Different
1. It Can Be Negative
For a uniform distribution on \([0, a]\):
If \(a < 1\), then \(H < 0\). This is impossible for discrete entropy.
Resolution: Differential entropy measures entropy relative to a uniform reference (the "coordinate system"). The absolute entropy of a continuous variable is actually infinite (infinitely many points), but differences in differential entropy are meaningful.
2. It Changes Under Coordinate Transformations
If \(Y = g(X)\) with invertible \(g\):
Or more compactly:
For linear \(Y = aX\):
Entropy is not invariant under scaling — unlike discrete entropy.
Maximum Entropy Distributions
Given constraints, what distribution maximizes entropy? These are the "most uncertain" or "least informative" distributions consistent with known information.
Constraint: Support on \([0, a]\)
Maximum entropy: Uniform distribution
Constraint: Fixed Variance \(\sigma^2\)
Maximum entropy: Gaussian distribution
Constraint: Fixed Mean \(\mu\), Support \([0, \infty)\)
Maximum entropy: Exponential distribution
Constraint: Support \((-\infty, \infty)\), Fixed Mean and Variance
Again Gaussian — this is why the Gaussian appears ubiquitously in nature (maximum entropy principle).
The Maximum Entropy Principle
Jaynes (1957) later formalized this: when you have incomplete information, the distribution that makes the fewest additional assumptions is the one with maximum entropy subject to your known constraints.
This principle connects information theory to statistical mechanics, Bayesian inference, and machine learning.
Joint and Conditional Differential Entropy
For joint density \(p(x,y)\):
The chain rule and mutual information properties carry over from the discrete case, but with care for the coordinate-dependent terms.
Relative Entropy (Kullback-Leibler Divergence)
A coordinate-invariant quantity for comparing distributions:
Always non-negative, zero iff \(p = q\) almost everywhere. This is the "information gain" from learning that the true distribution is \(p\) rather than \(q\).