2.1 Entropy of Uniformly Quantized Random Variables

This is a consolidated post containing three former posts on the entropy of uniformly quantized random variables.

2.1.1 Entropy of Uniformly Quantized Exponential Distribution

This post is about entropy of discrete stochastic variables that are derived by quantizing continuous stochastic variables. A good introduction to the concept of entropy in Information Theory is in [5].

Let x{0}+ be a continuous stochastic variable with Exponential(λ) distribution and let x^{0}X^ such that X^+ be its uniformly quantized version with step size Δ. We would like to find the entropy of the discrete stochastic variable x^, denoted by Hx^, which provides us an estimate of the average number of bits required to encode x^.

For the continuous stochastic variable x, entropy is not generally defined. However, differential entropy, denoted by hx, plays the same role as entropy for discrete stochastic variables. A well known approximation relating differential entropy of a variable and the entropy of its quantized version is given as follows.

Hx^hxlogΔ (2.1)

Unfortunately, this approximation is only valid for small values of Δ and breaks down as Δ increases. For example, for the common case of Δ=1, the approximation predicts the differential entropy and entropy of the quantized variable to be equal. This is generally not the case.

A common workaround is to use numerical simulations to calculate the Hx^. However, it would be satisfying to have an analytical expression notwithstanding its practical use. As we shall see below, the expression turns out to be quite cumbersome.

Let φ(x) and f(x^) denote the probability density and mass functions of x and x^ respectively. They are related as

f(x^)=x^[x^0]Δ2x^+Δ2φ(x)𝑑x (2.2)

. The indicator function [x^0] is 0 when x^=0 and 1 otherwise, and serves to set the lower bound correctly.

Now onto calculating the negative entropy Hx^ which is given (by definition) as follows. The motivation behind using negative entropy instead of entropy is to avoid (many) negative signs on the right hand side expression.

Hx^ =x^{0}X^f(x^)logf(x^) (2.3)
=(0Δ2φ(x)𝑑x)log[0Δ2φ(x)𝑑x]
+x^X^(x^Δ2x^+Δ2φ(x)𝑑x)log[x^Δ2x^+Δ2φ(x)𝑑x] (2.4)

Using the definition of the continuous distribution function for Exponential distribution, φ(x)=λeλx, the above equation is simplified as follows.

Hx^ =(1eλΔ2)log[1eλΔ2]
+(eλΔ2eλΔ2)log[eλΔ2eλΔ2]u1(λ)
+(eλΔ2eλΔ2)u2(λ) (2.5)

With the functions u1,2(λ) given by:

u1(λ) =x^X^eλx^ (2.6)
u2(λ) =x^X^eλx^logeλx^ (2.7)

Approximate Result

The exact values of u1,2(λ), as we shall see below, are cumbersome. Therefore, we first obtain an approximate result by plugging in the the approximations for u1,2(λ) given below into equation (2.5).

u1(λ) =1λx^X^λeλx^1λ[0φ(x)𝑑xφ(0)]=1λ1 (2.8)
u2(λ) =x^X^eλx^logeλx^hxλlog(λ)log(λ)u1(λ) (2.9)

The performance of the above approximation may be verified numerically. In the graph below, we hold quantization step size constant at Δ=1 and vary the parameter λ. We observe that the approximation is acceptable, i.e. bit difference ¡ 1, for the range 0<λ1.5. For higher values of λ, the approximation fails.

[Uncaptioned image]

Exact Result

The exact result, from the graph above, may be obtained by plugging in the exact values for u1,2(λ) into equation (2.5). The exact values may be computed starting from the following identities.

1 =0φ(x)𝑑x=0Δ2φ(x)𝑑x+x^X^x^Δ2x^+Δ2φ(x)𝑑x (2.10)
hx =0φ(x)logφ(x)𝑑x
=0Δ2φ(x)logφ(x)𝑑x+x^X^x^Δ2x^+Δ2φ(x)logφ(x)𝑑x (2.11)

As the derivation is lengthy, we directly present the simplified result below.

