Exercise 4.4: Conventional Entropy and Differential Entropy

From LNTwww
Revision as of 17:12, 28 September 2021 by Guenter (talk | contribs)

Two uniform distributions

We consider the two continuous-valued random variables  $X$  and  $Y$  with probability density functions $f_X(x)$  and $f_Y(y)$.  For these random variables one can

  • not specify the conventional entropies  $H(X)$  and  $H(Y)$ , respectively,
  • but the differential entropies  $h(X)$  and  $h(Y)$.


We also consider two value-discrete random variables:

  • The variable  $Z_{X,\hspace{0.05cm}M}$  is obtained by (suitably) quantizing the random quantity  $X$ with the quantization level number  $M$
    ⇒   quantization interval width  ${\it \Delta} = 0.5/M$.
  • The variable  $Z_{Y,\hspace{0.05cm}M}$  is obtained after quantization of the random quantity  $Y$  with the quantization level number  $M$  
    ⇒   quantization interval width  ${\it \Delta} = 2/M$.


The probability density functions  $\rm (PDF)$  of these discrete random variables are each composed of  $M$  Dirac functions whose momentum weights are given by the interval areas of the associated value-continuous random variables.

From this, the entropies  $H(Z_{X,\hspace{0.05cm}M})$  and  $H(Z_{Y,\hspace{0.05cm}M})$  can be determined in the conventional way according to the page  Probability mass function and entropy .

In the section  Entropy of value-ontinuous random variables after quantization,  an approximation was also given.  For example:

$$H(Z_{X, \hspace{0.05cm}M}) \approx -{\rm log}_2 \hspace{0.1cm} ({\it \Delta}) + h(X)\hspace{0.05cm}. $$
  • In the course of the task it will be shown that in the case of rectangular PDF   ⇒   uniform distribution this  "approximation"  gives the same result as the direct calculation.
  • But in the general case – so in  $\text{Example 2}$  with triangular PDF – this equation is in fact only an approximation, which agrees with the actual entropy  $H(Z_{X,\hspace{0.05cm}M})$  only in the limiting case   ${\it \Delta} \to 0$ .





Hints:


Fragebogen

1

Berechnen Sie die differentielle Entropie  $h(X)$.

$ h(X) \ = \ $

$\ \rm bit$

2

Berechnen Sie die differentielle Entropie $h(Y)$.

$ h(Y) \ = \ $

$\ \rm bit$

3

Berechnen Sie die Entropie der wertdiskreten Zufallsgrößen  $Z_{X,\hspace{0.05cm}M=4}$  nach der direkten Methode.

$H(Z_{X,\hspace{0.05cm}M=4})\ = \ $

$\ \rm bit$

4

Berechnen Sie die Entropie der wertdiskreten Zufallsgrößen  $Z_{X,\hspace{0.05cm}M=4}$  mit der angegebenen Näherung.

$H(Z_{X,\hspace{0.05cm}M=4})\ = \ $

$\ \rm bit$

5

Berechnen Sie die Entropie der wertdiskreten Zufallsgröße  $Z_{Y,\hspace{0.05cm}M=8}$  mit der angegebenen Näherung.

$H(Z_{Y,\hspace{0.05cm}M=8})\ = \ $

$\ \rm bit$

6

Welche der folgenden Aussagen sind zutreffend?

Die Entropie einer wertdiskreten Zufallsgröße  $Z$  ist stets  $H(Z) \ge 0$.
Die differenzielle Entropie einer wertkontinuierlichen Zufallsgröße  $X$  ist stets  $h(X) \ge 0$.


Musterlösung

(1)  Gemäß der entsprechenden Theorieseite gilt mit  $x_{\rm min} = 0$  und  $x_{\rm max} = 1/2$:

$$h(X) = {\rm log}_2 \hspace{0.1cm} (x_{\rm max} - x_{\rm min}) = {\rm log}_2 \hspace{0.1cm} (1/2) \hspace{0.15cm}\underline{= - 1\,{\rm bit}}\hspace{0.05cm}.$$


(2)  Mit  $y_{\rm min} = -1$  und  $y_{\rm max} = +1$  ergibt sich dagegen für die differentielle Entropie der Zufallsgröße  $Y$:

