Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Difference between revisions of "Aufgaben:Exercise 3.4: Entropy for Different PMF"

From LNTwww
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Informationstheorie/Einige Vorbemerkungen zu zweidimensionalen Zufallsgrößen
+
{{quiz-Header|Buchseite=Information_Theory/Some_Preliminary_Remarks_on_Two-Dimensional_Random_Variables
 
}}
 
}}
  
[[File:P_ID2758__Inf_Z_3_3.png|right|Vier Wahrscheinlichkeitsfunktionen mit <i>M</i> = 4]]
+
[[File:EN_Inf_Z_3_3.png|right|frame|Probability functions, each with&nbsp; $M = 4$&nbsp; elements]]
In der ersten Zeile der nebenstehenden Tabelle ist die im Folgenden die mit &bdquo;a&rdquo; bezeichnete Wahrscheinlichkeitsfunktion angegeben. Für diese PMF $P_X(X) = [0.1, 0.2, 0.3, 0.4 ]$ soll  soll in der Teilaufgabe (1) die Entropie berechnet werden:
+
In the first row of the adjacent table, the probability mass function denoted by&nbsp; $\rm (a)$&nbsp; is given in the following.  
:$$H_{\rm a}(X) = {\rm E} \left [ {\rm log}_2 \hspace{0.1cm} \frac{1}{P_{X}(X)}\right ]= - {\rm E} \left [ {\rm log}_2 \hspace{0.1cm}{P_{X}(X)}\right ].$$
 
Da hier der Logarithmus zur Basis 2 verwendet wird, ist die Pseudo–Einheit „bit” anzufügen.
 
  
In den weiteren Aufgaben sollen jeweils einige Wahrscheinlichkeiten variiert werden und zwar derart, dass sich jeweils die größtmögliche Entropie ergibt:
+
For this PMF&nbsp; $P_X(X) = \big [0.1, \ 0.2, \ 0.3, \ 0.4 \big ]$&nbsp; the entropy is to be calculated in subtask&nbsp; '''(1)'''&nbsp;:
 +
:Ha(X)=E[log21PX(X)]=E[log2PX(X)].
 +
Since the logarithm to the base&nbsp; 2&nbsp; is used here, the pseudo-unit&nbsp; "bit"&nbsp; is to be added.
  
* Durch geeignete Variation von p3 und p4 kommt man zur maximalen Entropie Hb(X) unter der Voraussetzung p1=0.1 und p2=0.2  &nbsp; &rArr; &nbsp; Teilaufgabe (2).
+
In the further tasks, some probabilities are to be varied in each case in such a way that the greatest possible entropy results:
* Durch geeignete Variation von p2 und p3 kommt man zur maximalen Entropie Hc(X) unter der Voraussetzung p1=0.1 und p4=0.4 &nbsp; &rArr; &nbsp; Teilaufgabe (3).
 
* In der Teilaufgabe (4) sind alle vier Parameter zur Variation freigegeben, die entsprechend der maximalen Entropie &nbsp; &rArr; &nbsp; Hmax(X)  zu bestimmen sind.
 
  
 +
* By suitably varying &nbsp;p3 &nbsp;and&nbsp; p4,&nbsp; one arrives at the maximum entropy&nbsp; Hb(X)&nbsp; under the condition &nbsp;p1=0.1 &nbsp;and&nbsp; p2=0.2  &nbsp; &rArr; &nbsp; subtask&nbsp; '''(2)'''.
 +
* By varying &nbsp;p2 &nbsp;and&nbsp; p3 appropriately, one arrives at the maximum entropy&nbsp; Hc(X)&nbsp; under the condition &nbsp;p1=0.1 &nbsp;and&nbsp; p4=0.4 &nbsp; &rArr; &nbsp; subtask&nbsp; '''(3)'''.
 +
* In subtask&nbsp; '''(4)'''&nbsp; all four parameters are released for variation,&nbsp; which are to be determined according to the maximum entropy &nbsp; &rArr; &nbsp; Hmax(X)&nbsp;.
  
''Hinweise:''
 
*Die Aufgabe gehört zum  Kapitel [[Informationstheorie/Einige_Vorbemerkungen_zu_zweidimensionalen_Zufallsgrößen|Einige Vorbemerkungen zu den 2D-Zufallsgrößen]].
 
