Let XX be an Rd\mathbb R^d-valued whose law has ff with respect to . If the integral below is well-defined as an extended integral, the differential entropy of XX is

h(X)=−∫Rdf(x)log⁡f(x) dx,h(X)=-\int_{\mathbb R^d}f(x)\log f(x)\,dx,

with 0log⁡0:=00\log0:=0.

The value may be +∞+\infty or −∞-\infty. It is undefined if the positive and negative parts of flog⁡ff\log f both have infinite integral.

Dependence on coordinates

Differential entropy is entropy relative to a chosen , here Lebesgue measure. It is therefore not invariant under changes of coordinates. If A∈GLd(R)A\in\mathrm{GL}_d(\mathbb R), b∈Rdb\in\mathbb R^d, and the entropies are defined, then

h(AX+b)=h(X)+log⁡∣det⁡A∣.h(AX+b)=h(X)+\log|\det A|.

More generally, for a sufficiently regular gg,

h(g(X))=h(X)+E ⁣[log⁡∣det⁡Dg(X)∣]h(g(X)) = h(X)+\mathbb E\!\left[\log|\det Dg(X)|\right]

whenever both sides are well-defined.

Unlike , differential entropy can be negative. Coordinate-invariant comparisons are usually expressed through .

Examples
  • If X∼N(μ,Σ)X\sim\mathcal N(\mu,\Sigma) on Rd\mathbb R^d with positive-definite Σ\Sigma, then
    h(X)=12log⁡ ⁣((2πe)ddet⁡Σ).h(X)=\frac12\log\!\bigl((2\pi e)^d\det\Sigma\bigr).
  • If XX is uniform on a A⊂RdA\subset\mathbb R^d with 0<λ(A)<∞0<\lambda(A)<\infty, then h(X)=log⁡λ(A)h(X)=\log\lambda(A).
References
  1. Thomas M. Cover and Joy A. Thomas, Elements of Information Theory, 2nd ed., Wiley, 2006, Chapter 8. Publisher record.