$$h(Y) = {\rm log}_2 \hspace{0.1cm} (y_{\rm max} - y_{\rm min}) = {\rm log}_2 \hspace{0.1cm} (2) \hspace{0.15cm}\underline{= + 1\,{\rm bit}}\hspace{0.05cm}. $$


Quantisierte Zufallsgröße  $Z_{X, \ M = 4}$

(3)  Die nebenstehende Grafik verdeutlicht die bestmögliche Quantisierung der Zufallsgröße  $X$  mit der Quantisierungsstufenzahl  $M = 4$    ⇒   Zufallsgröße  $Z_{X, \ M = 4}$:

  • Die Intervallbreite ist hier gleich  ${\it \Delta} = 0.5/4 = 1/8$.
  • Die möglichen Werte  (jeweils in der Intervallmitte)  sind  $z \in \{0.0625,\ 0.1875,\ 0.3125,\ 0.4375\}$.


Die direkte Entropieberechnung ergibt mit der Wahrscheinlichkeitsfunktion $P_Z(Z) = \big [1/4,\ \text{...} , \ 1/4 \big]$:

$$H(Z_{X, \ M = 4}) = {\rm log}_2 \hspace{0.1cm} (4) \hspace{0.15cm}\underline{= 2\,{\rm bit}} \hspace{0.05cm}.$$

Mit der Näherung erhält man unter Berücksichtigung des Ergebnisses von  (1):

$$H(Z_{X,\hspace{0.05cm} M = 4}) \approx -{\rm log}_2 \hspace{0.1cm} ({\it \Delta}) + h(X) = 3\,{\rm bit} +(- 1\,{\rm bit})\hspace{0.15cm}\underline{= 2\,{\rm bit}}\hspace{0.05cm}. $$

Hinweis:  Nur bei der Gleichverteilung liefert die Näherung genau das gleiche Ergebnis wie die direkte Berechnung, also die tatsächliche Entropie.

Quantisierte Zufallsgröße $Z_{Y, \ M = 4}$


(4)  Aus der zweiten Grafik erkennt man die Gemeinsamkeiten / Unterschiede zur Teilaufgabe  (3):

  • Der Quantisierungsparameter ist nun  ${\it \Delta} = 2/4 = 1/2$.
  • Die möglichen Werte sind nun  $z \in \{\pm 0.75,\ \pm 0.25\}$.
  • Somit liefert hier die "Näherung"  (ebenso wie die direkte Berechnung)  das Ergebnis:
$$H(Z_{Y,\hspace{0.05cm} M = 4}) \approx -{\rm log}_2 \hspace{0.1cm} ({\it \Delta}) + h(Y) = 1\,{\rm bit} + 1\,{\rm bit}\hspace{0.15cm}\underline{= 2\,{\rm bit}}\hspace{0.05cm}.$$


Quantisierte Zufallsgröße  $Z_{Y, \ M = 8}$

(5)  Im Gegensatz zur Teilaufgabe  (5)  gilt nun  ${\it \Delta} = 1/4$.  Daraus folgt für die "Näherung":

$$H(Z_{Y,\hspace{0.05cm} M = 8}) \approx -{\rm log}_2 \hspace{0.1cm} ({\it \Delta}) + h(Y) = 2\,{\rm bit} + 1\,{\rm bit}\hspace{0.15cm}\underline{= 3\,{\rm bit}}\hspace{0.05cm}.$$

Man erhält wieder das gleiche Ergebnis wie bei der direkten Berechnung.
(6)  Richtig ist nur die Aussage 1:

  • Die Entropie  $H(Z)$  einer diskreten Zufallsgröße  $Z = \{z_1, \ \text{...} \ , z_M\}$  ist nie negativ.
  • Der Grenzfall  $H(Z) = 0$  ergibt sich zum Beispiel für  ${\rm Pr}(Z = z_1) = 1$  und  ${\rm Pr}(Z = z_\mu) = 0$  für  $2 \le \mu \le M$.
  • Dagegen kann die differentielle Entropie  $h(X)$  einer wertkontinuierlichen Zufallsgröße  $X$  wie folgt sein:
    • $h(X) < 0$  $($Teilaufgabe 1$)$,
    • $h(X) > 0$  $($Teilaufgabe 2$)$, oder auch
    • $h(X) = 0$  $($zum Beispiel für  $x_{\rm min} = 0$  und  $x_{\rm max} = 1)$.