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)logf(x)dx,h(X)=-\int_{\mathbb R^d}f(x)\log f(x)\,dx,

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

The value may be ++\infty or -\infty. It is undefined if the positive and negative parts of flogff\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 AGLd(R)A\in\mathrm{GL}_d(\mathbb R), bRdb\in\mathbb R^d, and the entropies are defined, then

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

More generally, for a sufficiently regular gg,

h(g(X))=h(X)+E ⁣[logdetDg(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 XN(μ,Σ)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 ARdA\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.