Difference between revisions of "Aufgaben:Exercise 4.2: Triangular PDF"

From LNTwww
m (Text replacement - "value-continuous" to "continuous")
 
(23 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{quiz-Header|Buchseite=Informationstheorie/Differentielle Entropie
+
{{quiz-Header|Buchseite=Information_Theory/Differential_Entropy
 
}}
 
}}
  
[[File:P_ID2865__Inf_A_4_2.png|right|]]
+
[[File:P_ID2865__Inf_A_4_2.png|right|frame|Two triangular PDFs]]
Betrachtet werden zwei Wahrscheinlichkeitsdichtefunktionen (kurz WDF) mit dreieckförmigem Verlauf:
+
Two probability density functions  $\rm (PDF)$  with triangular shapes are considered.
:* Die Zufallsgröße <i>X</i> ist auf den Wertebereich von 0 und 1 begrenzt, und es gilt für die WDF (obere Skizze)
+
* The random variable&nbsp;  $X$&nbsp;  is limited to the range from&nbsp;  $0$&nbsp;  to&nbsp;  $1$&nbsp;,&nbsp;  and it holds for the PDF (upper sketch):
$$f_X(x) = \left\{ \begin{array}{c} 2x \\  0 \\  \end{array} \right. \begin{array}{*{20}c}  {\rm{f\ddot{u}r}} \hspace{0.1cm} 0 \le x \le 1 \\    {\rm sonst} \\ \end{array}
+
:$$f_X(x) = \left\{ \begin{array}{c} 2x \\  0 \\  \end{array} \right. \begin{array}{*{20}c}  {\rm{f\ddot{u}r}} \hspace{0.1cm} 0 \le x \le 1 \\    {\rm else} \\ \end{array}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
:* Die Zufallsgröße <i>Y</i> besitzt gemäß der unteren Skizze die folgende WDF:
+
* According to the lower sketch, the random variable&nbsp;  $Y$&nbsp;  has the following PDF:
$$f_Y(y) = \left\{ \begin{array}{c} 1 - |y| \\  0 \\  \end{array} \right. \begin{array}{*{20}c}  {\rm{f\ddot{u}r}} \hspace{0.1cm} |y| \le 1 \\    {\rm sonst} \\ \end{array}
+
:$$f_Y(y) = \left\{ \begin{array}{c} 1 - |\hspace{0.03cm}y\hspace{0.03cm}| \\  0 \\  \end{array} \right. \begin{array}{*{20}c}  {\rm{f\ddot{u}r}} \hspace{0.1cm} |\hspace{0.03cm}y\hspace{0.03cm}| \le 1 \\    {\rm else} \\ \end{array}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
:* Der Zusammenhang zwischen den zwei Zufallsgrößen ist durch die Gleichung <i>X</i> = |<i>Y</i>| gegeben.
+
 
Für beide Zufallsgrößen soll jeweils die [http://en.lntwww.de/Informationstheorie/Differentielle_Entropie '''differentielle Entropie'''] ermittelt werden. Beispielsweise lautet die entsprechende Gleichung für die Zufallsgröße <i>X</i>:
+
For both random variables, the&nbsp;  [[Information_Theory/Differentielle_Entropie|differential  entropy]]&nbsp; is to be determined in each case.
$$h(X) =  
+
 
\hspace{0.1cm} - \hspace{-0.45cm} \int\limits_{{\rm supp}\hspace{0.03cm}(\hspace{-0.03cm}f_X)} \hspace{-0.35cm}  f_X(x) \cdot {\rm log} \hspace{0.1cm} [ f_X(x) ] \hspace{0.1cm}{\rm d}x  
+
For example, the corresponding equation for the random variable&nbsp;  $X$&nbsp; is:
\hspace{0.6cm}{\rm mit}\hspace{0.6cm} {\rm supp}(f_X) = \{ x: f_X(x) > 0 \}
+
:$$h(X) =  
 +
\hspace{0.1cm} - \hspace{-0.45cm} \int\limits_{{\rm supp}\hspace{0.03cm}(\hspace{-0.03cm}f_X)} \hspace{-0.35cm}  f_X(x) \cdot {\rm log} \hspace{0.1cm} \big [ f_X(x) \big ] \hspace{0.1cm}{\rm d}x  
 +
\hspace{0.6cm}{\rm with}\hspace{0.6cm} {\rm supp}(f_X) = \{ x\text{:} \  f_X(x) > 0 \}
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
Verwendet man den natürlichen Logarithmus, so ist die Pseudo&ndash;Einheit &bdquo;nat&rdquo; anzufügen. Ist das Ergebnis dagegen in &bdquo;bit&rdquo; gefragt, so ist der <i>Logarithmus dualis</i> &nbsp;&#8658;&nbsp; &bdquo;log<sub>2</sub>&rdquo; zu verwenden.
+
*If the&nbsp;  "natural logarithm",&nbsp; the pseudo-unit&nbsp; "nat"&nbsp; must be added.  
 +
*If, on the other hand, the result is asked in&nbsp; "bit"&nbsp; then the&nbsp; "dual logarithm" &nbsp; &#8658; &nbsp; "$\log_2$"&nbsp; is to be used.
 +
 
 +
 
 +
In the fourth subtask, the new random variable &nbsp;$Z = A \cdot Y$&nbsp; is considered. Here,&nbsp; the PDF parameter&nbsp; $A$&nbsp; is to be determined in such a way that the differential entropy of the new random variable&nbsp; $Z$&nbsp; yields exactly&nbsp; $1$&nbsp; bit :<br>
 +
:$$h(Z) = h (A \cdot Y) =  h (Y)  + {\rm log}_2 \hspace{0.1cm} (A) = 1\ {\rm bit} \hspace{0.05cm}.$$
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
Hints:
 +
*The task belongs to the chapter&nbsp; [[Information_Theory/Differentielle_Entropie|Differential Entropy]].
 +
*Useful hints for solving this task and further information on continuous random variables can be found in the third chapter "Continuous Random Variables" of the book&nbsp; [[Theory of Stochastic Signals]].
 +
 +
*Given the following indefinite integral:
 +
:$$\int  \xi \cdot {\rm ln} \hspace{0.1cm} (\xi)\hspace{0.1cm}{\rm d}\xi =
 +
\xi^2 \cdot \big [1/2 \cdot {{\rm ln} \hspace{0.1cm} (\xi)} -
 +
{1}/{4}\big ] \hspace{0.05cm}.$$
 +
 
  
In der Teilaufgabe (d) wird die neue Zufallsgröße <i>Z</i> = <i>A</i> &middot; <i>Y</i> betrachtet. Der WDF&ndash;Parameter <i>A</i> ist so zu bestimmen, dass die differentielle Entropie der neuen Zufallsgröße <i>Z</i> genau 1 bit ergibt:<br>
+
 
$$h(Z) = h (A \cdot Y) =  h (Y)  + {\rm log}_2 \hspace{0.1cm} (A) = 1\,{\rm bit} \hspace{0.05cm}.$$
+
===Questions===
<b>Hinweis:</b> Die Aufgabe gehört zum Themengebiet von [http://en.lntwww.de/Informationstheorie/Differentielle_Entropie '''Kapitel 4.1'''] Vorgegeben ist das folgende unbestimmte Integral:
 
$$\int  \xi \cdot {\rm ln} \hspace{0.1cm} (\xi)\hspace{0.1cm}{\rm d}\xi =
 
\xi^2 \cdot \left [ \frac{{\rm ln} \hspace{0.1cm} (\xi)}{2} -
 
\frac{1}{4}\right ] \hspace{0.05cm}.$$
 
===Fragebogen===
 
 
<quiz display=simple>
 
<quiz display=simple>
{Berechnen Sie die differentielle Entropie der Zufallsgröße <i>X</i> in &bdquo;nat&rdquo;.
+
{Calculate the differential entropy of the random variable&nbsp; $X$&nbsp; in&nbsp; "nat".
 
|type="{}"}
 
|type="{}"}
$h(X)$ = { 0.193 3% }
+
$h(X) \ = \ $ { -0.199--0.187 } $\ \rm nat$
  
  
{Welches Ergebnis erhält man mit der Pseudoeinheit &bdquo;bit&rdquo;?
+
{What result is obtained with the pseudo-unit&nbsp; "bit"?
 
|type="{}"}
 
|type="{}"}
$h(X)$ = { 0.279 3% }
+
$h(X) \ = \ $ { -0.288--0.270 } $\ \rm bit$
  
{Berechnen Sie die differentielle Entropie der Zufallsgröße <i>Y</i>.
+
{Calculate the differential entropy of the random variable&nbsp; $Y$.
 
|type="{}"}
 
|type="{}"}
$h(Y)$ = { 0.721 3% }
+
$h(Y) \ = \ $ { 0.721 3% } $\ \rm bit$
  
{Bestimmen Sie den WDF&ndash;Parameter <i>A</i>, so dass <i>h</i>(<i>Z</i>) = <i>h</i>(<i>A</i> &middot; <i>Y</i>) = 1 bit gilt.
+
{Determine the PDF parameter&nbsp; $A$&nbsp; such that&nbsp; $\underline{h(Z) = h (A \cdot Y) = 1 \ \rm bit}$&nbsp;.
 
|type="{}"}
 
|type="{}"}
$ h(Z) = 1 bit:  A$ = { 1.213 3% }
+
$A\ = $ { 1.213 3% }
  
  
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
<b>a)</b>&nbsp;&nbsp;Für die Wahrscheinlichkeitsdichtefunktion gilt im Bereich 0 &#8804; <i>X</i> &#8804; 1 vereinbarungsgemäß:
+
'''(1)'''&nbsp; For the probability density function, in the range&nbsp; $0 \le X \le 1$&nbsp;, it is agreed that:
$$f_X(x) = 2x = C \cdot x
+
:$$f_X(x) = 2x = C \cdot x
\hspace{0.05cm}.$$
+
\hspace{0.05cm}.$$  
 
+
*Here we have replaced&nbsp; "2"&nbsp; by&nbsp; $C$&nbsp; &nbsp; &#8658; &nbsp; generalization in order to be able to use the following calculation again in subtask&nbsp; $(3)$&nbsp;.
Wir haben hierbei &bdquo;2&rdquo; durch <i>C</i> ersetzt &#8658; Verallgemeinerung, um in der Teilaufgabe (c) die nachfolgende Berechnung nochmals nutzen zu können.
 
  
Da die differentielle Entropie in &bdquo;nat&rdquo; gesucht ist, verwenden wir den natürlichen Logarithmus. Mit der Substitution <i>&xi;</i> = <i>C</i> &middot; <i>x</i> erhalten wir folgendes Integral:
+
*Since the differential entropy is sought in&nbsp; "nat",&nbsp; we use the natural logarithm.&nbsp; With the substitution&nbsp; $\xi = C \cdot x$&nbsp; we obtain:
$$h_{\rm nat}(X) \hspace{-0.15cm}  = \hspace{-0.15cm} \hspace{0.1cm} - \int_{0}^{1} \hspace{0.1cm}  C \cdot x \cdot {\rm ln} \hspace{0.1cm} [ C \cdot x ] \hspace{0.1cm}{\rm d}x =  
+
:$$h_{\rm nat}(X) = \hspace{0.1cm} - \int_{0}^{1} \hspace{0.1cm}  C \cdot x \cdot {\rm ln} \hspace{0.1cm} \big[ C \cdot x \big] \hspace{0.1cm}{\rm d}x =  
\hspace{0.1cm} - \hspace{0.1cm}\frac{1}{C} \cdot \int_{0}^{C} \hspace{0.1cm}  \xi \cdot {\rm ln} \hspace{0.1cm} [ \xi ] \hspace{0.1cm}{\rm d}\xi $$ $$\
+
\hspace{0.1cm} - \hspace{0.1cm}\frac{1}{C} \cdot \int_{0}^{C} \hspace{0.1cm}  \xi \cdot {\rm ln} \hspace{0.1cm} [ \xi ] \hspace{0.1cm}{\rm d}\xi  
   =  \hspace{-0.15cm} - \hspace{0.1cm}\frac{\xi^2}{C} \cdot   
+
   =  - \hspace{0.1cm}\frac{\xi^2}{C} \cdot   
 
\left [ \frac{{\rm ln} \hspace{0.1cm} (\xi)}{2} -  
 
\left [ \frac{{\rm ln} \hspace{0.1cm} (\xi)}{2} -  
 
\frac{1}{4}\right ]_{\xi = 0}^{\xi = C}  
 
\frac{1}{4}\right ]_{\xi = 0}^{\xi = C}  
 
\hspace{0.05cm}$$
 
\hspace{0.05cm}$$
Hierbei wurde das vorne angegebene unbestimmte Integral benutzt. Nach Einsetzen der Grenzen erhält man hieraus unter Berücksichtigung von <i>C</i> = 2:
+
*Here the indefinite integral given in the front was used.&nbsp; After inserting the limits, considering&nbsp; $C=2$,&nbsp; we obtain::
$$h_{\rm nat}(X) \hspace{-0.15cm}  = \hspace{-0.15cm}
+
:$$h_{\rm nat}(X) =
 
- C/2 \cdot   
 
- C/2 \cdot   
\left [ {\rm ln} \hspace{0.1cm} (C) - 1/2
+
\big [ {\rm ln} \hspace{0.1cm} (C) - 1/2
\right ]
+
\big ]
 
  = - {\rm ln} \hspace{0.1cm} (2) + 1/2 =
 
  = - {\rm ln} \hspace{0.1cm} (2) + 1/2 =
 
- {\rm ln} \hspace{0.1cm} (2)
 
- {\rm ln} \hspace{0.1cm} (2)
  + 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) =\\
+
  + 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e})  
   =  {\rm ln} \hspace{0.1cm} (\sqrt{\rm e}/2)\hspace{0.05cm} = {\rm ln} \hspace{0.1cm} (0.824) = - 0.193
+
   =  {\rm ln} \hspace{0.1cm} (\sqrt{\rm e}/2)\hspace{0.05cm} = - 0.193
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}
 
h(X)   
 
h(X)   
Line 75: Line 93:
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
<b>b)</b>&nbsp;&nbsp;Allgemein gilt:
+
 