u1(λ) =eλΔ2eλΔ2eλΔ2 (2.12)
u2(λ) =hxc1Δ2λ[eλΔ2+eλΔ2]u1(λ)eλΔ2eλΔ2 (2.13)

Where c1=log(λ)1+Δ2λeλΔ2. We see that even with a simple distribution function, the exact expressions quickly get out of hand and are unfortunately not short and elegant as one would have expected.

Version History

  1. 1.

    First published: 3rd Oct. 2015 on aravindhk-math.blogspot.com

  2. 2.

    Modified: 16th Dec. 2023 – Style updates for

2.1.2 Entropy of Uniformly Quantized Laplace and Half-Laplace Distributions

This post is about entropy of discrete stochastic variables that are derived by quantizing continuous stochastic variables. A good introduction to the concept of entropy in Information Theory is in [5]. This post is in continuation to the previous post in Section 2.1.1.

Let x be a continuous stochastic variable with Laplace(0,b) distribution and let x^X^ such that X^ and 0X^ be its uniformly quantized version with step size Δ. We would like to find the entropy of the discrete stochastic variable x^, denoted by Hx^, which provides us an estimate of the average number of bits required to encode x^.

Half-Laplace Distribution

Half-Laplace distribution refers to the distribution obtained by folding the zero-mean distribution function along the center. The new distribution is equivalent to the distribution of the stochastic variable y=|x|, i.e. the absolute value of the original Laplace distributed variable.

Let φ(x) and Φ(x) denote the probability distribution function and cumulative distribution function of the Laplace variable x. These are defined as follows.

