TITLE: entropy and flatness of densities
QUESTION [15 upvotes]: I was reading C.R Rao's Linear Statistical inference. Rao presents the entropy of a continuous distribution (expectation of -log density) as a measure of closeness to the uniform distribution, and shows that of all distributions whose densities which have a bounded interval [a,b] as its support the uniform distribution on [a,b] has the highest entropy. Can this connection be formalized? For example if I restrict myself to probability distributions which put all mass on a bounded interval and have sufficiently smooth densities, is there a measure of the flatness of the density based on geometry which is connected to the entropy of the distribution.

REPLY [4 votes]: Two great answers above - I just wanted to comment on the "measure of closeness to the uniform distribution"-part. Now I do not have Rao's book in my office so I can't check if this is already in it, my apologies if that's the case.
There is a concept in information theory called the relative entropy, or Kullback-Leibler divergence, which measures the distance between two probability distributions Wiki: Kullback-Leibler.  
Since we are now only interested in continuous distributions, let $P$ and $Q$ be two such distributions with densities $p$ and $q$ respectively. The Kullback-Leibler divergence from $P$ to $Q$ is
$\mathcal{H}(P|Q) = \int \log \frac{dP}{dQ}dP = \int \log \frac{p(x)}{q(x)}p(x)dx $ 
Now take p to have support $[a,b]$ and let $Q$ be the uniform distribution on this interval (i.e., $q = \frac{1}{b-a}$ on $[a,b]$). Inserting this into the expression for $\mathcal{H}(P|Q)$ yields
$\mathcal{H}(P|Q) = \int \log p(x) dP(x) + \log(b-a), $
where the first term is the entropy of $P$ sans the minus sign. Thus, since the Kullback-Leibler divergence in this case is precisely a measure of the closeness of $P$ to the uniform distribution $Q$, the entropy of $P$ will have this interpretation - the term $\log (b-a)$ is only a constant and will be present for every distribution $P$. 
It holds that $\mathcal{H}(P|Q) = 0$ iff $P=Q$ and this explains why the uniform distribution will also be the one with the highest entropy, namely $\log (b-a)$