Difference between revisions of "Aufgaben:Exercise 4.4: Conventional Entropy and Differential Entropy"

From LNTwww
Line 3: Line 3:
 
}}
 
}}
  
[[File:P_ID2878__Inf_A_4_4.png|right|frame|Zweimal Gleichverteilung]]
+
[[File:P_ID2878__Inf_A_4_4.png|right|frame|Two uniform distributions]]
Wir betrachten die beiden wertkontinuierlichen Zufallsgrößen  $X$  und  $Y$  mit den Wahrscheinlichkeitsdichtefunktionen $f_X(x)$  und $f_Y(y)$.  Für diese Zufallsgrößen kann man
+
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
* die herkömmlichen Entropien  $H(X)$  bzw.  $H(Y)$  nicht angeben,
+
* not specify the conventional entropies  $H(X)$  and  $H(Y)$ , respectively,
* jedoch aber die differentiellen Entropien  $h(X)$  und  $h(Y)$.
+
* but the differential entropies  $h(X)$  and  $h(Y)$.
  
  
Wir betrachten außerdem zwei wertdiskrete Zufallsgrößen:
+
We also consider two discrete value random variables:
*Die Zufallsgröße&nbsp; $Z_{X,\hspace{0.05cm}M}$&nbsp; ergibt sich durch (geeignete) Quantisierung der Zufallsgröße&nbsp; $X$&nbsp; mit der Quantisierungsstufenzahl&nbsp; $M$  <br>&#8658; &nbsp; Quantisierungsintervallbreite&nbsp; ${\it \Delta} = 0.5/M$.
+
*The random variable&nbsp; $Z_{X,\hspace{0.05cm}M}$&nbsp; is obtained by (suitably) quantizing the random variable&nbsp; $X$&nbsp;with the quantization step number&nbsp; $M$  <br>&#8658; &nbsp; quantization interval width&nbsp; ${\it \Delta} = 0.5/M$.
* Die Zufallsgröße&nbsp; $Z_{Y,\hspace{0.05cm}M}$&nbsp; ergibt sich nach Quantisierung der Zufallsgröße&nbsp; $Y$&nbsp; mit der Quantisierungsstufenzahl&nbsp; $M$ &nbsp; <br>&#8658; &nbsp; Quantisierungsintervallbreite&nbsp; ${\it \Delta} = 2/M$.
+
* The random quantity&nbsp; $Z_{Y,\hspace{0.05cm}M}$&nbsp; is obtained after quantization of the random quantity&nbsp; $Y$&nbsp; with the quantization level number&nbsp; $M$ &nbsp; <br>&#8658; &nbsp; quantization interval width&nbsp; ${\it \Delta} = 2/M$.
  
  
Die Wahrscheinlichkeitsdichtefunktionen dieser diskreten Zufallsgrößen setzen sich jeweils aus&nbsp; $M$&nbsp; Diracfunktionen zusammen, deren Impulsgewichte durch die Intervallflächen der zugehörigen wertkontinuierlichen Zufallsgrößen gegeben sind.  
+
The probability density functions of these discrete random variables are each composed of&nbsp; $M$&nbsp; Dirac functions whose momentum weights are given by the interval areas of the associated continuous-value random variables.
  