φ(x) =12be|x|b (2.14)
Φ(x) ={12exbif x<0112exbif x0 (2.15)

The half-Laplace cumulative distribution function of y, denoted by Φ˘(y), is then given as follows.

Φ˘(y) ={0if y=0Φ(y)Φ(y)if y>0 (2.16)
=1eyb (2.17)

The expression in equation (2.17) may be directly recognized as the cumulative distribution function of Exponential(1/b). Therefore, the entropy of half-Laplace distribution may be found according to the expressions in Section 2.1.1 with λ=1/b.

Laplace Distribution

Let f(x^) denote the probability mass function of the quantized variable x^. It is related to the probability density function φ(x) as follows.

f(x^)=x^Δ2x^Δ2φ(x)𝑑x (2.18)

Further, let X^+X^ such that it contains the positive quantized values. The negative entropy Hx^ is given (by definition) as follows. Note that the simplification is possible due to the symmetry of Laplace distribution.

Hx^ =x^X^f(x^)logf(x^) (2.19)
=f(0)logf(0)+2x^X^+f(x^)logf(x^) (2.20)

By using the definition from equation (2.18) we have the following:

Hx^ =(1eΔ2b)log[1eΔ2b]
+(eΔ2beΔ2b)log[12(eΔ2beΔ2b)]v1(b)
+(eΔ2beΔ2b)v2(b) (2.21)

With the functions v1,2(b) given by:

v1(b) =x^X^+ex^b (2.22)
v2(b) =x^X^+ex^blogex^b (2.23)

Exact Result

The analytical expressions for v1,2(b) may be computed starting from the following identities.

1 =φ(x)𝑑x=20Δ2φ(x)𝑑x+2x^X^+x^Δ2x^+Δ2φ(x)𝑑x (2.24)
hx =φ(x)logφ(x)𝑑x
=20Δ2φ(x)logφ(x)𝑑x+2x^X^+x^Δ2x^+Δ2φ(x)logφ(x)𝑑x (2.25)

Where hx is the differential entropy. Upon simplification, we obtain the following results.

v1(b) =eΔ2beΔ2beΔ2b (2.26)
v2(b) =hxc1Δ2b[eΔ2b+eΔ2b]v1(b)eΔ2beΔ2b (2.27)

Where c1=log(12b)1+Δ2beΔ2b.

We see that the expressions are quite similar to the ones obtained for Exponential distribution in Section 2.1.1. This is expected as Laplace and Exponential distributions are very closely related.

Version History

  1. 1.

    First published: 5th Oct. 2015 on aravindhk-math.blogspot.com

  2. 2.

    Modified: 16th Dec. 2023 – Style updates for

2.1.3 Entropy of Sign-Magnitude Coding of Uniformly Quantized Laplacian Variables

This is the third post in series discussing uniform quantization of Laplacian stochastic variables and is about entropy of separately coding sign and magnitude of uniformly quantized Laplacian variables.

We begin by showing that the distribution of the magnitude of uniformly quantized Laplacian variable is the same as the distribution of uniformly quantized magnitude of the Laplacian variable which is shown in Section 2.1.2 to be equivalent to the distribution of a corresponding uniformly quantized Exponential variable.

Let x^ be the uniformly quantized version, with step size Δ, of a Laplacian variable x with Laplace(0,b) distribution and let m^ and s^ be the variables denoting magnitude and sign of x^ respectively. We have m^=|x^|{0,+} and s^=sign(x^){1,0,+1}.

Let fx^(x^) and Φx^(x^) denote the probability mass function and cumulative distribution function of x^ respectively. These are given as follows.

fx^(x^) ={1eΔ2bif x^=012e|x^|b(eΔ2beΔ2b)otherwise (2.28)
Φx^(x^) ={12ex^beΔ2bif x^<0112ex^beΔ2bif x^0 (2.29)

The cumulative distribution function Φm^(m^) of the discrete variable m^ is given as follows

Φm^(m^)=Φx^(m^)Φx^(m^+1) (2.30)

,

where m^+1=m^+Δ denotes the quantization point immediately succeeding m^. Substituting the value of Φx^(x^) from above we have

Φm^(m^) =1em^beΔ2b (2.31)

,

which can be readily seen as the cumulative distribution function of a uniformly quantized Exponential variable Exponential(1/b) quantized with step size Δ. Therefore, the entropy of m^, denoted by Hm^, is as given in Section 2.1.1 . Note that a generic version of the above equivalence may be proven for distributions symmetric around zero.

Next, we find the entropy of the stochastic variable denoting the sign s^ which takes values from the set S^={+1,0,1}. Let fs^(s^) denote the probability mass function of the discrete variable s^. It is given as follows.

fs^(s^)={1eΔ2bif s^=012eΔ2bif s^=±1. (2.32)

Encoding s^=0 carries no more information than what is contained in m^ as s^=0 if and only if m^=0. Therefore, we only need to encode the non-zero signs. The entropy of the reduced size alphabet may be computed using the theorem for general case given below.

Let A={χ0,χ1,,χn} be a finite size coding alphabet with corresponding probabilities P={p0,p1,,pn}. Now let D={d0,d1,,dn} be the probabilities that symbols from A are coded. That is, if di=1 then the i-th symbol is always coded, if di=0.5 then it is coded 50% of the times, and the other 50% of the times it is inferred correctly at the decoder. There are no errors in the decoding process due to the reduced alphabet size. Let

HA=i=1npidilog(pidijpjdj) (2.33)

denote the entropy of the reduced size coding alphabet. Then HA may be given by the straightforward result below.

For the case above for s^, we set D={1,0,1}, that is, we would not encode the symbol ’0’ but infer it correctly based on the value of m^. We have entropy of coding s^ using this scheme, denoted by HS^, given as follows.

HS^ =212eΔ2blog12
=eΔ2blog2 (2.34)

Finally, using the values of entropy Hx^ and Hm^ from Sections 2.1.2 and 2.1.1 and HS^ from above, we have the following upon simplification.

Hx^=Hm^+HS^ (2.35)

Therefore, encoding the magnitude and the reduced sign has the same entropy as encoding the uniformly quantized Laplacian variable.

Version History

  1. 1.

    First published: 29th Oct. 2015 on aravindhk-math.blogspot.com

  2. 2.

    Modified: 17th Dec. 2023 – Style updates for