$$h_{\rm bit}(X) = \frac{h_{\rm nat}(X)}{{\rm ln} \hspace{0.1cm} (2)\,{\rm nat/bit}} = - 0.279
+
 
 +
'''(2)'''&nbsp; In general:
 +
[[File:P_ID2866__Inf_A_4_2c.png|right|frame|To calculate&nbsp; $h(Y)$]]
 +
 
 +
:$$h_{\rm bit}(X) = \frac{h_{\rm nat}(X)}{{\rm ln} \hspace{0.1cm} (2)\,{\rm nat/bit}} = - 0.279
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}
 
h(X)  
 
h(X)  
 
\hspace{0.15cm}\underline {= - 0.279\,{\rm bit}}  
 
\hspace{0.15cm}\underline {= - 0.279\,{\rm bit}}  
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
Diese Umrechnung kann man sich sparen, wenn man bereits im analytischen Ergebnis der Teilaufgabe '''a)''' direkt &bdquo;ln&rdquo; durch &bdquo;log<sub>2</sub>&rdquo; ersetzt:
+
*You can save this conversion if you directly replace&nbsp; $(1)$&nbsp; direct&nbsp; "ln"&nbsp; by&nbsp; "log<sub>2</sub>"&nbsp; already in the analytical result of subtask:
$$h(X) = \  {\rm log}_2 \hspace{0.1cm} (\sqrt{\rm e}/2)\hspace{0.05cm}, \hspace{1.3cm}
+
 
