Difference between revisions of "Aufgaben:Exercise 3.8Z: Tuples from Ternary Random Variables"

From LNTwww
m (Text replacement - "”" to """)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Informationstheorie/Verschiedene Entropien zweidimensionaler Zufallsgrößen
+
{{quiz-Header|Buchseite=Information_Theory/Different_Entropy_Measures_of_Two-Dimensional_Random_Variables
  
 
}}
 
}}
  
[[File:P_ID2771__Inf_Z_3_7.png|right|frame|"Wahrscheinlichkeiten" der Zufallsgröße  $XY$]]
+
[[File:P_ID2771__Inf_Z_3_7.png|right|2D random variable  $XY$]]
Wir betrachten das Tupel  $Z = (X, Y)$,  wobei die Einzelkomponenten  $X$  und  $Y$  jeweils ternäre Zufallsgrößen darstellen   ⇒    Symbolumfang  $|X| = |Y| = 3$.  Die gemeinsame Wahrscheinlichkeitsfunktion  $P_{ XY }(X, Y)$  ist rechts skizziert.
+
We consider the tuple  $Z = (X, Y)$,  where the individual components  $X$  and  $Y$  each represent ternary random variables   ⇒    symbol set size  $|X| = |Y| = 3$.  The joint probability function  $P_{ XY }(X, Y)$  is sketched on the right.
  
In dieser Aufgabe sind zu berechnen:  
+
In this exercise, the following entropies are to be calculated:  
* die ''Verbundentropie''  $H(XY)$  und die ''Transinformation''  $I(X; Y)$,
+
* the  "joint entropy"  $H(XY)$  and the  "mutual information"  $I(X; Y)$,
* die ''Verbundentropie''  $H(XZ)$  und die ''Transinformation''  $I(X; Z)$,
+
* the  "joint entropy"  $H(XZ)$  and the  "mutual information"  $I(X; Z)$,
*die beiden ''bedingten Entropien''  $H(Z|X)$  und  $H(X|Z)$.
+
* the two  "conditional entropies"  $H(Z|X)$  and  $H(X|Z)$.
  
  
Line 19: Line 19:
  
  
''Hinweise:''
+
Hints:
*Die Aufgabe gehört zum  Kapitel  [[Information_Theory/Verschiedene_Entropien_zweidimensionaler_Zufallsgrößen|Verschiedene Entropien zweidimensionaler Zufallsgrößen]].
+
*The exercise belongs to the chapter  [[Information_Theory/Verschiedene_Entropien_zweidimensionaler_Zufallsgrößen|Different entropies of two-dimensional random variables]].
*Insbesondere wird Bezug genommen auf die Seiten&nbsp; <br> &nbsp; &nbsp; [[Information_Theory/Verschiedene_Entropien_zweidimensionaler_Zufallsgrößen#Bedingte_Wahrscheinlichkeit_und_bedingte_Entropie|Bedingte Wahrscheinlichkeit und bedingte Entropie]] &nbsp; sowie <br> &nbsp; &nbsp;[[Information_Theory/Verschiedene_Entropien_zweidimensionaler_Zufallsgrößen#Transinformation_zwischen_zwei_Zufallsgr.C3.B6.C3.9Fen|Transinformation zwischen zwei Zufallsgrößen]].
+
*In particular, reference is made to the pages&nbsp; <br> &nbsp; &nbsp; [[Information_Theory/Verschiedene_Entropien_zweidimensionaler_Zufallsgrößen#Conditional_probability_and_conditional_entropy|Conditional probability and conditional entropy]] &nbsp; as well as <br> &nbsp; &nbsp;[[Information_Theory/Verschiedene_Entropien_zweidimensionaler_Zufallsgrößen#Mutual_information_between_two_random_variables|Mutual information between two random variables]].
 
   
 
   
  
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Berechnen Sie die folgenden Entropien.
+
{Calculate the following entropies.
 
|type="{}"}
 
|type="{}"}
 
$H(X)\ = \ $  { 1.585 3% } $\ \rm bit$
 
$H(X)\ = \ $  { 1.585 3% } $\ \rm bit$
Line 35: Line 35:
 
$ H(XY)\ = \ $ { 3.17 3% } $\ \rm bit$
 
$ H(XY)\ = \ $ { 3.17 3% } $\ \rm bit$
  
{Welche Transinformation besteht zwischen den Zufallsgrößen&nbsp; $X$&nbsp; und&nbsp; $Y$?
+
{What is the mutual information between the random variables&nbsp; $X$&nbsp; and&nbsp; $Y$?
 
|type="{}"}
 
|type="{}"}
 
$I(X; Y)\ = \ $ { 0. } $\ \rm bit$
 
$I(X; Y)\ = \ $ { 0. } $\ \rm bit$
  
{Welche Transinformation besteht zwischen den Zufallsgrößen&nbsp; $X$&nbsp; und&nbsp; $Z$?
+
{What is the mutual information between the random variables&nbsp; $X$&nbsp; and&nbsp; $Z$?
 
|type="{}"}
 
|type="{}"}
 
$I(X; Z)\ = \ $ { 1.585 3% } $\ \rm bit$
 
$I(X; Z)\ = \ $ { 1.585 3% } $\ \rm bit$
  
{Welche bedingten Entropien bestehen zwischen&nbsp; $X$&nbsp; und&nbsp; $Z$?
+
{What conditional entropies exist between&nbsp; $X$&nbsp; and&nbsp; $Z$?
 
|type="{}"}
 
|type="{}"}
 
$H(Z|X)\ = \ $ { 1.585 3% } $\ \rm bit$
 
$H(Z|X)\ = \ $ { 1.585 3% } $\ \rm bit$
Line 52: Line 52:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp;  Bei den Zufallsgrößen&nbsp; $X =\{0,\ 1,\ 2\}$ &nbsp; &rArr; &nbsp; $|X| = 3$&nbsp; und&nbsp; $Y = \{0,\ 1,\ 2\}$ &nbsp; &rArr; &nbsp; $|Y| = 3$&nbsp; liegt jeweils eine Gleichverteilung vor.&nbsp;  
+
'''(1)'''&nbsp;  For the random variables&nbsp; $X =\{0,\ 1,\ 2\}$ &nbsp; &rArr; &nbsp; $|X| = 3$&nbsp; and&nbsp; $Y = \{0,\ 1,\ 2\}$ &nbsp; &rArr; &nbsp; $|Y| = 3$&nbsp; there is a uniform distribution in each case.&nbsp;  
*Damit erhält man für die Entropien:
+
*Thus one obtains for the entropies:
  
 
:$$H(X) =  {\rm log}_2 \hspace{0.1cm} (3)  
 
:$$H(X) =  {\rm log}_2 \hspace{0.1cm} (3)  
Line 62: Line 62:
 
\hspace{0.15cm}\underline{= 1.585\,{\rm (bit)}}\hspace{0.05cm}.$$
 
\hspace{0.15cm}\underline{= 1.585\,{\rm (bit)}}\hspace{0.05cm}.$$
  
*Die 2D–Zufallsgröße&nbsp; $XY = \{00,\ 01,\ 02,\ 10,\ 11,\ 12,\ 20,\ 21,\ 22\}$  &nbsp; &rArr; &nbsp;  $|XY| = |Z| = 9$&nbsp; weist ebenfalls gleiche Wahrscheinlichkeiten auf:  
+
*The two-dimensional random variable&nbsp; $XY = \{00,\ 01,\ 02,\ 10,\ 11,\ 12,\ 20,\ 21,\ 22\}$  &nbsp; &rArr; &nbsp;  $|XY| = |Z| = 9$&nbsp; has also equal probabilities:  
 
:$$p_{ 00 } = p_{ 01 } =\text{...} = p_{ 22 } = 1/9.$$  
 
:$$p_{ 00 } = p_{ 01 } =\text{...} = p_{ 22 } = 1/9.$$  
*Daraus folgt:
+
*From this follows:
 
:$$H(XY) =  {\rm log}_2 \hspace{0.1cm} (9) \hspace{0.15cm}\underline{= 3.170\,{\rm (bit)}} \hspace{0.05cm}.$$
 
:$$H(XY) =  {\rm log}_2 \hspace{0.1cm} (9) \hspace{0.15cm}\underline{= 3.170\,{\rm (bit)}} \hspace{0.05cm}.$$
  
  
  
'''(2)'''&nbsp;  Die Zufallsgrößen&nbsp; $X$&nbsp; und&nbsp; $Y$&nbsp; sind wegen&nbsp; $P_{ XY }(⋅) = P_X(⋅) · P_Y(⋅)$&nbsp; statistisch unabhängig.
+
'''(2)'''&nbsp;  The random variables&nbsp; $X$&nbsp; and&nbsp; $Y$&nbsp; are statistically independent because of&nbsp; $P_{ XY }(⋅) = P_X(⋅) · P_Y(⋅)$&nbsp;.
*Daraus folgt&nbsp;  $I(X, Y)\hspace{0.15cm}\underline{ = 0}$.  
+
*From this follows&nbsp;  $I(X, Y)\hspace{0.15cm}\underline{ = 0}$.  
*Zum gleichen Ergebnis kommt man über die Gleichung&nbsp; $I(X; Y) = H(X) + H(Y) H(XY)$.
+
*The same result is obtained by the equation&nbsp; $I(X; Y) = H(X) + H(Y) - H(XY)$.
  
  
  
 +
[[File:P_ID2774__Inf_Z_3_7c.png|right|frame|Probability mass function of the random variable&nbsp; $XZ$]]
  
'''(3)'''&nbsp;  Interpretiert man&nbsp; $I(X; Z)$&nbsp; als die verbleibende Unsicherheit hinsichtlich des Tupels&nbsp; $Z$, wenn die erste Komponente&nbsp; $X$&nbsp; bekannt ist, so gilt offensichtlich
+
'''(3)'''&nbsp;  If one interprets&nbsp; $I(X; Z)$&nbsp; as the remaining uncertainty with regard to the tuple&nbsp; $Z$,&nbsp; when the first component&nbsp; $X$&nbsp; is known,&nbsp; then the following obviously applies:
[[File:P_ID2774__Inf_Z_3_7c.png|right|frame|Wahrscheinlichkeitsfunktion der 2D-Zufallsgröße&nbsp; $XZ$]]
 
 
:$$ I(X; Z) = H(Y)\hspace{0.15cm}\underline{  = 1.585 \ \rm bit}.$$
 
:$$ I(X; Z) = H(Y)\hspace{0.15cm}\underline{  = 1.585 \ \rm bit}.$$
  
Rein formal lässt sich diese Aufgabe auch wie folgt lösen:  
+
In purely formal terms, this task can also be solved as follows:
* Die Entropie&nbsp; $H(Z)$&nbsp; ist gleich der Verbundentropie&nbsp; $H(XY) = 3.170 \ \rm bit$.
+
* The entropy&nbsp; $H(Z)$&nbsp; is equal to the joint entropy&nbsp; $H(XY) = 3.17 \ \rm bit$.
* Die Verbundwahrscheinlichkeit&nbsp; $P_{ XZ }(X, Z)$&nbsp; beinhaltet neun Elemente der Wahrscheinlichkeit&nbsp; $1/9$,&nbsp; alle anderen sind mit Nullen belegt &nbsp; &rArr; &nbsp;  $H(XZ) = \log_2 (9) = 3.170 \ \rm bit $.
+
* The joint probability&nbsp; $P_{ XZ }(X, Z)$&nbsp; contains nine elements of probability&nbsp; $1/9$,&nbsp; all others are occupied by zeros &nbsp; &rArr; &nbsp;  $H(XZ) = \log_2 (9) = 3.170 \ \rm bit $.
* Damit gilt für die Transinformation&nbsp; $($gemeinsame Information der Zufallsgrößen&nbsp; $X$&nbsp; und&nbsp; $Z)$:
+
* Thus, the following applies to the mutual information of the random variables&nbsp; $X$&nbsp; and&nbsp; $Z$:
 
:$$I(X;Z) = H(X) + H(Z) - H(XZ) = 1.585 + 3.170- 3.170\hspace{0.15cm} \underline {= 1.585\,{\rm (bit)}} \hspace{0.05cm}.$$
 
:$$I(X;Z) = H(X) + H(Z) - H(XZ) = 1.585 + 3.170- 3.170\hspace{0.15cm} \underline {= 1.585\,{\rm (bit)}} \hspace{0.05cm}.$$
  
  
[[File:P_ID2773__Inf_Z_3_7d.png|right|frame|Entropien der 2D-Zufallsgröße&nbsp; $XZ$]]
+
[[File:P_ID2773__Inf_Z_3_7d.png|right|frame|Entropies of the 2D variable&nbsp; $XZ$]]
 
+
'''(4)'''&nbsp;  According to the second graph:
'''(4)'''&nbsp;  Entsprechend der zweiten Grafik gilt:  
 
 
:$$H(Z \hspace{-0.1cm}\mid \hspace{-0.1cm} X) = H(XZ) - H(X) = 3.170-1.585\hspace{0.15cm} \underline {=1.585\ {\rm (bit)}} \hspace{0.05cm},$$
 
:$$H(Z \hspace{-0.1cm}\mid \hspace{-0.1cm} X) = H(XZ) - H(X) = 3.170-1.585\hspace{0.15cm} \underline {=1.585\ {\rm (bit)}} \hspace{0.05cm},$$
 
:$$H(X \hspace{-0.1cm}\mid \hspace{-0.1cm} Z)  = H(XZ) - H(Z) = 3.170-3.170\hspace{0.15cm} \underline {=0\ {\rm (bit)}}  \hspace{0.05cm}.$$
 
:$$H(X \hspace{-0.1cm}\mid \hspace{-0.1cm} Z)  = H(XZ) - H(Z) = 3.170-3.170\hspace{0.15cm} \underline {=0\ {\rm (bit)}}  \hspace{0.05cm}.$$
  
* $H(Z|X)$&nbsp; gibt die Restunsicherheit hinsichtlich des Tupels&nbsp; $Z$ an, wenn man die erste Komponente&nbsp; $X$&nbsp; kennt.  
+
* $H(Z|X)$&nbsp; gives the residual uncertainty with respect to the tuple&nbsp; $Z$,&nbsp; when the first componen&nbsp; $X$&nbsp; is known.
*Die Unsicherheit hinsichtlich des Tupels&nbsp; $Z$&nbsp; ist $H(Z) = 2 · \log_2 (3) \ \rm bit$.
+
* The uncertainty regarding the tuple&nbsp; $Z$&nbsp; is&nbsp; $H(Z) = 2 · \log_2 (3) \ \rm bit$.
* Bei Kenntnis der Komponente&nbsp; $X$&nbsp; halbiert sich die Unsicherheit auf&nbsp; $H(Z|X) = \log_2 (3)\ \rm  bit$.
+
* When the component&nbsp; $X$&nbsp; is known, the uncertainty is halved to&nbsp; $H(Z|X) = \log_2 (3)\ \rm  bit$.
* $H(X|Z)$&nbsp; gibt die verbleibende Unsicherheit hinsichtlich der Komponente&nbsp; $X$&nbsp; an, wenn man das Tupel&nbsp; $Z = (X, Y)$&nbsp; kennt.&nbsp;  
+
* $H(X|Z)$&nbsp; gives the remaining uncertainty with respect to component&nbsp; $X$,&nbsp; when the tuple&nbsp; $Z = (X, Y)$&nbsp; is known.&nbsp;  
*Diese Unsicherheit ist natürlich Null: &nbsp; Kennt man&nbsp; $Z$, so kennt man auch&nbsp; $X$.
+
* This uncertainty is of course zero: &nbsp; If one knows&nbsp; $Z$, one also knows&nbsp; $X$.
  
 
{{ML-Fuß}}
 
{{ML-Fuß}}
Line 103: Line 102:
  
  
[[Category:Information Theory: Exercises|^3.2 Entropien von 2D-Zufallsgrößen^]]
+
[[Category:Information Theory: Exercises|^3.2 Entropies of 2D Random Variables^]]

Latest revision as of 10:16, 24 September 2021

2D random variable  '"`UNIQ-MathJax29-QINU`"'

We consider the tuple  $Z = (X, Y)$,  where the individual components  $X$  and  $Y$  each represent ternary random variables   ⇒   symbol set size  $|X| = |Y| = 3$.  The joint probability function  $P_{ XY }(X, Y)$  is sketched on the right.

In this exercise, the following entropies are to be calculated:

  • the  "joint entropy"  $H(XY)$  and the  "mutual information"  $I(X; Y)$,
  • the  "joint entropy"  $H(XZ)$  and the  "mutual information"  $I(X; Z)$,
  • the two  "conditional entropies"  $H(Z|X)$  and  $H(X|Z)$.





Hints:



Questions

1

Calculate the following entropies.

$H(X)\ = \ $

$\ \rm bit$
$H(Y)\ = \ $

$\ \rm bit$
$ H(XY)\ = \ $

$\ \rm bit$

2

What is the mutual information between the random variables  $X$  and  $Y$?

$I(X; Y)\ = \ $

$\ \rm bit$

3

What is the mutual information between the random variables  $X$  and  $Z$?

$I(X; Z)\ = \ $

$\ \rm bit$

4

What conditional entropies exist between  $X$  and  $Z$?

$H(Z|X)\ = \ $

$\ \rm bit$
$ H(X|Z)\ = \ $

$\ \rm bit$


Solution

(1)  For the random variables  $X =\{0,\ 1,\ 2\}$   ⇒   $|X| = 3$  and  $Y = \{0,\ 1,\ 2\}$   ⇒   $|Y| = 3$  there is a uniform distribution in each case. 

  • Thus one obtains for the entropies:
$$H(X) = {\rm log}_2 \hspace{0.1cm} (3) \hspace{0.15cm}\underline{= 1.585\,{\rm (bit)}} \hspace{0.05cm},$$
$$H(Y) = {\rm log}_2 \hspace{0.1cm} (3) \hspace{0.15cm}\underline{= 1.585\,{\rm (bit)}}\hspace{0.05cm}.$$
  • The two-dimensional random variable  $XY = \{00,\ 01,\ 02,\ 10,\ 11,\ 12,\ 20,\ 21,\ 22\}$   ⇒   $|XY| = |Z| = 9$  has also equal probabilities:
$$p_{ 00 } = p_{ 01 } =\text{...} = p_{ 22 } = 1/9.$$
  • From this follows:
$$H(XY) = {\rm log}_2 \hspace{0.1cm} (9) \hspace{0.15cm}\underline{= 3.170\,{\rm (bit)}} \hspace{0.05cm}.$$


(2)  The random variables  $X$  and  $Y$  are statistically independent because of  $P_{ XY }(⋅) = P_X(⋅) · P_Y(⋅)$ .

  • From this follows  $I(X, Y)\hspace{0.15cm}\underline{ = 0}$.
  • The same result is obtained by the equation  $I(X; Y) = H(X) + H(Y) - H(XY)$.


Probability mass function of the random variable  $XZ$

(3)  If one interprets  $I(X; Z)$  as the remaining uncertainty with regard to the tuple  $Z$,  when the first component  $X$  is known,  then the following obviously applies:

$$ I(X; Z) = H(Y)\hspace{0.15cm}\underline{ = 1.585 \ \rm bit}.$$

In purely formal terms, this task can also be solved as follows:

  • The entropy  $H(Z)$  is equal to the joint entropy  $H(XY) = 3.17 \ \rm bit$.
  • The joint probability  $P_{ XZ }(X, Z)$  contains nine elements of probability  $1/9$,  all others are occupied by zeros   ⇒   $H(XZ) = \log_2 (9) = 3.170 \ \rm bit $.
  • Thus, the following applies to the mutual information of the random variables  $X$  and  $Z$:
$$I(X;Z) = H(X) + H(Z) - H(XZ) = 1.585 + 3.170- 3.170\hspace{0.15cm} \underline {= 1.585\,{\rm (bit)}} \hspace{0.05cm}.$$


Entropies of the 2D variable  $XZ$

(4)  According to the second graph:

$$H(Z \hspace{-0.1cm}\mid \hspace{-0.1cm} X) = H(XZ) - H(X) = 3.170-1.585\hspace{0.15cm} \underline {=1.585\ {\rm (bit)}} \hspace{0.05cm},$$
$$H(X \hspace{-0.1cm}\mid \hspace{-0.1cm} Z) = H(XZ) - H(Z) = 3.170-3.170\hspace{0.15cm} \underline {=0\ {\rm (bit)}} \hspace{0.05cm}.$$
  • $H(Z|X)$  gives the residual uncertainty with respect to the tuple  $Z$,  when the first componen  $X$  is known.
  • The uncertainty regarding the tuple  $Z$  is  $H(Z) = 2 · \log_2 (3) \ \rm bit$.
  • When the component  $X$  is known, the uncertainty is halved to  $H(Z|X) = \log_2 (3)\ \rm bit$.
  • $H(X|Z)$  gives the remaining uncertainty with respect to component  $X$,  when the tuple  $Z = (X, Y)$  is known. 
  • This uncertainty is of course zero:   If one knows  $Z$, one also knows  $X$.