Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Exercise 3.3: Entropy of Ternary Quantities

From LNTwww

Given entropy functions

On the right you see the entropy functions  HR(p)HB(p)  and  HG(p), where  R  stands for "red",  B  for "blue" and  G  for "green".  The probability functions are for all random variables:

PX(X)=[p1, p2, p3]|X|=3.

For the questionnaire, the relationship  p1=p  and  p2=1p3p.

The probability function of a random variable

X={x1,x2,...,xμ,...,xM}

with the symbolic range  |X|=M  is generally:

PX(X)=[p1,p2,...,pμ,...,pM].

The entropy (uncertainty) of this random variable is calculated according to the equation

H(X)=E[log21/PX(X)],

and always lies in the range  0H(X)log2|X|.

  • The lower bound  H(X)=0  results when any probability  pμ=1  and all others are zero.
  • The upper bound is to be derived here as in the lecture "Information Theory" by  Gerhard Kramer  at the TU Munich:
Upper bound estimate for the natural logarithm
  • By extending the above equation by  |X|  in the numerator and denominator, using  log2x=ln(x)/ln(2), we obtain:
H(X)=1ln(2)E[ln1|X|PX(X)]+log2|X|.
  • As can be seen from the graph opposite, the estimation  ln(x)x1  holds with the identity for  x=1.  Thus, it can be written:
H(X)1ln(2)E[1|X|PX(X)1]+log2|X|.
  • In   Exercise 3.2  the expected value  E[log21/PX(X)]=|X|  was calculated for the case  pμ0  for all  μ .  Thus, the first term disappears and the known result is obtained:
H(X)log2|X|.




Hints:

  • The equation of the binary entropy function is:
Hbin(p)=plog21p+(1p)log211p.


Questions

1

Which statements are true for the red entropy function  HR(p)?

HR(p)  results, for example, with  p1=p,  p2=1p  and  p3=0.
HR(p)  is identical to the binary entropy function  Hbin(p).

2

What are the properties of the binary entropy function  Hbin(p) ?

Hbin(p)  is concave with respect to the parameter  p.
  Max [Hbin(p)]=2  bit applies.

3

Which statements are true for the blue entropy function  HB(p)?

HB(p)  ergibt sich beispielsweise mit  p1=p,  p2=1/2p  und  p3=1/2.
Es gilt  HB(p=0)=1  bit.
Es gilt  Max [HB(p)]=log2(3)  bit.

4

Which statements are true for the green entropy function  HG(p)?

HG(p)  results, for example, with  p1=p,  p2=2/3p  and  p3=1/3.
  HG(p=0)=1  bit is valid.
  Max [HG(p)]=log2(3) bit applies.


Solution

(1)  Both statements are correct:

  • If we set  p3=0 and formally  p1=p   ⇒    p2=1p, we get the binary entropy function
Hbin(p)=plog21p+(1p)log211p.


(2)  Only the proposed solution 1 is correct:

  • One can also put the binary entropy function into the following form because of  log(x)=ln(x)/ln(2) :
Hbin(p)=1ln(2)[pln(p)+(1p)ln(1p)].
  • The first derivation leads to the result
dHbin(p)dp=1ln(2)[ln(p)+p1pln(1p)(1p)11p]=1ln(2)[ln(1p)ln(p)]=log21pp.
  • By setting this derivative to zero, we obtain the abscissa value  p=0.5, which leads to the maximum of the entropy function:   Hbin(p=0.5)=1 bit
    ⇒   the proposed solution 2 is wrong.
  • By differentiating again, one obtains for the second derivative
d2Hbin(p)dp2=1ln(2)[11p1p]=1ln(2)p(1p).
  • This function is negative in the entire definition domain  0p1    ⇒   Hbin(p) is concave   ⇒   the proposed solution 1 is correct.


Three entropy functions with  M=3

(3)  Propositions 1 and 2 are correct here:

  • For  p=0  one obtains the probability function  PX(X)=[0,1/2,1/2]   ⇒   H(X)=1  bit.
  • The maximum under the condition  p3=1/2  is obtained for  p1=p2=1/4:
PX(X)=[1/4,1/4,1/2]Max [HB(p)]=1.5 bit.
  • In compact form,  HB(p)  with the constraint  0p1/2  can be represented as follows:
HB(p)=1.0bit+1/2Hbin(2p).


(4)  The first and last statements are correct here::

  • The green curve with  p=1/3  also contains the equal distribution of all probabilities
Max [HG(p)]=log2(3) bit.
  • In general, the entire curve in the range  0p2/3  can be expressed as follows:
HG(p)=HG(p=0)+2/3Hbin(3p/2).
  • From the graph on the information page, one can also see that the following condition must be fulfilled:
HG(p=0)+2/3=log2(3)HG(p=0)=1.5850.667=0.918bit.
  • The second suggested solution is therefore wrong.  The same result can be obtained with the equation
HG(p=0)=1/3log2(3)+2/3log2(3/2)=log2(3)2/3log2(2).