{\rm Pseudo-Einheit\hspace{-0.1cm}:\hspace{0.15cm} bit}  
+
:$$h(X) = \  {\rm log}_2 \hspace{0.1cm} (\sqrt{\rm e}/2)\hspace{0.05cm}, \hspace{1.3cm}
 +
{\rm pseudo-unit\hspace{-0.1cm}:\hspace{0.15cm} bit}  
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
[[File:P_ID2866__Inf_A_4_2c.png|right|]]
+
 
<b>c)</b>&nbsp;&nbsp;Wir verwenden wieder den natürlichen Logarithmus und teilen das Integral in zwei Teilintegrale auf:
+
 
$$h(Y) =  
+
'''(3)'''&nbsp; We again use the natural logarithm and divide the integral into two partial integrals:
 +
:$$h(Y) =  
 
\hspace{0.1cm} - \hspace{-0.45cm} \int\limits_{{\rm supp}
 
\hspace{0.1cm} - \hspace{-0.45cm} \int\limits_{{\rm supp}
  \hspace{0.03cm}( \hspace{-0.03cm}f_Y)} \hspace{-0.35cm}  f_Y(y) \cdot {\rm ln} \hspace{0.1cm} [ f_Y(y) ] \hspace{0.1cm}{\rm d}y = I_{\rm neg} + I_{\rm pos}  
+
  \hspace{0.03cm}( \hspace{-0.03cm}f_Y)} \hspace{-0.35cm}  f_Y(y) \cdot {\rm ln} \hspace{0.1cm} \big[ f_Y(y) \big] \hspace{0.1cm}{\rm d}y = I_{\rm neg} + I_{\rm pos}  
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Das erste Integral (Bereich &ndash;1 &#8804; <i>y</i> &#8804; 0) ist formgleich mit dem der Teilaufgabe (a) und gegenüber diesem nur verschoben, was das Ergebnis nicht beeinflusst. Zu berücksichtigen ist nun die Höhe <i>C</i> = 1 anstelle von <i>C</i> = 2:
+
*The first integral for the range&nbsp; $-1 \le y \le 0$&nbsp; is identical in form to that of subtask&nbsp; $(1)$&nbsp; and only shifted with respect to it, which does not affect the result.
$$I_{\rm neg} =- C/2 \cdot   
+
*Now the height&nbsp; $C = 1$&nbsp; instead of&nbsp; $C = 2$&nbsp; has to be considered:
\left [ {\rm ln} \hspace{0.1cm} (C) - 1/2
+
:$$I_{\rm neg} =- C/2 \cdot   
\right ] = -1/2 \cdot   
+
\big [ {\rm ln} \hspace{0.1cm} (C) - 1/2
\left [ {\rm ln} \hspace{0.1cm} (1) - 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) \right ]= 1/4 \cdot  
+
\big ] = -1/2 \cdot   
 +