Daraus lassen sich die Entropien&nbsp; $H(Z_{X,\hspace{0.05cm}M})$&nbsp; und&nbsp; $H(Z_{Y,\hspace{0.05cm}M})$&nbsp; in herkömmlicher Weise entsprechend dem Kapitel&nbsp; [[Information_Theory/Einige_Vorbemerkungen_zu_zweidimensionalen_Zufallsgrößen#Wahrscheinlichkeitsfunktion_und_Entropie|Wahrscheinlichkeitsfunktion und Entropie]]&nbsp; bestimmen.
+
From this, the entropies&nbsp; $H(Z_{X,\hspace{0.05cm}M})$&nbsp; and&nbsp; $H(Z_{Y,\hspace{0.05cm}M})$&nbsp; can be determined in the conventional way according to the chapter&nbsp; [[Information_Theory/Einige_Vorbemerkungen_zu_zweidimensionalen_Zufallsgrößen#Probability_mass_function_and_entropy|Probability Mass Function and Entropy]]&nbsp;.
  
Im Abschnitt&nbsp; [[Information_Theory/Differentielle_Entropie#Entropie_wertkontinuierlicher_Zufallsgr.C3.B6.C3.9Fen_nach_Quantisierung|Entropie wertkontinuierlicher Zufallsgrößen nach Quantisierung]]&nbsp; wurde auch eine Näherung angegeben.&nbsp; Beispielsweise gilt:
+
In the section&nbsp; [[Information_Theory/Differentielle_Entropie#Entropy_of_value-continuous_random_variables_after_quantization|Entropy of Continuous-Value Random Variables after Quantization]]&nbsp; , an approximation was also given.&nbsp; For example:
 
:$$H(Z_{X, \hspace{0.05cm}M}) \approx  -{\rm log}_2 \hspace{0.1cm} ({\it \Delta}) + h(X)\hspace{0.05cm}. $$
 
:$$H(Z_{X, \hspace{0.05cm}M}) \approx  -{\rm log}_2 \hspace{0.1cm} ({\it \Delta}) + h(X)\hspace{0.05cm}. $$
  
*Im Laufe der Aufgabe wird sich zeigen, dass bei rechteckförmiger WDF &nbsp; &#8658; &nbsp; Gleichverteilung diese "Näherung" das gleiche Ergebnis liefert wie die direkte Berechnung.
+
*In the course of the task it will be shown that in the case of rectangular PDF  &nbsp; &#8658; &nbsp; uniform distribution this "approximation" gives the same result as the direct calculation.
*Aber im allgemeinen Fall &ndash; so im&nbsp; [[Information_Theory/Differentielle_Entropie#Entropie_wertkontinuierlicher_Zufallsgr.C3.B6.C3.9Fen_nach_Quantisierung|$\text{Beispiel 2}$]]&nbsp; mit dreieckförmiger WDF &ndash; stellt obige Gleichung tatsächlich nur eine Näherung dar, die erst im Grenzfall&nbsp; ${\it \Delta} \to 0$&nbsp; mit der tatsächlichen Entropie&nbsp;  $H(Z_{X,\hspace{0.05cm}M})$&nbsp; übereinstimmt.
+
*But in the general case &ndash; so in&nbsp; [[Information_Theory/Differentielle_Entropie#Entropy_of_value-continuous_random_variables_after_quantization|$\text{Example 2}$]]&nbsp; with triangular PDF &ndash; above equation is in fact only an approximation, which agrees with the actual entropy&nbsp;  $H(Z_{X,\hspace{0.05cm}M})$&nbsp; only in the limiting case &nbsp; ${\it \Delta} \to 0$&nbsp;.
  
  
Line 31: Line 31:
  
  
 
+
Hints:
''Hinweise:''
+
*The exercise belongs to the chapter&nbsp; [[Information_Theory/Differentielle_Entropie|Differential Entropy]].
*Die Aufgabe gehört zum  Kapitel&nbsp; [[Information_Theory/Differentielle_Entropie|Differentielle Entropie]].
+
*Useful hints for solving this task can be found in particular on the page&nbsp;  [[Information_Theory/Differentielle_Entropie#Entropy_of_value-continuous_random_variables_after_quantization|Entropy of continuous-valued random variables after quantization]] .
*Nützliche Hinweise zur Lösung dieser Aufgabe finden Sie insbesondere auf der Seite&nbsp;  [[Information_Theory/Differentielle_Entropie#Entropie_wertkontinuierlicher_Zufallsgr.C3.B6.C3.9Fen_nach_Quantisierung|Entropie wertkontinuierlicher Zufallsgrößen nach Quantisierung]] .
 
 
   
 
   
  

Revision as of 14:24, 27 September 2021

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 discrete value random variables:

  • The random variable  $Z_{X,\hspace{0.05cm}M}$  is obtained by (suitably) quantizing the random variable  $X$ with the quantization step number  $M$
    ⇒   quantization interval width  ${\it \Delta} = 0.5/M$.
  • The random quantity  $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 of these discrete random variables are each composed of  $M$  Dirac functions whose momentum weights are given by the interval areas of the associated continuous-value 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 chapter  Probability Mass Function and Entropy .

In the section  Entropy of Continuous-Value 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 – above 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)$.