Exercise 3.3: Entropy of Ternary Quantities
From LNTwww
(Redirected from Aufgabe 3.3: Entropie von Ternärgrößen)
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=1−p3−p.
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 0≤H(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:
- 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)≤x−1 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 exercise belongs to the chapter Some preliminary remarks on 2D random variables.
- In particular, reference is made to the page Probability function and entropy.
- The same constellation is assumed here as in Exercise 3.2.
- The equation of the binary entropy function is:
- Hbin(p)=p⋅log21p+(1−p)⋅log211−p.
Questions
Solution
(1) Both statements are correct:
- If we set p3=0 and formally p1=p ⇒ p2=1−p, we get the binary entropy function
- Hbin(p)=p⋅log21p+(1−p)⋅log211−p.
(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)⋅[p⋅ln(p)+(1−p)⋅ln(1−p)].
- The first derivation leads to the result
- dHbin(p)dp=−1ln(2)⋅[ln(p)+p⋅1p−ln(1−p)−(1−p)⋅11−p]=1ln(2)⋅[ln(1−p)−ln(p)]=log21−pp.
- 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)⋅[−11−p−1p]=−1ln(2)⋅p⋅(1−p).
- This function is negative in the entire definition domain 0≤p≤1 ⇒ Hbin(p) is concave ⇒ the proposed solution 1 is correct.
(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 0≤p≤1/2 can be represented as follows:
- HB(p)=1.0bit+1/2⋅Hbin(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 0≤p≤2/3 can be expressed as follows:
- HG(p)=HG(p=0)+2/3⋅Hbin(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.585−0.667=0.918bit.
- The second suggested solution is therefore wrong. The same result can be obtained with the equation
- HG(p=0)=1/3⋅log2(3)+2/3⋅log2(3/2)=log2(3)−2/3⋅log2(2).