\big [ {\rm ln} \hspace{0.1cm} (1) - 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) \big ]= 1/4 \cdot  
 
{\rm ln} \hspace{0.1cm} ({\rm e})   
 
{\rm ln} \hspace{0.1cm} ({\rm e})   
 
\hspace{0.05cm}.$$
 
\hspace{0.05cm}.$$
  
Der zweite Integrand ist bis auf eine Verschiebung und Spiegelung identisch mit dem ersten. Außerdem überlappen sich die Integrationsintervalle nicht &nbsp;&#8658;&nbsp; <i>I</i><sub>pos</sub> = <i>I</i><sub>neg</sub>:
+
*The second integrand is identical to the first except for a shift and reflection.&nbsp; Moreover, the integration intervals do not overlap &nbsp; &#8658; &nbsp; $I_{\rm pos} = I_{\rm neg}$:
$$h_{\rm nat}(Y)  = 2 \cdot I_{\rm neg} =  1/2 \cdot  
+
:$$h_{\rm nat}(Y)  = 2 \cdot I_{\rm neg} =  1/2 \cdot  
{\rm ln} \hspace{0.1cm} ({\rm e}) = {\rm ln} \hspace{0.1cm} (\sqrt{\rm e}) $$
+
{\rm ln} \hspace{0.1cm} ({\rm e}) = {\rm ln} \hspace{0.1cm} (\sqrt{\rm e}) \hspace{0.3cm}
$$\Rightarrow\hspace{0.3cm}h_{\rm bit}(Y)  = {\rm log}_2 \hspace{0.1cm} (\sqrt{\rm e})  
+
\Rightarrow\hspace{0.3cm}h_{\rm bit}(Y)  = {\rm log}_2 \hspace{0.1cm} (\sqrt{\rm e})  
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}  
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}  
 
