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

Difference between revisions of "Aufgaben:Exercise 4.1Z: Calculation of Moments"

From LNTwww
m (Text replacement - "”" to """)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Informationstheorie/Differentielle Entropie
+
{{quiz-Header|Buchseite=Information_Theory/Differential_Entropy
 
}}
 
}}
  
[[File:P_ID2863__Inf_Z_4_1.png|right|frame|Exponentialverteilung (oben) und Laplaceverteilung (unten)]]
+
[[File:EN_Inf_Z_4_1_vers2.png|right|frame|Exponential PDF (top), <br>Laplace PDF (bottom)]]
Die Grafik zeigt oben die Wahrscheinlichkeitsdichtefunktion (WDF) der&nbsp; [[Theory_of_Stochastic_Signals/Exponentialverteilte_Zufallsgrößen|Exponentialverteilung]]:
+
The upper graph shows the probability density function&nbsp; $\rm (PDF)$&nbsp; of the&nbsp; [[Theory_of_Stochastic_Signals/Exponentialverteilte_Zufallsgrößen|exponential distribution]]:
 
:fX(x)={AXeλxAX/20f¨urx>0,f¨urx=0,f¨urx<0.
 
:fX(x)={AXeλxAX/20f¨urx>0,f¨urx=0,f¨urx<0.
Darunter gezeichnet ist die WDF der&nbsp; [[Theory_of_Stochastic_Signals/Exponentialverteilte_Zufallsgrößen#Zweiseitige_Exponentialverteilung_.E2.80.93_Laplaceverteilung|Laplaceverteilung]], die für alle&nbsp; y&ndash;Werte wie folgt angegeben werden kann:
+
Drawn below is the PDF of the&nbsp; [[Theory_of_Stochastic_Signals/Exponentialverteilte_Zufallsgrößen#Zweiseitige_Exponentialverteilung_.E2.80.93_Laplaceverteilung|Laplace distribution]], which can be specified for all&nbsp; y&ndash;values as follows:
 
:fY(y)=AYeλ|y|.
 
:fY(y)=AYeλ|y|.
  
Die zwei wertkontinuierlichen Zufallsgrößen&nbsp; X&nbsp; und&nbsp; Y&nbsp; sollen hinsichtlich der folgenden Kenngrößen verglichen werden:
+
The two continuous random variables&nbsp; X&nbsp; and&nbsp; Y&nbsp; are to be compared with respect to the following characteristics:
*dem linearen Mittelwert&nbsp; m1&nbsp; (Moment erster Ordnung),
+
*The linear mean&nbsp; m1&nbsp; (first order moment),
*dem Moment zweiter Ordnung &nbsp; &#8658; &nbsp; m2,
+
*the second order moment &nbsp; &#8658; &nbsp; m2,
*der Varianz&nbsp; σ2=m2m21 &nbsp; &#8658; &nbsp; Satz von Steiner,  
+
*the variance&nbsp; σ2=m2m21 &nbsp; &#8658; &nbsp; Steiner's theorem,  
*der Streuung&nbsp; σ.
+
*the standard deviation&nbsp; σ.
  
  
Line 22: Line 22:
  
  
''Hinweise:''
+
Hints:
*Die Aufgabe gehört zum  Kapitel&nbsp; [[Information_Theory/Differentielle_Entropie|Differentielle Entropie]].
+
*The task belongs to the chapter&nbsp; [[Information_Theory/Differentielle_Entropie|Differential Entropy]].
*Nützliche Hinweise zur Lösung dieser Aufgabe und weitere Informationen zu den wertkontinuierlichen Zufallsgrößen finden Sie im dritten Kapitel "Kontinuierliche Zufallsgrößen" des Buches&nbsp;  [[Stochastische Signaltheorie]].
+
*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]].
 
   
 
   
*Gegeben sind außerdem die beiden unbestimmten Integrale:
+
*Also given are the two indefinite integrals:
 
:xeλxdx=eλx(λ)2(λx1),
 
:xeλxdx=eλx(λ)2(λx1),
 
:$$\int \hspace{-0.01cm} x^2 \cdot  {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\hspace{0.1cm}{\rm d}x = {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\cdot
 
:$$\int \hspace{-0.01cm} x^2 \cdot  {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\hspace{0.1cm}{\rm d}x = {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\cdot
Line 33: Line 33:
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Wie groß ist der Maximalwert&nbsp; AX&nbsp; der WDF&nbsp; fX(x)?
+
{What is the maximum value&nbsp; AX&nbsp; of the PDF&nbsp; fX(x)?
 
|type="()"}
 
|type="()"}
 
- AX=λ/2,
 
- AX=λ/2,
Line 42: Line 42:
 
- AX=1/λ.
 
- AX=1/λ.
  
{Wie groß ist der Maximalwert&nbsp; AY&nbsp; der WDF&nbsp; fY(y)?
+
{What is the maximum value&nbsp; AY&nbsp; of the PDF&nbsp; fY(y)?
 
|type="()"}
 
|type="()"}
 
+ AY=λ/2,
 
+ AY=λ/2,
Line 49: Line 49:
  
  
{Gibt es ein Argument&nbsp; z, so dass &nbsp;fX(z)=fY(z)&nbsp; gilt?
+
{Is there an argument&nbsp; z, such that &nbsp;fX(z)=fY(z)&nbsp;?
 
|type="()"}
 
|type="()"}
+ Ja.
+
+ Yes.
- Nein.
+
- No.
  
  
{Welche Aussagen gelten für die Kenngrößen der Exponentialverteilung?
+
{Which statements are true about the characteristics of the exponential distribution?
 
|type="[]"}
 
|type="[]"}
+ Der lineare Mittelwert ist&nbsp; m1=1/λ.
+
+ The linear mean is&nbsp; m1=1/λ.
+ Der quadratische Mittelwert ist&nbsp; m2=2/λ2.
+
+ The second order moment is&nbsp; m2=2/λ2.
+ Die Varianz ist&nbsp; σ2=1/λ2.
+
+ The variance is&nbsp; σ2=1/λ2.
  
{Welche Aussagen gelten für die Kenngrößen der Laplaceverteilung?
+
{Which statements are true about the characteristics of the Laplace distribution?
 
|type="[]"}
 
|type="[]"}
- Der lineare Mittelwert ist&nbsp; m1=1/λ.
+
- The linear mean is&nbsp; m1=1/λ.
+ Der quadratische Mittelwert ist&nbsp; m2=2/λ2.
+
+ The second order moment is&nbsp; m2=2/λ2.
- Die Varianz ist&nbsp; σ2=1/λ2.
+
- The variance is&nbsp; σ2=1/λ2.
  
{Mit welcher Wahrscheinlichkeiten unterscheidet sich die Zufallsgröße&nbsp; (X&nbsp; bzw.&nbsp; Y)&nbsp; vom jeweiligen Mittelwert  betragsmäßig um mehr als die Streuung &nbsp;σ?
+
{With what probabilities does the random variable&nbsp; (X&nbsp; or &nbsp; Y)&nbsp; differ from the respective mean in magnitude by more than the dispersion &nbsp;σ?
 
|type="{}"}
 
|type="{}"}
 
Exponential:Pr(|XmX|>σX) =   { 0.135 3% }
 
Exponential:Pr(|XmX|>σX) =   { 0.135 3% }
Line 75: Line 75:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Richtig ist der <u>Lösungsvorschlag 2</u>:
+
'''(1)'''&nbsp; <u>Proposed solution 2</u> is correct:
*Die Fläche unter der WDF muss immer&nbsp; 1&nbsp; sein.&nbsp; Daraus folgt für die Exponentialverteilung:
+
*The area under the PDF must always be&nbsp; 1&nbsp;.&nbsp; It follows for the exponential distribution:
 
:$$A_{X} \cdot\int_{0}^{\infty} \hspace{-0.01cm}  {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\hspace{0.1cm}{\rm d}x = A_{X} \cdot (-1/\lambda)\cdot\big [{\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\big ]_{0}^{\infty} = A_{X} \cdot (1/\lambda) \stackrel{!}{=} 1
 
:$$A_{X} \cdot\int_{0}^{\infty} \hspace{-0.01cm}  {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\hspace{0.1cm}{\rm d}x = A_{X} \cdot (-1/\lambda)\cdot\big [{\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\big ]_{0}^{\infty} = A_{X} \cdot (1/\lambda) \stackrel{!}{=} 1
 
  \hspace{0.3cm} \Rightarrow\hspace{0.3cm} A_{X} = \lambda \hspace{0.05cm}. $$
 
  \hspace{0.3cm} \Rightarrow\hspace{0.3cm} A_{X} = \lambda \hspace{0.05cm}. $$
  
  
 
+
'''(2)'''&nbsp; <u>Proposed solution 1</u> is correct:
'''(2)'''&nbsp; Richtig ist hier der <u>Lösungsvorschlag 1</u>:
+
*From the graph on the information page, we can see that the height&nbsp; AY&nbsp; of the Laplace PDF is only half as large as the maximum of the exponential PDF:
*Aus der Grafik auf der Angabenseite erkennt man, dass die Höhe&nbsp; AY&nbsp; der Laplaceverteilung nur halb so groß ist wie das Maximum der Exponentialverteilung:  
 
 
:AY=λ/2.  
 
:AY=λ/2.  
  
  
 
+
'''(3)'''&nbsp; Correct is <u>YES</u>,&nbsp; although for&nbsp; z0&nbsp; always &nbsp;fX(z)=fY(z). &nbsp; Let us now consider the special case&nbsp; z=0:
'''(3)'''&nbsp; Richtig ist <u>JA</u>, obwohl für&nbsp; z0&nbsp; stets &nbsp;fX(z)=fY(z)&nbsp; gilt. Betrachten wir nun den Sonderfall&nbsp; z=0:
+
* For the Laplace PDF:&nbsp; fY(y=0)=λ/2.
* Für die Laplaceverteilung gilt&nbsp; fY(y=0)=λ/2.
+
* For the exponential PDF,&nbsp; the left-hand and right-hand limits differ for&nbsp; x0.  
* Bei der Exponentialverteilung unterscheiden sich der links- und der rechtsseitige Grenzwert für&nbsp; x0.  
+
*The PDF value at point&nbsp; x=0&nbsp; is the average of these two limits:
*Der WDF&ndash;Wert an der Stelle&nbsp; x=0&nbsp; ist der Mittelwert dieser beiden Grenzwerte:
 
 
:fX(0)=12[0+λ]=λ/2=fY(0).
 
:fX(0)=12[0+λ]=λ/2=fY(0).
  
  
 +
'''(4)'''&nbsp; <u>All proposed solutions</u> are correct.&nbsp;
  
'''(4)'''&nbsp;  Richtig sind <u>alle Lösungsvorschläge</u>.&nbsp;
+
For the exponential distribution, the&nbsp; k&ndash;th order moment is generally calculated to be
 
 
Bei der Exponentialverteilung berechnet sich das Moment&nbsp; k&ndash;ter Ordnung allgemein zu
 
 
:mk=k!λkm1=1λ,m2=2λ2,m3=6λ3, ...
 
:mk=k!λkm1=1λ,m2=2λ2,m3=6λ3, ...
Somit erhält man für
+
Thus one obtains for
* den linearen Mittelwert (Moment erster Ordnung):  
+
* the linear mean (first order moment):
 
:m1=λ0xeλxdx=λ[eλx(λ)2(λx1)]0=1/λ,
 
:m1=λ0xeλxdx=λ[eλx(λ)2(λx1)]0=1/λ,
* den quadratischen Mittelwert  (Moment zweiter Ordnung):
+
* the second order moment:
 
:$$m_2 = \lambda \cdot\int_{0}^{\infty} \hspace{-0.01cm} x^2 \cdot  {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\hspace{0.1cm}{\rm d}x = \lambda \cdot\left [ {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\cdot
 
:$$m_2 = \lambda \cdot\int_{0}^{\infty} \hspace{-0.01cm} x^2 \cdot  {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\hspace{0.1cm}{\rm d}x = \lambda \cdot\left [ {\rm e}^{-\lambda \hspace{0.05cm}\cdot \hspace{0.05cm}x}\cdot
 
(\frac{x^2}{-\lambda} - \frac{2x}{\lambda^2} + \frac{2}{\lambda^3})
 
(\frac{x^2}{-\lambda} - \frac{2x}{\lambda^2} + \frac{2}{\lambda^3})
 
\right ]_{0}^{\infty} ={2}/{\lambda^2} \hspace{0.05cm}.$$
 
\right ]_{0}^{\infty} ={2}/{\lambda^2} \hspace{0.05cm}.$$
Daraus ergibt sich mit dem Satz von Steiner für die Varianz der Exponentialverteilung:
+
From this, using Steiner's theorem for the variance of the exponential distribution, we get:
 
:$$\sigma^2 = m_2 - m_1^2 = {2}/{\lambda^2} -{1}/{\lambda^2} = {1}/{\lambda^2}  
 
:$$\sigma^2 = m_2 - m_1^2 = {2}/{\lambda^2} -{1}/{\lambda^2} = {1}/{\lambda^2}  
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}  
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}  
Line 115: Line 112:
  
  
 
+
[[File:EN_Inf_A_4_3.png|right|frame|To illustrate the sample solution to problem&nbsp; '''(5)''']]
'''(5)'''&nbsp; Richtig ist nur der <u>Lösungsvorschlag 2</u>:  
+
'''(5)'''&nbsp; Only the <u>proposed solution 2</u> is correct:  
*Der quadratische Mittelwert der Laplaceverteilung ist aufgrund der symmetrischen WDF genau so groß wie bei der Exponentialverteilung:
+
*The second moment of&nbsp; "Laplace"&nbsp; is the same as for the exponential distribution because of the symmetric PDF:
[[File:P_ID2864__Inf_Z_4_1f_neu.png|right|frame|Zur Verdeutlichung der Musterlösung zur Aufgabe&nbsp; '''(5)''']]
 
 
:m2=λ2y2eλ|y|dy=λ0y2eλydy=2/λ2.
 
:m2=λ2y2eλ|y|dy=λ0y2eλydy=2/λ2.
  
*Der Mittelwert  der Laplaceverteilung ist dagegen&nbsp; m1=0.  
+
*In contrast, the mean of the Laplace distribution is&nbsp; m1=0.  
*Damit ist die Varianz der Laplaceverteilung doppelt so groß wie bei der Exponentialverteilung:
+
*Thus, the variance of the Laplace distribution is twice that of the exponential distribution:
 
:$$\sigma^2 = m_2 - m_1^2 = {2}/{\lambda^2} - 0 ={2}/{\lambda^2}  
 
:$$\sigma^2 = m_2 - m_1^2 = {2}/{\lambda^2} - 0 ={2}/{\lambda^2}  
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}  
 
\hspace{0.3cm} \Rightarrow\hspace{0.3cm}  
Line 128: Line 124:
  
  
 
+
'''(6)'''&nbsp; For the exponential distribution, according to the upper graph with&nbsp; mX=σX=1/λ:
 
 
'''(6)'''&nbsp; Für die Exponentialverteilung ergibt sich  entsprechend der oberen Grafik mit&nbsp; mX=σX=1/λ:
 
 
:$${\rm Pr}( |X  -  m_X| > \sigma_X)  \hspace{-0.05cm} = \hspace{-0.05cm}
 
:$${\rm Pr}( |X  -  m_X| > \sigma_X)  \hspace{-0.05cm} = \hspace{-0.05cm}
 
{\rm Pr}( X > 2/\lambda)  
 
{\rm Pr}( X > 2/\lambda)  
Line 137: Line 131:
 
\right ]_{2/\lambda}^{\infty}
 
\right ]_{2/\lambda}^{\infty}
 
   =  {\rm e}^{-2} \hspace{0.15cm}\underline {\approx 0.135}.$$
 
   =  {\rm e}^{-2} \hspace{0.15cm}\underline {\approx 0.135}.$$
Für die Laplaceverteilung (untere Grafik) erhält man mit &nbsp;mY=0&nbsp; und &nbsp;σY=2/λ:
+
For the Laplace distribution (lower graph),&nbsp; with &nbsp;mY=0&nbsp; and &nbsp;σY=2/λ we obtain::
 
:$${\rm Pr}( |Y  -  m_Y| > \sigma_Y) =
 
:$${\rm Pr}( |Y  -  m_Y| > \sigma_Y) =
 
2 \cdot {\rm Pr}( Y > \sqrt{2}/\lambda)  
 
2 \cdot {\rm Pr}( Y > \sqrt{2}/\lambda)  
Line 146: Line 140:
 
  = -  {\rm e}^{-\sqrt{2}} \hspace{0.15cm}\underline {\approx 0.243}\hspace{0.05cm}.$$
 
  = -  {\rm e}^{-\sqrt{2}} \hspace{0.15cm}\underline {\approx 0.243}\hspace{0.05cm}.$$
  
Ein Vergleich der schraffierten Flächen in nebenstehender Grafik bestätigt das Ergebnis qualitativ: <br> &nbsp; &nbsp;  Die blauen Flächen sind zusammen etwas größer als die rote Fläche.
+
A comparison of the shaded areas in the accompanying graph qualitatively confirms the result: <br> &rArr; &nbsp;  The blue areas together are slightly larger than the red area.
  
  
Line 157: Line 151:
  
  
[[Category:Information Theory: Exercises|^4.1  Differentielle Entropie^]]
+
[[Category:Information Theory: Exercises|^4.1  Differential Entropy^]]

Latest revision as of 14:19, 18 January 2023

Exponential PDF (top),
Laplace PDF (bottom)

The upper graph shows the probability density function  (PDF)  of the  exponential distribution:

fX(x)={AXeλxAX/20f¨urx>0,f¨urx=0,f¨urx<0.

Drawn below is the PDF of the  Laplace distribution, which can be specified for all  y–values as follows:

fY(y)=AYeλ|y|.

The two continuous random variables  X  and  Y  are to be compared with respect to the following characteristics:

  • The linear mean  m1  (first order moment),
  • the second order moment   ⇒   m2,
  • the variance  σ2=m2m21   ⇒   Steiner's theorem,
  • the standard deviation  σ.





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.
  • Also given are the two indefinite integrals:
xeλxdx=eλx(λ)2(λx1),
x2eλxdx=eλx(x2λ2xλ2+2λ3).


Questions

1

What is the maximum value  AX  of the PDF  fX(x)?

AX=λ/2,
AX=λ,
AX=1/λ.

2

What is the maximum value  AY  of the PDF  fY(y)?

AY=λ/2,
AY=λ,
AY=1/λ.

3

Is there an argument  z, such that  fX(z)=fY(z) ?

Yes.
No.

4

Which statements are true about the characteristics of the exponential distribution?

The linear mean is  m1=1/λ.
The second order moment is  m2=2/λ2.
The variance is  σ2=1/λ2.

5

Which statements are true about the characteristics of the Laplace distribution?

The linear mean is  m1=1/λ.
The second order moment is  m2=2/λ2.
The variance is  σ2=1/λ2.

6

With what probabilities does the random variable  (X  or   Y)  differ from the respective mean in magnitude by more than the dispersion  σ?

Exponential:Pr(|XmX|>σX) = 

Laplace:Pr(|YmY|>σY) = 


Solution

(1)  Proposed solution 2 is correct:

  • The area under the PDF must always be  1 .  It follows for the exponential distribution:
AX0eλxdx=AX(1/λ)[eλx]0=AX(1/λ)!=1AX=λ.


(2)  Proposed solution 1 is correct:

  • From the graph on the information page, we can see that the height  AY  of the Laplace PDF is only half as large as the maximum of the exponential PDF:
AY=λ/2.


(3)  Correct is YES,  although for  z0  always  fX(z)=fY(z).   Let us now consider the special case  z=0:

  • For the Laplace PDF:  fY(y=0)=λ/2.
  • For the exponential PDF,  the left-hand and right-hand limits differ for  x0.
  • The PDF value at point  x=0  is the average of these two limits:
fX(0)=12[0+λ]=λ/2=fY(0).


(4)  All proposed solutions are correct. 

For the exponential distribution, the  k–th order moment is generally calculated to be

mk=k!λkm1=1λ,m2=2λ2,m3=6λ3, ...

Thus one obtains for

  • the linear mean (first order moment):
m1=λ0xeλxdx=λ[eλx(λ)2(λx1)]0=1/λ,
  • the second order moment:
m2=λ0x2eλxdx=λ[eλx(x2λ2xλ2+2λ3)]0=2/λ2.

From this, using Steiner's theorem for the variance of the exponential distribution, we get:

σ2=m2m21=2/λ21/λ2=1/λ2σ=1/λ.


To illustrate the sample solution to problem  (5)

(5)  Only the proposed solution 2 is correct:

  • The second moment of  "Laplace"  is the same as for the exponential distribution because of the symmetric PDF:
m2=λ2y2eλ|y|dy=λ0y2eλydy=2/λ2.
  • In contrast, the mean of the Laplace distribution is  m1=0.
  • Thus, the variance of the Laplace distribution is twice that of the exponential distribution:
σ2=m2m21=2/λ20=2/λ2σ=2/λ.


(6)  For the exponential distribution, according to the upper graph with  mX=σX=1/λ:

Pr(|XmX|>σX)=Pr(X>2/λ)=λ2/λeλxdx=[eλx]2/λ=e20.135_.

For the Laplace distribution (lower graph),  with  mY=0  and  σY=2/λ we obtain::

Pr(|YmY|>σY)=2Pr(Y>2/λ)=2λ22/λeλxdx
Pr(|YmY|>σY)=[eλx]2/λ=e20.243_.

A comparison of the shaded areas in the accompanying graph qualitatively confirms the result:
⇒   The blue areas together are slightly larger than the red area.