differential entropy#Maximization in the normal distribution

{{Short description|Concept in information theory}}

{{Information theory}}

Differential entropy (also referred to as continuous entropy) is a concept in information theory that began as an attempt by Claude Shannon to extend the idea of (Shannon) entropy (a measure of average surprisal) of a random variable, to continuous probability distributions. Unfortunately, Shannon did not derive this formula, and rather just assumed it was the correct continuous analogue of discrete entropy, but it is not.{{cite journal |author=Jaynes, E.T. |author-link=Edwin Thompson Jaynes |title=Information Theory And Statistical Mechanics |journal=Brandeis University Summer Institute Lectures in Theoretical Physics |volume=3 |issue=sect. 4b |year=1963 |url=http://bayes.wustl.edu/etj/articles/brandeis.pdf }}{{rp|pp=181–218}} The actual continuous version of discrete entropy is the limiting density of discrete points (LDDP). Differential entropy (described here) is commonly encountered in the literature, but it is a limiting case of the LDDP, and one that loses its fundamental association with discrete entropy.

In terms of measure theory, the differential entropy of a probability measure is the negative relative entropy from that measure to the Lebesgue measure, where the latter is treated as if it were a probability measure, despite being unnormalized.

Definition

Let X be a random variable with a probability density function f whose support is a set \mathcal X. The differential entropy h(X) or h(f) is defined as{{cite book|first1=Thomas M.|first2=Joy A.|last1=Cover|last2=Thomas|isbn=0-471-06259-6|title=Elements of Information Theory|year=1991|publisher=Wiley|location=New York|url=https://archive.org/details/elementsofinform0000cove|url-access=registration}}{{rp|p=243}}

{{Equation box 1

|indent = :

|title=

|equation = h(X) = \operatorname{E}[-\log (f(X))] = -\int_\mathcal{X} f(x)\log f(x)\,dx

|cellpadding= 6

|border

|border colour = #0073CF

}}

For probability distributions which do not have an explicit density function expression, but have an explicit quantile function expression, Q(p), then h(Q) can be defined in terms of the derivative of Q(p) i.e. the quantile density function Q'(p) as{{Citation |last1=Vasicek |first1=Oldrich |year=1976 |title=A Test for Normality Based on Sample Entropy |journal=Journal of the Royal Statistical Society, Series B |volume=38 |issue=1 |pages=54–59 |doi=10.1111/j.2517-6161.1976.tb01566.x |jstor=2984828 |postscript=. }}{{rp|pp=54–59}}

h(Q) = \int_0^1 \log Q'(p)\,dp.

As with its discrete analog, the units of differential entropy depend on the base of the logarithm, which is usually 2 (i.e., the units are bits). See logarithmic units for logarithms taken in different bases. Related concepts such as joint, conditional differential entropy, and relative entropy are defined in a similar fashion. Unlike the discrete analog, the differential entropy has an offset that depends on the units used to measure X.{{cite book |last=Gibbs |first=Josiah Willard |author-link=Josiah Willard Gibbs |title=Elementary Principles in Statistical Mechanics, developed with especial reference to the rational foundation of thermodynamics |year=1902 |publisher=Charles Scribner's Sons |location=New York}}{{rp|pp=183–184}} For example, the differential entropy of a quantity measured in millimeters will be {{not a typo|log(1000)}} more than the same quantity measured in meters; a dimensionless quantity will have differential entropy of {{not a typo|log(1000)}} more than the same quantity divided by 1000.

One must take care in trying to apply properties of discrete entropy to differential entropy, since probability density functions can be greater than 1. For example, the uniform distribution \mathcal{U}(0,1/2) has negative differential entropy; i.e., it is better ordered than \mathcal{U}(0,1) as shown now

\int_0^\frac{1}{2} -2\log(2)\,dx = -\log(2)\,

being less than that of \mathcal{U}(0,1) which has zero differential entropy. Thus, differential entropy does not share all properties of discrete entropy.

The continuous mutual information I(X;Y) has the distinction of retaining its fundamental significance as a measure of discrete information since it is actually the limit of the discrete mutual information of partitions of X and Y as these partitions become finer and finer. Thus it is invariant under non-linear homeomorphisms (continuous and uniquely invertible maps),{{cite journal

| first = Alexander

| last = Kraskov

|author2=Stögbauer, Grassberger

| year = 2004

| title = Estimating mutual information

| journal = Physical Review E

| volume = 60

| issue = 6

| pages = 066138

| doi =10.1103/PhysRevE.69.066138

| pmid = 15244698

|arxiv = cond-mat/0305641 |bibcode = 2004PhRvE..69f6138K | s2cid = 1269438

}} including linear{{ cite book | title = An Introduction to Information Theory | author = Fazlollah M. Reza | publisher = Dover Publications, Inc., New York | orig-year = 1961| year = 1994 | isbn = 0-486-68210-2 | url = https://books.google.com/books?id=RtzpRAiX6OgC&q=intitle:%22An+Introduction+to+Information+Theory%22++%22entropy+of+a+simple+source%22&pg=PA8 }} transformations of X and Y, and still represents the amount of discrete information that can be transmitted over a channel that admits a continuous space of values.

For the direct analogue of discrete entropy extended to the continuous space, see limiting density of discrete points.

Properties of differential entropy

  • For probability densities f and g, the Kullback–Leibler divergence D_{KL}(f \parallel g) is greater than or equal to 0 with equality only if f=g almost everywhere. Similarly, for two random variables X and Y, I(X;Y) \ge 0 and h(X\mid Y) \le h(X) with equality if and only if X and Y are independent.
  • The chain rule for differential entropy holds as in the discrete case{{rp|p=253}} h(X_1, \ldots, X_n) = \sum_{i=1}^n h(X_i\mid X_1, \ldots, X_{i-1}) \leq \sum_{i=1}^{n} h(X_i).
  • Differential entropy is translation invariant, i.e. for a constant c.{{rp|p=253}} h(X+c) = h(X)
  • Differential entropy is in general not invariant under arbitrary invertible maps.{{pb}}In particular, for a constant a, h(aX) = h(X)+ \log |a|{{pb}}For a vector valued random variable \mathbf{X} and an invertible (square) matrix \mathbf{A}{{rp|p=253}} h(\mathbf{A}\mathbf{X}) = h(\mathbf{X})+\log \left( \left|\det \mathbf{A}\right| \right)

    • In general, for a transformation from a random vector to another random vector with same dimension \mathbf{Y}=m \left(\mathbf{X}\right), the corresponding entropies are related via h(\mathbf{Y}) \leq h(\mathbf{X}) + \int f(x) \log \left\vert \frac{\partial m}{\partial x} \right\vert \, dx where \left\vert \frac{\partial m}{\partial x} \right\vert is the Jacobian of the transformation m.{{cite web |title=proof of upper bound on differential entropy of f(X) |work=Stack Exchange |date=April 16, 2016 |url=https://math.stackexchange.com/q/1745670 }} The above inequality becomes an equality if the transform is a bijection. Furthermore, when m is a rigid rotation, translation, or combination thereof, the Jacobian determinant is always 1, and h(Y)=h(X).
    • If a random vector X \in \mathbb{R}^n has mean zero and covariance matrix K, h(\mathbf{X}) \leq \frac{1}{2} \log(\det{2 \pi e K}) = \frac{1}{2} \log[(2\pi e)^n \det{K}] with equality if and only if X is jointly gaussian (see below).{{rp|p=254}}

    However, differential entropy does not have other desirable properties:

    • It is not invariant under change of variables, and is therefore most useful with dimensionless variables.
    • It can be negative.

    A modification of differential entropy that addresses these drawbacks is the relative information entropy, also known as the Kullback–Leibler divergence, which includes an invariant measure factor (see limiting density of discrete points).

Maximization in the normal distribution

=Theorem=

With a normal distribution, differential entropy is maximized for a given variance. A Gaussian random variable has the largest entropy amongst all random variables of equal variance, or, alternatively, the maximum entropy distribution under constraints of mean and variance is the Gaussian.{{rp|p=255}}

=Proof=

Let g(x) be a Gaussian PDF with mean {{mvar|μ}} and variance \sigma^2 and f(x) an arbitrary PDF with the same variance. Since differential entropy is translation invariant we can assume that f(x) has the same mean of \mu as {{nowrap|g(x).}}

Consider the Kullback–Leibler divergence between the two distributions

0 \leq D_{KL}(f \parallel g) = \int_{-\infty}^\infty f(x) \log \left( \frac{f(x)}{g(x)} \right) \, dx = -h(f) - \int_{-\infty}^\infty f(x)\log(g(x)) \, dx.

Now note that

\begin{align}

\int_{-\infty}^\infty f(x)\log(g(x)) \, dx &= \int_{-\infty}^\infty f(x)\log\left( \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}\right) \, dx \\

&= \int_{-\infty}^\infty f(x) \log\frac{1}{\sqrt{2\pi\sigma^2}} dx \,+\, \log(e)\int_{-\infty}^\infty f(x)\left( -\frac{(x-\mu)^2}{2\sigma^2}\right) \, dx \\

&= -\tfrac{1}{2}\log(2\pi\sigma^2) - \log(e)\frac{\sigma^2}{2\sigma^2} \\[1ex]

&= -\tfrac{1}{2}\left(\log(2\pi\sigma^2) + \log(e)\right) \\[1ex]

&= -\tfrac{1}{2}\log(2\pi e \sigma^2) \\[1ex]

&= -h(g)

\end{align}

because the result does not depend on f(x) other than through the variance. Combining the two results yields

h(g) - h(f) \geq 0 \!

with equality when f(x) = g(x) following from the properties of Kullback–Leibler divergence.

=Alternative proof=

This result may also be demonstrated using the calculus of variations. A Lagrangian function with two Lagrangian multipliers may be defined as:

L = \int_{-\infty}^\infty g(x) \log(g(x)) \, dx - \lambda_0 \left(1-\int_{-\infty}^\infty g(x) \, dx\right) - \lambda \left(\sigma^2 - \int_{-\infty}^\infty g(x)(x-\mu)^2\,dx\right)

where {{math|g(x)}} is some function with mean {{mvar|μ}}. When the entropy of {{math|g(x)}} is at a maximum and the constraint equations, which consist of the normalization condition \left(1=\int_{-\infty}^\infty g(x)\,dx\right) and the requirement of fixed variance \left(\sigma^2 = \int_{-\infty}^\infty g(x)(x-\mu)^2\,dx\right), are both satisfied, then a small variation {{math|δg(x)}} about {{math|g(x)}} will produce a variation {{math|δL}} about {{math|L}} which is equal to zero:

0=\delta L=\int_{-\infty}^\infty \delta g(x) \left[\log(g(x)) + 1 + \lambda_0 + \lambda(x-\mu)^2\right]\,dx

Since this must hold for any small {{math|δg(x)}}, the term in brackets must be zero, and solving for {{math|g(x)}} yields:

g(x) = e^{-\lambda_0 - 1 - \lambda (x-\mu)^2}

Using the constraint equations to solve for {{math|λ0}} and {{mvar|λ}} yields the normal distribution:

g(x) = \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}

Example: Exponential distribution

Let X be an exponentially distributed random variable with parameter \lambda, that is, with probability density function

f(x) = \lambda e^{-\lambda x} \text{ for } x \geq 0.

Its differential entropy is then

\begin{align}

h_e(X)

&= -\int_0^\infty \lambda e^{-\lambda x} \log \left(\lambda e^{-\lambda x}\right) dx \\[2pt]

&= -\left(\int_0^\infty (\log \lambda)\lambda e^{-\lambda x}\,dx + \int_0^\infty (-\lambda x) \lambda e^{-\lambda x}\,dx\right) \\[2pt]

&= -\log \lambda \int_0^\infty f(x)\,dx + \lambda \operatorname{E}[X] \\[4pt]

&= -\log\lambda + 1\,.

\end{align}

Here, h_e(X) was used rather than h(X) to make it explicit that the logarithm was taken to base {{math|e}}, to simplify the calculation.

Relation to estimator error

The differential entropy yields a lower bound on the expected squared error of an estimator. For any random variable X and estimator \widehat{X} the following holds:

\operatorname{E}[(X - \widehat{X})^2] \ge \frac{1}{2\pi e}e^{2h(X)}

with equality if and only if X is a Gaussian random variable and \widehat{X} is the mean of X.

Differential entropies for various distributions

In the table below \Gamma(x) = \int_0^{\infty} e^{-t} t^{x-1} dt is the gamma function, \psi(x) = \frac{d}{dx} \log\Gamma(x)=\frac{\Gamma'(x)}{\Gamma(x)} is the digamma function, B(p,q) = \frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)} is the beta function, and {{math|γE}} is Euler's constant.{{cite journal |last1=Park |first1=Sung Y. |last2=Bera |first2=Anil K. |year=2009 |title=Maximum entropy autoregressive conditional heteroskedasticity model |journal=Journal of Econometrics |volume=150 |issue=2 |pages=219–230 |publisher=Elsevier |doi=10.1016/j.jeconom.2008.12.014 |url=http://www.wise.xmu.edu.cn/Master/Download/..%5C..%5CUploadFiles%5Cpaper-masterdownload%5C2009519932327055475115776.pdf |access-date=2011-06-02 |archive-url=https://web.archive.org/web/20160307144515/http://wise.xmu.edu.cn/uploadfiles/paper-masterdownload/2009519932327055475115776.pdf |archive-date=2016-03-07 |url-status=dead }}{{rp|pp=219–230}}

class="wikitable"

|+ Table of differential entropies

Distribution NameProbability density function (pdf)Differential entropy in nats || Support
Uniformf(x) = \frac{1}{b-a}\log(b - a) \,[a,b]\,
Normalf(x) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{(x-\mu)^2}{2\sigma^2}\right)\log\left(\sigma\sqrt{2\pi e}\right) (-\infty,\infty)\,
Exponentialf(x) = \lambda \exp\left(-\lambda x\right)1 - \log \lambda \, [0,\infty)\,
Rayleighf(x) = \frac{x}{\sigma^2} \exp\left(-\frac{x^2}{2\sigma^2}\right)1 + \log \frac{\sigma}{\sqrt{2}} + \frac{\gamma_E}{2}[0,\infty)\,
Betaf(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha,\beta)} for 0 \leq x \leq 1 \begin{align}

\log B(\alpha,\beta)

&- (\alpha-1)[\psi(\alpha) - \psi(\alpha +\beta)] \\

&- (\beta-1)[\psi(\beta) - \psi(\alpha + \beta)]

\end{align}

[0,1]\,
Cauchyf(x) = \frac{\gamma}{\pi} \frac{1}{\gamma^2 + x^2}\log(4\pi\gamma) \, (-\infty,\infty)\,
Chif(x) = \frac{2}{2^{k/2} \Gamma(k/2)} x^{k-1} \exp\left(-\frac{x^2}{2}\right)\log{\frac{\Gamma(k/2)}{\sqrt{2}}} - \frac{k-1}{2} \psi{\left(\frac{k}{2}\right)} + \frac{k}{2}[0,\infty)\,
Chi-squaredf(x) = \frac{1}{2^{k/2} \Gamma(k/2)} x^{\frac{k}{2}\!-\!1} \exp\left(-\frac{x}{2}\right)\log 2\Gamma{\left(\frac{k}{2}\right)} - \left(1 - \frac{k}{2}\right) \psi{\left(\frac{k}{2}\right)} + \frac{k}{2}[0,\infty)\,
Erlangf(x) = \frac{\lambda^k}{(k-1)!} x^{k-1} \exp(-\lambda x)\left(1-k\right) \psi(k) + \log \frac{\Gamma(k)}{\lambda} + k[0,\infty)\,
Ff(x) = \frac{n_1^{{n_1}/{2}} \, n_2^{{n_2}/{2}}}{B{\left(\frac{n_1}{2},\frac{n_2}{2}\right)}} \frac{x^{\frac{n_1}{2} - 1}}{{\left(n_2 + n_1 x\right)}^{\frac{n_1 + n2}{2}}}\begin{align}

&\log \frac{n_1}{n_2} B{\left(\frac{n_1}{2},\frac{n_2}{2}\right)} \\[4pt]

&+ \left(1 - \frac{n_1}{2}\right) \psi{\left(\frac{n_1}{2}\right)} \\[4pt]

&- \left(1 + \frac{n_2}{2}\right)\psi{\left(\frac{n_2}{2}\right)} \\[4pt]

&+ \frac{n_1 + n_2}{2} \psi{\left(\frac{n_1\!+\!n_2}{2}\right)}

\end{align}

[0,\infty)\,
Gammaf(x) = \frac{x^{k - 1} \exp(-\frac{x}{\theta})}{\theta^k \Gamma(k)}\log(\theta \Gamma(k)) + \left(1 - k\right) \psi(k) + k [0,\infty)\,
Laplacef(x) = \frac{1}{2b} \exp\left(-\frac{|x - \mu
{b}\right) || 1 + \log(2b) \, ||(-\infty,\infty)\,

|-

| Logistic || f(x) = \frac{e^{-x/s}}{s{\left(1 + e^{-x/s}\right)}^2}|| \log s + 2 \, ||(-\infty,\infty)\,

|-

| Lognormal || f(x) = \frac{1}{\sigma x \sqrt{2\pi}} \exp\left(-\frac{(\log x - \mu)^2}{2\sigma^2}\right) || \mu + \tfrac{1}{2} \log(2\pi e \sigma^2)||[0,\infty)\,

|-

| Maxwell–Boltzmann || f(x) = \frac{1}{a^3}\sqrt{\frac{2}{\pi}}\,x^{2}\exp\left(-\frac{x^2}{2a^2}\right) || \log(a\sqrt{2\pi}) + \gamma_E - \tfrac{1}{2}||[0,\infty)\,

|-

| Generalized normal || f(x) = \frac{2 \beta^{\frac{\alpha}{2}}}{\Gamma(\frac{\alpha}{2})} x^{\alpha - 1} \exp\left(-\beta x^2\right)|| \log{\frac{\Gamma(\alpha/2)}{2\beta^{\frac{1}{2}}}} - \frac{\alpha - 1}{2} \psi\left(\frac{\alpha}{2}\right) + \frac{\alpha}{2}||(-\infty,\infty)\,

|-

| Pareto || f(x) = \frac{\alpha x_m^\alpha}{x^{\alpha+1}} || \log \frac{x_m}{\alpha} + 1 + \frac{1}{\alpha}||[x_m,\infty)\,

|-

| Student's t || f(x) = \frac{(1 + x^2/\nu)^{-\frac{\nu+1}{2}}}{\sqrt{\nu}B(\frac{1}{2},\frac{\nu}{2})} || \begin{align}

&\frac{\nu\!+\!1}{2} \left[\psi{\left(\frac{\nu\!+\!1}{2}\right)} - \psi{\left(\frac{\nu}{2}\right)}\right]\\

&+\!\log \sqrt{\nu} B{\left(\frac{1}{2},\frac{\nu}{2}\right)}

\end{align}||(-\infty,\infty)\,

|-

| Triangular || f(x) = \begin{cases}

\frac{2(x-a)}{(b-a)(c-a)} & \mathrm{for\ } a \le x \leq c, \\[4pt]

\frac{2(b-x)}{(b-a)(b-c)} & \mathrm{for\ } c < x \le b, \\[4pt]

\end{cases} || \frac{1}{2} + \log \frac{b-a}{2}||[a,b]\,

|-

| Weibull || f(x) = \frac{k}{\lambda^k} x^{k-1} \exp\left(-\frac{x^k}{\lambda^k}\right) || \frac{k-1}{k}\gamma_E + \log \frac{\lambda}{k} + 1||[0,\infty)\,

|-

| Multivariate normal ||

f_X(\mathbf{x}) = \frac{\exp \left[ -\frac{1}{2} ( \mathbf{x} - \mathbf{\mu})^\mathsf{T} \Sigma^{-1} (\mathbf{x} - \mathbf{\mu}) \right]} {{\left(2\pi\right)}^{N/2} \left|\Sigma\right|^{1/2}}|| \tfrac{1}{2} \log\left[(2\pi e)^N \det(\Sigma)\right]||\mathbb{R}^N

|}

Many of the differential entropies are from.{{cite journal|author=Lazo, A. and P. Rathie|title=On the entropy of continuous probability distributions|journal=IEEE Transactions on Information Theory|year=1978|volume=24 |issue=1|doi=10.1109/TIT.1978.1055832|pages=120–122}}{{rp|pp=120–122}}

Variants

As described above, differential entropy does not share all properties of discrete entropy. For example, the differential entropy can be negative; also it is not invariant under continuous coordinate transformations. Edwin Thompson Jaynes showed in fact that the expression above is not the correct limit of the expression for a finite set of probabilities.{{cite journal |author=Jaynes, E.T. |author-link=Edwin Thompson Jaynes |title=Information Theory And Statistical Mechanics |journal=Brandeis University Summer Institute Lectures in Theoretical Physics |volume=3 |issue=sect. 4b |year=1963 |url=http://bayes.wustl.edu/etj/articles/brandeis.pdf }}{{rp|pp=181–218}}

A modification of differential entropy adds an invariant measure factor to correct this, (see limiting density of discrete points). If m(x) is further constrained to be a probability density, the resulting notion is called relative entropy in information theory:

D(p\parallel m) = \int p(x)\log\frac{p(x)}{m(x)}\,dx.

The definition of differential entropy above can be obtained by partitioning the range of X into bins of length h with associated sample points ih within the bins, for X Riemann integrable. This gives a quantized version of X, defined by X_h = ih if ih \le X \le (i+1)h. Then the entropy of X_h = ih is

H_h=-\sum_i hf(ih)\log (f(ih)) - \sum hf(ih)\log(h).

The first term on the right approximates the differential entropy, while the second term is approximately -\log(h). Note that this procedure suggests that the entropy in the discrete sense of a continuous random variable should be \infty.

See also

References

{{reflist}}