h(Y)  = {\rm log}_2 \hspace{0.1cm} (1.649)\hspace{0.15cm}\underline {= 0.721\,{\rm bit}}\hspace{0.05cm}.$$
 
h(Y)  = {\rm log}_2 \hspace{0.1cm} (1.649)\hspace{0.15cm}\underline {= 0.721\,{\rm bit}}\hspace{0.05cm}.$$
  
<b>d)</b>&nbsp;&nbsp;Für die differentielle Entropie der Zufallsgröße <i>Z</i> = <i>A</i> &middot; <i>Y</i> gilt allgemein:
+
 
$$h(Z)  = h(A \cdot Y)  = h(Y) + {\rm log}_2 \hspace{0.1cm} (A) \hspace{0.05cm}.$$
+
 
Aus der Forderung <i>h</i>(<i>Z</i>) = 1 bit und dem Ergebnis der Teilaufgabe (c) folgt somit:
+
'''(4)'''&nbsp; For the differential entropy of the random variable&nbsp; $Z = A \cdot Y$&nbsp; holds in general:
$${\rm log}_2 \hspace{0.1cm} (A) = 1\,{\rm bit} - 0.721 \,{\rm bit} = 0.279 \,{\rm bit}
+
:$$h(Z)  = h(A \cdot Y)  = h(Y) + {\rm log}_2 \hspace{0.1cm} (A) \hspace{0.05cm}.$$
 +