*Insbesondere wird Bezug genommen auf die Seite [[Informationstheorie/Einige_Vorbemerkungen_zu_zweidimensionalen_Zufallsgrößen#Wahrscheinlichkeitsfunktion_und_Entropie|Wahrscheinlichkeitsfunktion undEntropie]].
 
*Sollte die Eingabe des Zahlenwertes &bdquo;0&rdquo; erforderlich sein, so geben Sie bitte &bdquo;0.&rdquo; ein.
 
  
  
===Fragebogen===
+
 
 +
 
 +
 
 +
 
 +
 
 +
Hints:
 +
*The exercise belongs to the chapter&nbsp; [[Information_Theory/Einige_Vorbemerkungen_zu_zweidimensionalen_Zufallsgrößen|Some preliminary remarks on two-dimensional random variables]].
 +
*In particular, reference is made to the page&nbsp; [[Information_Theory/Einige_Vorbemerkungen_zu_zweidimensionalen_Zufallsgrößen#Probability_mass_function_and_entropy|Probability mass function and entropy]].
 +
 +
 
 +
 
 +
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Zu welcher Entropie führt die Wahrscheinlichkeitsfunktion PX(X)=[0.1,0.2,0.3,0.4] ?
+
{To which entropy does the probability mass function&nbsp; $P_X(X) = \big [ 0.1, \ 0.2, \ 0.3, \ 0.4 \big ]$ lead?
 
|type="{}"}
 
|type="{}"}
 
Ha(X) =  { 1.846 0.5% }  bit  
 
Ha(X) =  { 1.846 0.5% }  bit  
  
{Es gelte nun allgemein PX(X)=[0.1,0.2,p3,p4]. Welche Entropie erhält man, wenn p3 und p4 bestmöglich gewählt werden?
+
{Let&nbsp; $P_X(X) = \big [ 0.1, \ 0.2, \ p_3, \ p_4\big ]$ apply in general.&nbsp; What entropy is obtained if&nbsp; p3&nbsp; and&nbsp; p4&nbsp; are chosen as best as possible?
 
|type="{}"}
 
|type="{}"}
 
Hb(X) =  { 1.857 0.5% }  bit
 
Hb(X) =  { 1.857 0.5% }  bit
  
{ Nun gelte PX(X)=[0.1,p2,p3,0.4]. Welche Entropie erhält man, wenn p2 und p3 bestmöglich gewählt werden?
+
{ Now let&nbsp; $P_X(X) = \big [ 0.1, \ p_2, \ p_3, \ 0.4 \big ]$.&nbsp; What entropy is obtained if&nbsp; p2&nbsp; and&nbsp; p3&nbsp; are chosen as best as possible?
 
|type="{}"}
 
|type="{}"}
 
Hc(X) =  { 1.861 0.5% }  bit
 
Hc(X) =  { 1.861 0.5% }  bit
  
{ Welche Entropie erhält man, wenn alle Wahrscheinlichkeiten ($p_1$, $p_2$,$p_3undp_4$) bestmöglich gewählt werden Können ?
+
{ What entropy is obtained if all probabilities &nbsp;$(p_1, \ p_2 , \ p_3, \ p_4)$&nbsp; can be chosen as best as possible?
 
|type="{}"}
 
|type="{}"}
 
Hmax(X) =  { 2 1% }  bit
 
Hmax(X) =  { 2 1% }  bit
Line 43: Line 51:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''1.'''  Mit PX(X)=[0.1,0.2,0.3,0.4] erhält man für die Entropie:  
+
'''(1)'''&nbsp; With&nbsp; $P_X(X) = \big [ 0.1, \ 0.2, \ 0.3, \ 0.4 \big ]$&nbsp; we get for the entropy:
 
+
:$$H_{\rm a}(X) =  
$$H_{\rm a}(X) =  
 
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} +
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} +
 
0.2 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.2} +
 
0.2 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.2} +
 
0.3 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.3} +
 
0.3 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.3} +
 
0.4 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.4}  
 
0.4 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.4}  
\hspace{0.15cm} \underline {= 1.846}  \hspace{0.05cm}$$.
+
\hspace{0.15cm} \underline {= 1.846}  \hspace{0.05cm}.$$
 +
Here (and in the other tasks) the pseudo-unit&nbsp; "bit"&nbsp; is to be added in each case.
  
Hier (und bei den anderen Aufgaben) ist jeweils die  Pseudo–Einheit „bit” anzufügen.
 
  
'''2.''' Die Entropie Hb(X) sich als Summe zweier Anteile  Hb1(X) und Hb2(X)  darstellen, mit:
 
  
$$H_{\rm b1}(X) =  
+
'''(2)'''&nbsp; The entropy&nbsp; Hb(X)&nbsp; can be represented as the sum of two parts&nbsp;  Hb1(X)&nbsp; and&nbsp; Hb2(X),&nbsp; with:
 +
:$$H_{\rm b1}(X) =  
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} +
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} +
0.2 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.2} = 0.797 \hspace{0.05cm}$$
+
0.2 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.2} = 0.797 \hspace{0.05cm},$$
 
+
:$$H_{\rm b2}(X)  =  
$$H_{\rm b2}(X)  =  
 
 
p_3 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{p_3} +
 
p_3 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{p_3} +
(0.7-p_3) \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.7-p_3} \hspace{0.05cm}$$.
+
(0.7-p_3) \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.7-p_3} \hspace{0.05cm}.$$
  
Die zweite Funktion ist für $p-3 = p_4 = 0.35$ Ein ähnlicher Zusammenhang hat sich bei der [http://en.lntwww.de/Informationstheorie/Ged%C3%A4chtnislose_Nachrichtenquellen#Bin.C3.A4re_Entropiefunktion Binäre Entropiefunktion] ergeben. Damit erhält man :  
+
*The second function is maximum for&nbsp; $p_3 = p_4 = 0.35$.&nbsp; A similar relationship has been found for the binary entropy function. &nbsp;
 +
*Thus one obtains:
  
$$H_{\rm b2}(X) = 2 \cdot  
+
:$$H_{\rm b2}(X) = 2 \cdot  
 
p_3 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{p_3} =
 
p_3 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{p_3} =
0.7 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.35} = 1.060$$
+
0.7 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.35} = 1.060 $$
 +
:$$ \Rightarrow \hspace{0.3cm} H_{\rm b}(X) = H_{\rm b1}(X) + H_{\rm b2}(X) = 0.797 + 1.060 \hspace{0.15cm} \underline {= 1.857}  \hspace{0.05cm}.$$
  
Hb(X)=Hb1(X)+Hb2(X)=0.797+1.060=1.857_.
 
  
  
'''3.''' Analog zur Aufgabe (b) ergibt sich mit p1=0.1, p4=0.4 das Maximum für $p_2 = p_3 = p_3 = 0.25$ :
+
'''(3)'''&nbsp; Analogous to subtask&nbsp; '''(2)''',&nbsp; p1=0.1&nbsp; and&nbsp; p4=0.4&nbsp; yield the maximum for&nbsp; $p_2 = p_3 = 0.25$:
 
+
:$$H_{\rm c}(X) =  
$$H_{\rm c}(X) =  
 
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} +
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} +
 
2 \cdot 0.25 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.25} +
 
2 \cdot 0.25 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.25} +
 
0.4 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.4}  
 
0.4 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.4}  
\hspace{0.15cm} \underline {= 1.861}  \hspace{0.05cm}$$.
+
\hspace{0.15cm} \underline {= 1.861}  \hspace{0.05cm}.$$
  
  
'''4.''' Die maximale Entropie für den Symbolumfang M=4 ergibt sich bei gleichen Wahrscheinlichkeiten ( p1=p2=p3=p4=0.25):
 
  
$$H_{\rm max}(X) =  
+
'''(4)'''&nbsp; The maximum entropy for the symbol range&nbsp; M=4&nbsp; is obtained for equal probabilities, i.e. for&nbsp; p1=p2=p3=p4=0.25:
 +
:$$H_{\rm max}(X) =  
 
{\rm log}_2 \hspace{0.1cm} M  
 
{\rm log}_2 \hspace{0.1cm} M  
\hspace{0.15cm} \underline {= 2}  \hspace{0.05cm}$$.
+
\hspace{0.15cm} \underline {= 2}  \hspace{0.05cm}.$$
 
 
Die Differenz der Entropien entsprechend (d) und (c) ergibt $\triangle H(X) = 0.139 bit$.  Hierbei gilt:
 
  
$$\Delta H(X) = 1-
+
*The difference of the entropies according to&nbsp; '''(4)'''&nbsp; and&nbsp; '''(3)'''&nbsp; gives&nbsp; ΔH(X)=0.139 bit.&nbsp;  Here:
 +
:$${\rm \DeltaH(X) = 1-
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} -
 
0.1 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.1} -
 
0.4 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.4}  
 
0.4 \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{0.4}  
  \hspace{0.05cm}$$.
+
  \hspace{0.05cm}.$$
  
Mit der binären Entropiefunktion
+
*With the binary entropy function
  
$$H_{\rm bin}(p) =  
+
:$$H_{\rm bin}(p) =  
 
p \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{p} +
 
p \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{p} +
 
(1-p) \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{1-p}$$
 
(1-p) \cdot {\rm log}_2 \hspace{0.1cm} \frac{1}{1-p}$$
  
lässt sich hierfür auch schreiben:
+
:can also be written for this:
  
$$\Delta H(X) = 0.5 \cdot \left [ 1- H_{\rm bin}(0.2) \right ] =
+
:$${\rm \Delta} H(X) = 0.5 \cdot \big [ 1- H_{\rm bin}(0.2) \big ] =
  0.5 \cdot \left [ 1- 0.722 \right ] = 0.139  
+
  0.5 \cdot \big [ 1- 0.722 \big ] = 0.139  
  \hspace{0.05cm}$$.
+
  \hspace{0.05cm}.$$
  
  
Line 120: Line 125:
  
  
[[Category:Aufgaben zu Informationstheorie|^3.1 Vorbemerkungen zu 2D-Zufallsgrößen^]]
+
[[Category:Information Theory: Exercises|^3.1 General Information on 2D Random Variables^]]

Latest revision as of 10:13, 24 September 2021

Probability functions, each with  M=4  elements

In the first row of the adjacent table, the probability mass function denoted by  (a)  is given in the following.

For this PMF  PX(X)=[0.1, 0.2, 0.3, 0.4]  the entropy is to be calculated in subtask  (1) :

Ha(X)=E[log21PX(X)]=E[log2PX(X)].

Since the logarithm to the base  2  is used here, the pseudo-unit  "bit"  is to be added.

In the further tasks, some probabilities are to be varied in each case in such a way that the greatest possible entropy results:

  • By suitably varying  p3  and  p4,  one arrives at the maximum entropy  Hb(X)  under the condition  p1=0.1  and  p2=0.2   ⇒   subtask  (2).
  • By varying  p2  and  p3 appropriately, one arrives at the maximum entropy  Hc(X)  under the condition  p1=0.1  and  p4=0.4   ⇒   subtask  (3).
  • In subtask  (4)  all four parameters are released for variation,  which are to be determined according to the maximum entropy   ⇒   Hmax(X) .





Hints:


Questions

1

To which entropy does the probability mass function  PX(X)=[0.1, 0.2, 0.3, 0.4] lead?

Ha(X) = 

 bit

2

Let  PX(X)=[0.1, 0.2, p3, p4] apply in general.  What entropy is obtained if  p3  and  p4  are chosen as best as possible?

Hb(X) = 

 bit

3

Now let  PX(X)=[0.1, p2, p3, 0.4].  What entropy is obtained if  p2  and  p3  are chosen as best as possible?

Hc(X) = 

 bit

4

What entropy is obtained if all probabilities  (p1, p2, p3, p4)  can be chosen as best as possible?

Hmax(X) = 

 bit


Solution

(1)  With  PX(X)=[0.1, 0.2, 0.3, 0.4]  we get for the entropy:

Ha(X)=0.1log210.1+0.2log210.2+0.3log210.3+0.4log210.4=1.846_.

Here (and in the other tasks) the pseudo-unit  "bit"  is to be added in each case.


(2)  The entropy  Hb(X)  can be represented as the sum of two parts  Hb1(X)  and  Hb2(X),  with:

Hb1(X)=0.1log210.1+0.2log210.2=0.797,
Hb2(X)=p3log21p3+(0.7p3)log210.7p3.
  • The second function is maximum for  p3=p4=0.35.  A similar relationship has been found for the binary entropy function.  
  • Thus one obtains:
Hb2(X)=2p3log21p3=0.7log210.35=1.060
Hb(X)=Hb1(X)+Hb2(X)=0.797+1.060=1.857_.


(3)  Analogous to subtask  (2)p1=0.1  and  p4=0.4  yield the maximum for  p2=p3=0.25:

Hc(X)=0.1log210.1+20.25log210.25+0.4log210.4=1.861_.


(4)  The maximum entropy for the symbol range  M=4  is obtained for equal probabilities, i.e. for  p1=p2=p3=p4=0.25:

Hmax(X)=log2M=2_.
  • The difference of the entropies according to  (4)  and  (3)  gives  ΔH(X)=0.139 bit.  Here:
ΔH(X)=10.1log210.10.4log210.4.
  • With the binary entropy function
Hbin(p)=plog21p+(1p)log211p
can also be written for this:
ΔH(X)=0.5[1Hbin(0.2)]=0.5[10.722]=0.139.