# Limiting density of discrete points

In information theory, the limiting density of discrete points is an adjustment to the formula of Claude Shannon for differential entropy.

It was formulated by Edwin Thompson Jaynes to address defects in the initial definition of differential entropy.

## Definition

Shannon originally wrote down the following formula for the entropy of a continuous distribution, known as differential entropy:

${\displaystyle h(X)=-\int p(x)\log p(x)\,dx.}$

Unlike Shannon's formula for the discrete entropy, however, this is not the result of any derivation (Shannon simply replaced the summation symbol in the discrete version with an integral) and it turns out to lack many of the properties that make the discrete entropy a useful measure of uncertainty. In particular, it is not invariant under a change of variables and can even become negative. In addition, it is not even dimensionally correct. Since ${\displaystyle P(x)}$ would be dimensionless, ${\displaystyle p(x)}$ must have units of ${\displaystyle {\frac {1}{dx}}}$, which means that the argument to the logarithm is not dimensionless as required.

Jaynes (1963, 1968) argued that the formula for the continuous entropy should be derived by taking the limit of increasingly dense discrete distributions.[1][2] Suppose that we have a set of ${\displaystyle N}$ discrete points ${\displaystyle \{x_{i}\}}$, such that in the limit ${\displaystyle N\to \infty }$ their density approaches a function ${\displaystyle m(x)}$ called the "invariant measure".

${\displaystyle \lim _{N\to \infty }{\frac {1}{N}}\,({\mbox{number of points in }}a

Jaynes derived from this the following formula for the continuous entropy, which he argued should be taken as the correct formula:

${\displaystyle \lim _{N\rightarrow \infty }H(X)=\lim _{N\rightarrow \infty }H_{N}(X)=\log(N)-\int p(x)\log {\frac {p(x)}{m(x)}}\,dx.}$

Typically, when this is written, the term ${\displaystyle \log(N)}$ is omitted, as that would typically not be finite. So the actual common definition is

${\displaystyle H(X)=-\int p(x)\log {\frac {p(x)}{m(x)}}\,dx.}$

Where it is unclear whether or not the ${\displaystyle \log(N)}$ term should be omitted, one could write

${\displaystyle H_{N}(X)=\log(N)+H(X)}$

Notice that in Jayne's formula, ${\displaystyle m(x)}$ is a probability density. It is clear that for any finite ${\displaystyle N}$ that ${\displaystyle m(x)}$ is simply a uniform density over the quantization of the continuous space that is used in the Riemann sum. In the limit, ${\displaystyle m(x)}$ is the continuous limiting density of points in the quantization used to represent the continuous variable ${\displaystyle x}$.

Suppose one had a number format that took on ${\displaystyle N}$ possible values, distributed as per ${\displaystyle m(x)}$. Then ${\displaystyle H_{N}(X)}$ (if ${\displaystyle N}$ is large enough that the continuous approximation is valid) is the discrete entropy of the variable ${\displaystyle x}$ in this encoding. This is equal to the average number of bits required to transmit this information, and is no more than ${\displaystyle \log(N)}$. Therefore, ${\displaystyle H(X)}$ may be thought of as the amount of information gained by knowing that the variable ${\displaystyle x}$ follows the distribution ${\displaystyle p(x)}$, and is not uniformly distributed over the possible quantized values, as would be the case if it followed ${\displaystyle m(x)}$. It should come as no surprise that ${\displaystyle H(X)}$ is actually the (negative) Kullback–Leibler divergence from ${\displaystyle m(x)}$ to ${\displaystyle p(x)}$, which is thought of as the information gained by learning that a variable previously thought to be distributed as ${\displaystyle m(x)}$ is actually distributed as ${\displaystyle p(x)}$.

Jaynes' continuous entropy formula has the property of being invariant under a change of variables, provided that ${\displaystyle m(x)}$ and ${\displaystyle p(x)}$ are transformed in the same way. (This motivates the moniker "invariant measure" for m.) This solves many of the difficulties that come from applying Shannon's continuous entropy formula. Jaynes himself dropped the ${\displaystyle \log(N)}$ term as it was not relevant to his work (maximum entropy distributions), and it is somewhat awkward to have an infinite term in the calculation. Unfortunately, this cannot be helped if the quantization is made arbitrarily fine, as would be the case in the continuous limit. Note that ${\displaystyle H(X)}$ as defined here (without the ${\displaystyle \log(N)}$ term) would always be non-positive, because a KL divergence would always be non-negative.

If it is the case that ${\displaystyle m(x)}$ is constant over some interval of size ${\displaystyle r}$, and ${\displaystyle p(x)}$ is essentially zero outside that interval, then the LDDP is closely related to the differential entropy ${\displaystyle h(X)}$

${\displaystyle H_{N}(X)\approx \log(N)-\log(r)+h(X)}$

## References

1. ^ Jaynes, E. T. (1963). "Information Theory and Statistical Mechanics". In K. Ford. Statistical Physics (PDF). Benjamin, New York. p. 181.
2. ^ Jaynes, E. T. (1968). "Prior Probabilities" (PDF). IEEE Trans. on Systems Science and Cybernetics. SSC-4: 227.
• Jaynes, E. T. (2003). Probability Theory: The Logic of Science. Cambridge University Press. ISBN 978-0521592710.