*Thus, from the requiremen&nbsp; $h(Z) = 1 \ \rm bit$&nbsp; and the result of subtask&nbsp; $(3)$&nbsp; follows:
 +
:$${\rm log}_2 \hspace{0.1cm} (A) = 1\,{\rm bit} - 0.721 \,{\rm bit} = 0.279 \,{\rm bit}
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm} A = 2^{0.279}\hspace{0.15cm}\underline
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm} A = 2^{0.279}\hspace{0.15cm}\underline
 
  {= 1.213}  
 
  {= 1.213}  
Line 119: Line 146:
  
  
[[Category:Aufgaben zu Informationstheorie|^4.02 Differentielle Entropie^]]
+
[[Category:Information Theory: Exercises|^4.1 Differential Entropy^]]

Latest revision as of 09:27, 11 October 2021

Two triangular PDFs

Two probability density functions  $\rm (PDF)$  with triangular shapes are considered.

  • The random variable  $X$  is limited to the range from  $0$  to  $1$ ,  and it holds for the PDF (upper sketch):
$$f_X(x) = \left\{ \begin{array}{c} 2x \\ 0 \\ \end{array} \right. \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \hspace{0.1cm} 0 \le x \le 1 \\ {\rm else} \\ \end{array} \hspace{0.05cm}.$$
  • According to the lower sketch, the random variable  $Y$  has the following PDF:
$$f_Y(y) = \left\{ \begin{array}{c} 1 - |\hspace{0.03cm}y\hspace{0.03cm}| \\ 0 \\ \end{array} \right. \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \hspace{0.1cm} |\hspace{0.03cm}y\hspace{0.03cm}| \le 1 \\ {\rm else} \\ \end{array} \hspace{0.05cm}.$$

For both random variables, the  differential entropy  is to be determined in each case.

For example, the corresponding equation for the random variable  $X$  is:

$$h(X) = \hspace{0.1cm} - \hspace{-0.45cm} \int\limits_{{\rm supp}\hspace{0.03cm}(\hspace{-0.03cm}f_X)} \hspace{-0.35cm} f_X(x) \cdot {\rm log} \hspace{0.1cm} \big [ f_X(x) \big ] \hspace{0.1cm}{\rm d}x \hspace{0.6cm}{\rm with}\hspace{0.6cm} {\rm supp}(f_X) = \{ x\text{:} \ f_X(x) > 0 \} \hspace{0.05cm}.$$
  • If the  "natural logarithm",  the pseudo-unit  "nat"  must be added.
  • If, on the other hand, the result is asked in  "bit"  then the  "dual logarithm"   ⇒   "$\log_2$"  is to be used.


In the fourth subtask, the new random variable  $Z = A \cdot Y$  is considered. Here,  the PDF parameter  $A$  is to be determined in such a way that the differential entropy of the new random variable  $Z$  yields exactly  $1$  bit :

$$h(Z) = h (A \cdot Y) = h (Y) + {\rm log}_2 \hspace{0.1cm} (A) = 1\ {\rm bit} \hspace{0.05cm}.$$





Hints:

  • The task belongs to the chapter  Differential Entropy.
  • Useful hints for solving this task and further information on continuous random variables can be found in the third chapter "Continuous Random Variables" of the book  Theory of Stochastic Signals.
  • Given the following indefinite integral:
$$\int \xi \cdot {\rm ln} \hspace{0.1cm} (\xi)\hspace{0.1cm}{\rm d}\xi = \xi^2 \cdot \big [1/2 \cdot {{\rm ln} \hspace{0.1cm} (\xi)} - {1}/{4}\big ] \hspace{0.05cm}.$$


Questions

1

Calculate the differential entropy of the random variable  $X$  in  "nat".

$h(X) \ = \ $

$\ \rm nat$

2

What result is obtained with the pseudo-unit  "bit"?

$h(X) \ = \ $

$\ \rm bit$

3

Calculate the differential entropy of the random variable  $Y$.

$h(Y) \ = \ $

$\ \rm bit$

4

Determine the PDF parameter  $A$  such that  $\underline{h(Z) = h (A \cdot Y) = 1 \ \rm bit}$ .

$A\ = $


Solution

(1)  For the probability density function, in the range  $0 \le X \le 1$ , it is agreed that:

$$f_X(x) = 2x = C \cdot x \hspace{0.05cm}.$$
  • Here we have replaced  "2"  by  $C$    ⇒   generalization in order to be able to use the following calculation again in subtask  $(3)$ .
  • Since the differential entropy is sought in  "nat",  we use the natural logarithm.  With the substitution  $\xi = C \cdot x$  we obtain:
$$h_{\rm nat}(X) = \hspace{0.1cm} - \int_{0}^{1} \hspace{0.1cm} C \cdot x \cdot {\rm ln} \hspace{0.1cm} \big[ C \cdot x \big] \hspace{0.1cm}{\rm d}x = \hspace{0.1cm} - \hspace{0.1cm}\frac{1}{C} \cdot \int_{0}^{C} \hspace{0.1cm} \xi \cdot {\rm ln} \hspace{0.1cm} [ \xi ] \hspace{0.1cm}{\rm d}\xi = - \hspace{0.1cm}\frac{\xi^2}{C} \cdot \left [ \frac{{\rm ln} \hspace{0.1cm} (\xi)}{2} - \frac{1}{4}\right ]_{\xi = 0}^{\xi = C} \hspace{0.05cm}$$
  • Here the indefinite integral given in the front was used.  After inserting the limits, considering  $C=2$,  we obtain::
$$h_{\rm nat}(X) = - C/2 \cdot \big [ {\rm ln} \hspace{0.1cm} (C) - 1/2 \big ] = - {\rm ln} \hspace{0.1cm} (2) + 1/2 = - {\rm ln} \hspace{0.1cm} (2) + 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) = {\rm ln} \hspace{0.1cm} (\sqrt{\rm e}/2)\hspace{0.05cm} = - 0.193 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} h(X) \hspace{0.15cm}\underline {= - 0.193\,{\rm nat}} \hspace{0.05cm}.$$


(2)  In general:

To calculate  $h(Y)$
$$h_{\rm bit}(X) = \frac{h_{\rm nat}(X)}{{\rm ln} \hspace{0.1cm} (2)\,{\rm nat/bit}} = - 0.279 \hspace{0.3cm} \Rightarrow\hspace{0.3cm} h(X) \hspace{0.15cm}\underline {= - 0.279\,{\rm bit}} \hspace{0.05cm}.$$
  • You can save this conversion if you directly replace  $(1)$  direct  "ln"  by  "log2"  already in the analytical result of subtask:
$$h(X) = \ {\rm log}_2 \hspace{0.1cm} (\sqrt{\rm e}/2)\hspace{0.05cm}, \hspace{1.3cm} {\rm pseudo-unit\hspace{-0.1cm}:\hspace{0.15cm} bit} \hspace{0.05cm}.$$


(3)  We again use the natural logarithm and divide the integral into two partial integrals:

$$h(Y) = \hspace{0.1cm} - \hspace{-0.45cm} \int\limits_{{\rm supp} \hspace{0.03cm}( \hspace{-0.03cm}f_Y)} \hspace{-0.35cm} f_Y(y) \cdot {\rm ln} \hspace{0.1cm} \big[ f_Y(y) \big] \hspace{0.1cm}{\rm d}y = I_{\rm neg} + I_{\rm pos} \hspace{0.05cm}.$$
  • The first integral for the range  $-1 \le y \le 0$  is identical in form to that of subtask  $(1)$  and only shifted with respect to it, which does not affect the result.
  • Now the height  $C = 1$  instead of  $C = 2$  has to be considered:
$$I_{\rm neg} =- C/2 \cdot \big [ {\rm ln} \hspace{0.1cm} (C) - 1/2 \big ] = -1/2 \cdot \big [ {\rm ln} \hspace{0.1cm} (1) - 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) \big ]= 1/4 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) \hspace{0.05cm}.$$
  • The second integrand is identical to the first except for a shift and reflection.  Moreover, the integration intervals do not overlap   ⇒   $I_{\rm pos} = I_{\rm neg}$:
$$h_{\rm nat}(Y) = 2 \cdot I_{\rm neg} = 1/2 \cdot {\rm ln} \hspace{0.1cm} ({\rm e}) = {\rm ln} \hspace{0.1cm} (\sqrt{\rm e}) \hspace{0.3cm} \Rightarrow\hspace{0.3cm}h_{\rm bit}(Y) = {\rm log}_2 \hspace{0.1cm} (\sqrt{\rm e}) \hspace{0.3cm} \Rightarrow\hspace{0.3cm} h(Y) = {\rm log}_2 \hspace{0.1cm} (1.649)\hspace{0.15cm}\underline {= 0.721\,{\rm bit}}\hspace{0.05cm}.$$


(4)  For the differential entropy of the random variable  $Z = A \cdot Y$  holds in general:

$$h(Z) = h(A \cdot Y) = h(Y) + {\rm log}_2 \hspace{0.1cm} (A) \hspace{0.05cm}.$$
  • Thus, from the requiremen  $h(Z) = 1 \ \rm bit$  and the result of subtask  $(3)$  follows:
$${\rm log}_2 \hspace{0.1cm} (A) = 1\,{\rm bit} - 0.721 \,{\rm bit} = 0.279 \,{\rm bit} \hspace{0.3cm} \Rightarrow\hspace{0.3cm} A = 2^{0.279}\hspace{0.15cm}\underline {= 1.213} \hspace{0.05cm}.$$