Difference between revisions of "Aufgaben:Exercise 4.1: PDF, CDF and Probability"

From LNTwww
m (Text replacement - "value-discrete" to "discrete")
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Informationstheorie/Differentielle Entropie
+
{{quiz-Header|Buchseite=Information_Theory/Differential_Entropy
 
}}
 
}}
  
[[File:P_ID2862__Inf_A_4_1_neu.png|right|frame|VTF (oben) und WDF (unten)]]
+
[[File:P_ID2862__Inf_A_4_1_neu.png|right|frame|$\rm  (CDF)$  (top),  $\rm  (PDF)$  (bottom)]]
Zur Wiederholung einiger wichtiger Grundlagen aus dem Buch „Stochastische Signaltheorie”
+
To repeat some important basics from the book "Theory of Stochastic Signals" we are dealing with
beschäftigen wir uns mit
+
* the  [[Theory_of_Stochastic_Signals/Wahrscheinlichkeitsdichtefunktion|probability density function]] $\rm  (PDF)$,
* der  [[Stochastische_Signaltheorie/Wahrscheinlichkeitsdichtefunktion|Wahrscheinlichkeitsdichtefunktion]] (WDF),
+
* the  [[Theory_of_Stochastic_Signals/Cumulative_Distribution_Function_(CDF)|cumulative distribution function]] $\rm  (CDF)$.
* der  [[Stochastische_Signaltheorie/Verteilungsfunktion|Verteilungsfunktion]] (VTF).
 
  
  
Die obere Darstellung zeigt die Verteilungsfunktion  $F_X(x)$  einer wertdiskreten Zufallsgröße   $X$.  Die zugehörige WDF  $f_X(x)$  ist in der Teilaufgabe  '''(1)'''  zu bestimmen.  
+
The upper plot shows the cumulative distribution function  $F_X(x)$  of a  discrete random variable   $X$.  The corresponding probability density function  $f_X(x)$  has to be determined in subtask  '''(1)'''.
  
Die Gleichung
+
The equation
 
:$$ {\rm Pr}(A < X \le B) = F_X(B) - F_X(A) =  \lim_{\varepsilon \hspace{0.05cm}\rightarrow \hspace{0.05cm}0} \int_{A+\varepsilon}^{B+\varepsilon} \hspace{-0.15cm}  f_X(x) \hspace{0.1cm}{\rm d}x $$
 
:$$ {\rm Pr}(A < X \le B) = F_X(B) - F_X(A) =  \lim_{\varepsilon \hspace{0.05cm}\rightarrow \hspace{0.05cm}0} \int_{A+\varepsilon}^{B+\varepsilon} \hspace{-0.15cm}  f_X(x) \hspace{0.1cm}{\rm d}x $$
  
stellt zwei Möglichkeiten dar, um aus der VTF bzw. der WDF die Wahrscheinlichkeit für das Ereignis&nbsp; „Die Zufallsgröße&nbsp; $X$&nbsp; liegt in einem vorgegebenem Intervall”&nbsp; zu berechnen.
+
represents two ways to calculate the probability for the event&nbsp; "The random variable&nbsp; $X$&nbsp; lies in a given interval"&nbsp; from the CDF and the PDF,&nbsp; respectively.
  
Die untere Grafik zeigt die Wahrscheinlichkeitsdichtefunktion
+
The lower graph shows the probability density function
 
:$$ f_Y(y) = \left\{ \begin{array}{c} \hspace{0.1cm}1/2 \cdot \cos^2(\pi/4 \cdot y) \\ \hspace{0.1cm} 0 \\  \end{array} \right.\quad \begin{array}{*{20}c}  {\rm{f\ddot{u}r}}  \\    {\rm{f\ddot{u}r}}  \\ \end{array}\begin{array}{*{20}l}  | y| \le 2, \\   
 
:$$ f_Y(y) = \left\{ \begin{array}{c} \hspace{0.1cm}1/2 \cdot \cos^2(\pi/4 \cdot y) \\ \hspace{0.1cm} 0 \\  \end{array} \right.\quad \begin{array}{*{20}c}  {\rm{f\ddot{u}r}}  \\    {\rm{f\ddot{u}r}}  \\ \end{array}\begin{array}{*{20}l}  | y| \le 2, \\   
 
y < -2 \hspace{0.1cm}{\rm und}\hspace{0.1cm}y > +2 \\ \end{array}$$
 
y < -2 \hspace{0.1cm}{\rm und}\hspace{0.1cm}y > +2 \\ \end{array}$$
einer wertkontinuierlichen Zufallsgröße&nbsp; $Y$, die auf den Bereich&nbsp; $|Y| \le 2$&nbsp; begrenzt ist.
+
of a continuous random variable&nbsp; $Y$,&nbsp; which is restricted to the range&nbsp; $|Y| \le 2$&nbsp;.&nbsp;
 +
In principle, the same relationship between PDF, CDF and probabilities exists for the continuous random variable&nbsp; $Y$&nbsp; as for a discrete random variable.&nbsp; Nevertheless, you will notice some differences in details.
  
Prinzipiell besteht bei der kontinuierlichen Zufallsgröße&nbsp; $Y$&nbsp; der gleiche Zusammenhang zwischen WDF, VTF und Wahrscheinlichkeiten wie bei einer diskreten Zufallsgröße.&nbsp; Sie werden trotzdem einige Detailunterschiede feststellen.
+
For example, for the continuous random variable&nbsp; $Y$,&nbsp; the boundary transition can be omitted in the above equation, and we obtain simplified:
 
 
Beispielsweise kann bei der kontinuierlichen Zufallsgröße&nbsp; $Y$&nbsp; in obiger Gleichung auf den Grenzübergang verzichtet werden, und man erhält vereinfacht:
 
 
:$${\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A) =\int_{A}^{B} \hspace{-0.01cm}  f_Y(y)
 
:$${\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A) =\int_{A}^{B} \hspace{-0.01cm}  f_Y(y)
 
\hspace{0.1cm}{\rm d}y\hspace{0.05cm}.$$
 
\hspace{0.1cm}{\rm d}y\hspace{0.05cm}.$$
Line 36: Line 34:
  
  
''Hinweise:''
+
Hints:
*Die Aufgabe gehört zum  Kapitel&nbsp; [[Informationstheorie/Differentielle_Entropie|Differentielle Entropie]].
+
*The exercise 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 &bdquo;Kontinuierliche Zufallsgrößen&rdquo; des Buches&nbsp;  [[Stochastische Signaltheorie]].
+
*Useful hints for solving this problem and further information on continuous random variables can be found in the third chapter&nbsp; "Continuous Random Variables"&nbsp; of the book&nbsp;  [[Theory of Stochastic Signals]].
 
   
 
   
*Gegeben ist zudem das folgende unbstimmte Integral:
+
*Given also is the following indefinite integral:
 
:$$\int \hspace{0.1cm} \cos^2(A \eta) \hspace{0.1cm}{\rm d}\eta =  \frac{\eta}{2} + \frac{1}{4A} \cdot \sin(2A  \eta).$$
 
:$$\int \hspace{0.1cm} \cos^2(A \eta) \hspace{0.1cm}{\rm d}\eta =  \frac{\eta}{2} + \frac{1}{4A} \cdot \sin(2A  \eta).$$
  
  
  
===Fragebogen===
+
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Bestimmen Sie die WDF&nbsp; $f_X(x)$&nbsp; der wertdiskreten Zufallsgröße&nbsp; $X$.&nbsp; Welche der folgenden Aussagen sind zutreffend?
+
{Determine the PDF&nbsp; $f_X(x)$&nbsp; of the  discrete random variable&nbsp; $X$.&nbsp; Which of the following statements are true?
 
|type="[]"}
 
|type="[]"}
+ Die WDF setzt sich aus fünf Diracfunktionen zusammen.
+
+ The PDF is composed of five Dirac functions.
+ Es gilt &nbsp;${\rm Pr}(X= 0) = 0.4$ &nbsp;und&nbsp; ${\rm Pr}(X= 1) = 0.2$.
+
+ &nbsp;${\rm Pr}(X= 0) = 0.4$&nbsp; &nbsp;and&nbsp; ${\rm Pr}(X= 1) = 0.2$&nbsp; are true.
- Es gilt &nbsp;${\rm Pr}(X= 2) = 0.4$.
+
- &nbsp;${\rm Pr}(X= 2) = 0.4$&nbsp; is true.
  
  
{Berechnen Sie die folgenden Wahrscheinlichkeiten:
+
{Calculate the following probabilities:
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(X > 0) \ =  \ $  { 0.3 3% }
 
${\rm Pr}(X > 0) \ =  \ $  { 0.3 3% }
 
${\rm Pr}(|X| ≤ 1) \ =  \ $ { 0.8 3% }
 
${\rm Pr}(|X| ≤ 1) \ =  \ $ { 0.8 3% }
  
{Welche Werte ergeben sich für die Verteilungsfunktion&nbsp; $F_Y(y)  ={\rm Pr}(Y \le y)$&nbsp; der wertkontinuierlichen Zufallsgröße&nbsp; $Y$,&nbsp; insbesondere:
+
{What are the values of the cumulative distribution function&nbsp; $F_Y(y)  ={\rm Pr}(Y \le y)$&nbsp; of the  continuous random variable&nbsp; $Y$,&nbsp; in particular:
 
|type="{}"}
 
|type="{}"}
 
$F_Y(y = 0) \ =  \ $ { 0.5 3% }
 
$F_Y(y = 0) \ =  \ $ { 0.5 3% }
Line 66: Line 64:
 
$F_Y(y = 2) \ =  \ $ { 1 3% }
 
$F_Y(y = 2) \ =  \ $ { 1 3% }
  
{Wie groß ist die Wahrscheinlichkeit, dass &nbsp;$Y = 0$&nbsp; ist?
+
{What is the probability that &nbsp;$Y = 0$&nbsp;?
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(Y = 0) \ =  \ $ { 0. }
 
${\rm Pr}(Y = 0) \ =  \ $ { 0. }
  
{Welche der folgenden Aussagen sind richtig?
+
{Which of the following statements are correct?|type="[]"}
|type="[]"}
+
- The result&nbsp; $Y = 0$&nbsp; is impossible.
- Das Ergebnis&nbsp; $Y = 0$&nbsp; ist unmöglich.
+
+ The result&nbsp; $Y = 3$&nbsp; is impossible.
+ Das Ergebnis&nbsp; $Y = 3$&nbsp; ist unmöglich.
 
  
{Wie groß sind die folgenden Wahrscheinlichkeiten?
+
{What are the following probabilities?
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(Y > 0) \ =  \ $ { 0.5 3% }
 
${\rm Pr}(Y > 0) \ =  \ $ { 0.5 3% }
Line 82: Line 79:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
[[File:P_ID2857__Inf_A_4_1a_neu.png|right|frame|WDF und VTF der diskreten Zufallsgröße ''X'']]
+
[[File:P_ID2857__Inf_A_4_1a_neu.png|right|frame|PDF and CDF of the discrete random variable&nbsp; $X$]]
'''(1)'''&nbsp; Richtig sind die <u>Lösungsvorschläge 1 und 2</u>:
+
'''(1)'''&nbsp; <u>Proposed solutions 1 and 2</u> are correct:
*Die Verteilungsfunktion (VTF) $F_X(x)$ ergibt sich aus der Wahrscheinlichkeitsdichtefunktion $f_X(x)$ durch Integration über die (umbenannte) Zufallsgröße im Bereich von $- \infty$ bis $x$.  
+
*The cumulative distribution function&nbsp; $F_X(x)$&nbsp; is obtained from the probability density function&nbsp; $f_X(x)$&nbsp; by integration over the (renamed) random variable in the range from&nbsp; $- \infty$&nbsp; to&nbsp; $x$.  
*Die Umkehrung lautet: &nbsp; Ist die VTF gegeben, so erhält man die WDF durch Differentiation.
+
*The inverse is: &nbsp; Given the CDF, obtain the PDF by differentiation.
*Die vorgegebene VTF beinhaltet fünf Unstetigkeitsstellen, die nach der Differentiation zu fünf Diracfunktionen führen:
+
*The given CDF contains five discontinuity points, which after differentiation lead to five Dirac functions:
 
:$$f_X(x) =  0.1 \cdot {\rm \delta}( x+2)  
 
:$$f_X(x) =  0.1 \cdot {\rm \delta}( x+2)  
 
+ 0.2 \cdot {\rm \delta}( x+1)   
 
+ 0.2 \cdot {\rm \delta}( x+1)   
 
  +  0.4 \cdot {\rm \delta}( x) + 0.2 \cdot {\rm \delta}( x-1)  
 
  +  0.4 \cdot {\rm \delta}( x) + 0.2 \cdot {\rm \delta}( x-1)  
 
   + 0.1 \cdot {\rm \delta}( x-2)\hspace{0.05cm}.$$
 
   + 0.1 \cdot {\rm \delta}( x-2)\hspace{0.05cm}.$$
*Die Diracgewichte geben die Auftrittswahrscheinlichkeiten der Zufallsgröße $X = \{-2, -1, 0, +1, +2\}$ an, zum Beispiel:
+
*The Dirac weights give the occurrence probabilities of the random variable&nbsp; $X = \{-2,\ -1,\ 0,\ +1,\ +2\}$&nbsp;, e.g.:
 
:$${\rm Pr}(X = 0) = F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-}) =
 
:$${\rm Pr}(X = 0) = F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-}) =
 
   0.7 - 0.3 = 0.4\hspace{0.05cm}.$$
 
   0.7 - 0.3 = 0.4\hspace{0.05cm}.$$
*Dementsprechend lauten die weiteren Wahrscheinlichkeiten:
+
*Accordingly, the other probabilities are:
 
:$${\rm Pr}(X = +1) = {\rm Pr}(X = -1) = 0.2\hspace{0.05cm},\hspace{0.3cm}
 
:$${\rm Pr}(X = +1) = {\rm Pr}(X = -1) = 0.2\hspace{0.05cm},\hspace{0.3cm}
 
{\rm Pr}(X = +2) = {\rm Pr}(X = -2) = 0.1\hspace{0.05cm}.$$
 
{\rm Pr}(X = +2) = {\rm Pr}(X = -2) = 0.1\hspace{0.05cm}.$$
  
  
'''(2)'''&nbsp; Aus der eben berechneten WDF erhält man:
+
 
 +
'''(2)'''&nbsp; From the PDF just calculated, we obtain:
 
:$${\rm Pr}(X >0) = {\rm Pr}(X = +1) + {\rm Pr}(X = +2)
 
:$${\rm Pr}(X >0) = {\rm Pr}(X = +1) + {\rm Pr}(X = +2)
 
\hspace{0.15cm}\underline {= 0.3}\hspace{0.05cm},$$
 
\hspace{0.15cm}\underline {= 0.3}\hspace{0.05cm},$$
Line 107: Line 105:
 
\hspace{0.15cm}\underline {= 0.8}\hspace{0.05cm}.$$
 
\hspace{0.15cm}\underline {= 0.8}\hspace{0.05cm}.$$
  
Zum gleichen Ergebnis kommt man über die Verteilungsfunktion. Hier lautet die allgemeine Gleichung, die für wertdiskrete und wertkontinuierliche Zufallsgrößen gleichermaßen gilt:
+
The same result is obtained using the CDF.&nbsp; Here the general equation, which is equally valid for discrete and continuous random variables, is:
 
:$${\rm Pr}(A < X \le B) =F_X(B) - F_X(A) \hspace{0.05cm}.$$  
 
:$${\rm Pr}(A < X \le B) =F_X(B) - F_X(A) \hspace{0.05cm}.$$  
  
* Mit $A= 0$ und $B = +2$ erhält man somit:
+
* Thus, with&nbsp; $A= 0$&nbsp; and&nbsp; $B = +2$&nbsp; we obtain:
 
:$${\rm Pr}(0 < X \le +2) = {\rm Pr}(X >0)= F_X(+2) - F_X(0) = 1 - 0.7 \hspace{0.15cm}\underline {= 0.3} \hspace{0.05cm}.$$
 
:$${\rm Pr}(0 < X \le +2) = {\rm Pr}(X >0)= F_X(+2) - F_X(0) = 1 - 0.7 \hspace{0.15cm}\underline {= 0.3} \hspace{0.05cm}.$$
*Setzt man $A=-2$ und $B = +1$, so ergibt sich:
+
*Setting&nbsp; $A=-2$&nbsp; and&nbsp; $B = +1$,&nbsp; we get:
 
:$${\rm Pr}(-2 < X \le +1) = {\rm Pr}(|X|  \le 1)= F_X(+1) - F_X(-2) = 0.9 - 0.1 \hspace{0.15cm}\underline {= 0.8} \hspace{0.05cm}.$$
 
:$${\rm Pr}(-2 < X \le +1) = {\rm Pr}(|X|  \le 1)= F_X(+1) - F_X(-2) = 0.9 - 0.1 \hspace{0.15cm}\underline {= 0.8} \hspace{0.05cm}.$$
  
  
[[File:P_ID2858__Inf_A_4_1c_neu.png|right|frame|WDF und VTF der kontinuierlichen Zufallsgröße ''Y'']]
+
 
'''(3)'''&nbsp; Die Verteilungsfunktion $F_Y(y)$ ergibt sich aus der (umbenannten) WDF $f_Y(\eta)$ durch Integration von $- \infty$ bis $x$. Aufgrund der Symmetrie kann hierfür im Bereich $0 \le y \le +2$ geschrieben werden:
+
[[File:P_ID2858__Inf_A_4_1c_neu.png|right|frame|PDF and CDF of the continuous random variable&nbsp; $Y$]]
 +
'''(3)'''&nbsp; The cumulative distribution function&nbsp; $F_Y(y)$&nbsp; is obtained from the (renamed) WDF&nbsp; $f_Y(\eta)$&nbsp; by integrating&nbsp; $- \infty$&nbsp; to&nbsp; $x$.&nbsp; Due to symmetry, this can be written in the range&nbsp; $0 \le y \le +2$:
 
:$$F_Y(y) = \int_{-\infty}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta ={1}/{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta$$
 
:$$F_Y(y) = \int_{-\infty}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta ={1}/{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta$$
 
:$$\Rightarrow \hspace{0.3cm}F_Y(y) = \frac{1}{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{0.1cm}\frac{1}{2} \cdot \cos^2({\pi}/{4} \cdot \eta) \hspace{0.1cm}{\rm d}\eta = \frac{1}{2}+\frac{y}{4} + \frac{1}{2\pi} \cdot \sin({\pi}/{2} \cdot y).$$
 
:$$\Rightarrow \hspace{0.3cm}F_Y(y) = \frac{1}{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{0.1cm}\frac{1}{2} \cdot \cos^2({\pi}/{4} \cdot \eta) \hspace{0.1cm}{\rm d}\eta = \frac{1}{2}+\frac{y}{4} + \frac{1}{2\pi} \cdot \sin({\pi}/{2} \cdot y).$$
Die Gleichung gilt im gesamten Bereich $0 \le y \le +2$. Die gesuchten VTF&ndash;Werte sind damit:
+
The equation holds in the entire range&nbsp; $0 \le y \le +2$.&nbsp; The CDF values we are looking for are thus:
*$F_Y(y=0)\hspace{0.15cm}\underline{= 0.5}$ (Integral über die halbe WDF),
+
*$F_Y(y=0)\hspace{0.15cm}\underline{= 0.5}$&nbsp; (integral over half the PDF),
*$F_Y(y=2)\hspace{0.15cm}\underline{= 1}$ (Integral über die gesamte WDF)
+
*$F_Y(y=1)= 3/4 + 1/(2 \pi)\hspace{0.15cm}\underline{= 0.909}$&nbsp; (area in red background in the PDF),
*$F_Y(y=1)= 3/4 + 1/(2 \pi)\hspace{0.15cm}\underline{= 0.909}$ (rot hinterlegte Fläche in der WDF)
+
*$F_Y(y=2)\hspace{0.15cm}\underline{= 1}$&nbsp; (integral over the entire PDF).
  
  
  
'''(4)'''&nbsp; Die Wahrscheinlichkeit, dass die wertkontinuierliche Zufallsgröße $Y$ im Bereich von $-\varepsilon$ bis $+\varepsilon$ liegt, kann mit der angegebenen Gleichung wie folgt berechnet werden:
+
'''(4)'''&nbsp; The probability that the continuous random variable&nbsp; $Y$&nbsp; lies in the range from&nbsp; $-\varepsilon$&nbsp; to&nbsp; $+\varepsilon$&nbsp; can be calculated using the given equation as follows:
 
:$${\rm Pr}(-\varepsilon \le Y \le +\varepsilon) = F_Y(+\varepsilon) - F_Y(-\varepsilon) \hspace{0.05cm}.$$
 
:$${\rm Pr}(-\varepsilon \le Y \le +\varepsilon) = F_Y(+\varepsilon) - F_Y(-\varepsilon) \hspace{0.05cm}.$$
  
Berücksichtigt wurde, dass man bei der kontinuierlichen Zufallsgröße $Y$ das &bdquo;<&rdquo;&ndash;Zeichen ohne Verfälschung durch das &bdquo;&#8804;&rdquo;&ndash;Zeichen ersetzen kann. Mit dem Grenzübergang $\varepsilon \to 0$ ergibt sich die gesuchte Wahrscheinlichkeit:
+
*It was taken into account that for the random variable&nbsp; $Y$&nbsp; the "<"sign can be replaced by the "&#8804;" sign without distortion.
 +
*With the boundary transition&nbsp; $\varepsilon \to 0$,&nbsp; the probability we are looking for is obtained:
 
:$${\rm Pr}(Y = 0)  =\lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm}{\rm Pr}(-\varepsilon \le Y \le +\varepsilon) =  
 
:$${\rm Pr}(Y = 0)  =\lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm}{\rm Pr}(-\varepsilon \le Y \le +\varepsilon) =  
 
\lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm} F_Y(+\varepsilon) - \lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm} F_Y(-\varepsilon) =
 
\lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm} F_Y(+\varepsilon) - \lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm} F_Y(-\varepsilon) =
 
     F_Y(y \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_Y(y \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-})\hspace{0.05cm}.$$
 
     F_Y(y \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_Y(y \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-})\hspace{0.05cm}.$$
  
Da bei einer kontinuierlichen Zufallsgröße die beiden Grenzwerte gleich sind, gilt $\underline{{\rm Pr}(Y = 0) = 0}$.
+
*Since for a continuous random variable the two limits are equal, $\underline{{\rm Pr}(Y = 0) = 0}$.
 +
 
 +
 
 +
'''In general''': &nbsp; The probability&nbsp; ${\rm Pr}(Y = y_0)$&nbsp; that a continuous  random variable&nbsp; $Y$&nbsp; takes a fixed value&nbsp; $y_0$,&nbsp; is always zero.
  
<u>Allgemein gilt:</u> &nbsp; Die Wahrscheinlichkeit ${\rm Pr}(Y = y_0)$, dass eine wertkontinuierliche Zufallsgröße $Y$ einen festen Wert $y_0$ annimmt, ist stets $0$.
 
  
  
'''(5)'''&nbsp; Richtig ist der <u>Lösungsvorschlag 2</u>:  
+
'''(5)'''&nbsp; <u>Proposed solution 2</u> is correct:  
*Aufgrund der vorliegenden WDF kann das Ergebnis $Y=3$ ausgeschlossen werden.  
+
*Based on the PDF at hand, the result&nbsp; $Y=3$&nbsp; can be excluded.
*Das Ergebnis $Y=0$ ist dagegen durchaus möglich, obwohl ${\rm Pr}(Y = 0) = 0$ ist.  
+
*The result&nbsp; $Y=0$&nbsp; on the other hand is quite possible, although&nbsp; ${\rm Pr}(Y = 0) = 0$&nbsp;.
*Führt man zum Beispiel ein Zufallsexperiment $N \to \infty$ mal durch und erhält dabei $N_0$ mal das Ergebnis $Y= 0$, so gilt bei endlichem $N_0$ nach der klassischen Definition der Wahrscheinlichkeit:
+
*For example, if one performs a random experiment&nbsp; $N \to \infty$&nbsp; times and obtains the result&nbsp; $Y= 0$ &nbsp; for&nbsp; $N_0$&nbsp; times, then with finite &nbsp; $N_0$&nbsp; according to the classical definition of probability:
 
:$${\rm Pr}(Y = 0) = \lim_{N\hspace{0.05cm}\rightarrow\hspace{0.05cm}\infty}\hspace{0.1cm}{N_0}/{N} = 0\hspace{0.05cm}.$$
 
:$${\rm Pr}(Y = 0) = \lim_{N\hspace{0.05cm}\rightarrow\hspace{0.05cm}\infty}\hspace{0.1cm}{N_0}/{N} = 0\hspace{0.05cm}.$$
  
  
'''(6)'''&nbsp; Wir gehen wieder von der von der für die kontinuierliche Zufallsgröße $Y$ gültigen Gleichung &nbsp; $ {\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A)$&nbsp; aus:  
+
'''(6)'''&nbsp; We again assume the equation&nbsp; $ {\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A)$&nbsp; &nbsp; valid for the continuous random quantity &nbsp;$Y$:
*Mit $A = 0$ und $B \to \infty$ (bzw. $B = 2$) erhält man:
+
*With&nbsp; $A = 0$&nbsp; and&nbsp; $B \to \infty$&nbsp; $($or&nbsp; $B = 2)$&nbsp; we obtain:
 
:$${\rm Pr}( Y > 0) = {\rm Pr}(0 \le Y \le \infty)  
 
:$${\rm Pr}( Y > 0) = {\rm Pr}(0 \le Y \le \infty)  
 
= {\rm Pr}(0 \le Y \le 2) = F_Y(2) - F_Y(0)  
 
= {\rm Pr}(0 \le Y \le 2) = F_Y(2) - F_Y(0)  
 
\hspace{0.15cm}\underline {= 0.5}\hspace{0.05cm}.$$
 
\hspace{0.15cm}\underline {= 0.5}\hspace{0.05cm}.$$
*Bei der symmetrischen kontinuierlichen Zufallsgröße $Y$ ist also tatsächlich erwartungsgemäß &nbsp;${\rm Pr}( Y > 0) = 1/2$.  
+
*Thus, for the symmetric continuous random variable&nbsp; $Y$&nbsp;  holds indeed as expected: &nbsp;${\rm Pr}( Y > 0) = 1/2$.  
*Obwohl auch die wertdiskrete Zufallsgröße $X$ symmetrisch um &nbsp;$x= 0$&nbsp; ist, wurde dagegen oben &nbsp;${\rm Pr}( X > 0)  = 0.3$&nbsp; ermittelt.  
+
*Although the discrete random variable&nbsp; $X$&nbsp; is also symmetrical about&nbsp;$x= 0$ &nbsp; &rArr; &nbsp; ${\rm Pr}( X > 0)  = 0.3$&nbsp; was determined in subtask&nbsp; '''(3)''', on the other hand.  
*Weiter erhält man mit &nbsp;$A = -1$&nbsp; und &nbsp;$B = +1$&nbsp; wegen &nbsp;$F_Y(-1) = 1- F_Y(+1)$:
+
*Further, with &nbsp;$A = -1$&nbsp; and &nbsp;$B = +1$,&nbsp; one obtains because of&nbsp;$F_Y(-1) = 1- F_Y(+1)$:
 
:$${\rm Pr}( |Y| \le 1)  =  {\rm Pr}(-1 \le Y \le +1)  
 
:$${\rm Pr}( |Y| \le 1)  =  {\rm Pr}(-1 \le Y \le +1)  
 
=  F_Y(+1) - F_Y(-1)  =  2 \cdot F_Y(+1) -1 = 2 \cdot 0.909 -1 \hspace{0.15cm}\underline {= 0.818}. $$
 
=  F_Y(+1) - F_Y(-1)  =  2 \cdot F_Y(+1) -1 = 2 \cdot 0.909 -1 \hspace{0.15cm}\underline {= 0.818}. $$
Line 163: Line 165:
  
  
[[Category:Aufgaben zu Informationstheorie|^4.1  Differentielle Entropie^]]
+
[[Category:Information Theory: Exercises|^4.1  Differential Entropy^]]

Latest revision as of 09:27, 11 October 2021

$\rm (CDF)$  (top),  $\rm (PDF)$  (bottom)

To repeat some important basics from the book "Theory of Stochastic Signals" we are dealing with


The upper plot shows the cumulative distribution function  $F_X(x)$  of a discrete random variable  $X$.  The corresponding probability density function  $f_X(x)$  has to be determined in subtask  (1).

The equation

$$ {\rm Pr}(A < X \le B) = F_X(B) - F_X(A) = \lim_{\varepsilon \hspace{0.05cm}\rightarrow \hspace{0.05cm}0} \int_{A+\varepsilon}^{B+\varepsilon} \hspace{-0.15cm} f_X(x) \hspace{0.1cm}{\rm d}x $$

represents two ways to calculate the probability for the event  "The random variable  $X$  lies in a given interval"  from the CDF and the PDF,  respectively.

The lower graph shows the probability density function

$$ f_Y(y) = \left\{ \begin{array}{c} \hspace{0.1cm}1/2 \cdot \cos^2(\pi/4 \cdot y) \\ \hspace{0.1cm} 0 \\ \end{array} \right.\quad \begin{array}{*{20}c} {\rm{f\ddot{u}r}} \\ {\rm{f\ddot{u}r}} \\ \end{array}\begin{array}{*{20}l} | y| \le 2, \\ y < -2 \hspace{0.1cm}{\rm und}\hspace{0.1cm}y > +2 \\ \end{array}$$

of a continuous random variable  $Y$,  which is restricted to the range  $|Y| \le 2$ .  In principle, the same relationship between PDF, CDF and probabilities exists for the continuous random variable  $Y$  as for a discrete random variable.  Nevertheless, you will notice some differences in details.

For example, for the continuous random variable  $Y$,  the boundary transition can be omitted in the above equation, and we obtain simplified:

$${\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A) =\int_{A}^{B} \hspace{-0.01cm} f_Y(y) \hspace{0.1cm}{\rm d}y\hspace{0.05cm}.$$





Hints:

  • The exercise belongs to the chapter  Differential Entropy.
  • Useful hints for solving this problem 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 also is the following indefinite integral:
$$\int \hspace{0.1cm} \cos^2(A \eta) \hspace{0.1cm}{\rm d}\eta = \frac{\eta}{2} + \frac{1}{4A} \cdot \sin(2A \eta).$$


Questions

1

Determine the PDF  $f_X(x)$  of the discrete random variable  $X$.  Which of the following statements are true?

The PDF is composed of five Dirac functions.
 ${\rm Pr}(X= 0) = 0.4$   and  ${\rm Pr}(X= 1) = 0.2$  are true.
 ${\rm Pr}(X= 2) = 0.4$  is true.

2

Calculate the following probabilities:

${\rm Pr}(X > 0) \ = \ $

${\rm Pr}(|X| ≤ 1) \ = \ $

3

What are the values of the cumulative distribution function  $F_Y(y) ={\rm Pr}(Y \le y)$  of the continuous random variable  $Y$,  in particular:

$F_Y(y = 0) \ = \ $

$F_Y(y = 1) \ = \ $

$F_Y(y = 2) \ = \ $

4

What is the probability that  $Y = 0$ ?

${\rm Pr}(Y = 0) \ = \ $

5

Which of the following statements are correct?|type="[]"

The result  $Y = 0$  is impossible.
The result  $Y = 3$  is impossible.

6

What are the following probabilities?

${\rm Pr}(Y > 0) \ = \ $

${\rm Pr}(|Y| ≤ 1) \ = \ $


Solution

PDF and CDF of the discrete random variable  $X$

(1)  Proposed solutions 1 and 2 are correct:

  • The cumulative distribution function  $F_X(x)$  is obtained from the probability density function  $f_X(x)$  by integration over the (renamed) random variable in the range from  $- \infty$  to  $x$.
  • The inverse is:   Given the CDF, obtain the PDF by differentiation.
  • The given CDF contains five discontinuity points, which after differentiation lead to five Dirac functions:
$$f_X(x) = 0.1 \cdot {\rm \delta}( x+2) + 0.2 \cdot {\rm \delta}( x+1) + 0.4 \cdot {\rm \delta}( x) + 0.2 \cdot {\rm \delta}( x-1) + 0.1 \cdot {\rm \delta}( x-2)\hspace{0.05cm}.$$
  • The Dirac weights give the occurrence probabilities of the random variable  $X = \{-2,\ -1,\ 0,\ +1,\ +2\}$ , e.g.:
$${\rm Pr}(X = 0) = F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-}) = 0.7 - 0.3 = 0.4\hspace{0.05cm}.$$
  • Accordingly, the other probabilities are:
$${\rm Pr}(X = +1) = {\rm Pr}(X = -1) = 0.2\hspace{0.05cm},\hspace{0.3cm} {\rm Pr}(X = +2) = {\rm Pr}(X = -2) = 0.1\hspace{0.05cm}.$$


(2)  From the PDF just calculated, we obtain:

$${\rm Pr}(X >0) = {\rm Pr}(X = +1) + {\rm Pr}(X = +2) \hspace{0.15cm}\underline {= 0.3}\hspace{0.05cm},$$
$${\rm Pr}(|X| \le 1) ={\rm Pr}(X = -1) + {\rm Pr}(X = 0) + {\rm Pr}(X = +1) = 0.2 + 0.4 +0.2 \hspace{0.15cm}\underline {= 0.8}\hspace{0.05cm}.$$

The same result is obtained using the CDF.  Here the general equation, which is equally valid for discrete and continuous random variables, is:

$${\rm Pr}(A < X \le B) =F_X(B) - F_X(A) \hspace{0.05cm}.$$
  • Thus, with  $A= 0$  and  $B = +2$  we obtain:
$${\rm Pr}(0 < X \le +2) = {\rm Pr}(X >0)= F_X(+2) - F_X(0) = 1 - 0.7 \hspace{0.15cm}\underline {= 0.3} \hspace{0.05cm}.$$
  • Setting  $A=-2$  and  $B = +1$,  we get:
$${\rm Pr}(-2 < X \le +1) = {\rm Pr}(|X| \le 1)= F_X(+1) - F_X(-2) = 0.9 - 0.1 \hspace{0.15cm}\underline {= 0.8} \hspace{0.05cm}.$$


PDF and CDF of the continuous random variable  $Y$

(3)  The cumulative distribution function  $F_Y(y)$  is obtained from the (renamed) WDF  $f_Y(\eta)$  by integrating  $- \infty$  to  $x$.  Due to symmetry, this can be written in the range  $0 \le y \le +2$:

$$F_Y(y) = \int_{-\infty}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta ={1}/{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta$$
$$\Rightarrow \hspace{0.3cm}F_Y(y) = \frac{1}{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{0.1cm}\frac{1}{2} \cdot \cos^2({\pi}/{4} \cdot \eta) \hspace{0.1cm}{\rm d}\eta = \frac{1}{2}+\frac{y}{4} + \frac{1}{2\pi} \cdot \sin({\pi}/{2} \cdot y).$$

The equation holds in the entire range  $0 \le y \le +2$.  The CDF values we are looking for are thus:

  • $F_Y(y=0)\hspace{0.15cm}\underline{= 0.5}$  (integral over half the PDF),
  • $F_Y(y=1)= 3/4 + 1/(2 \pi)\hspace{0.15cm}\underline{= 0.909}$  (area in red background in the PDF),
  • $F_Y(y=2)\hspace{0.15cm}\underline{= 1}$  (integral over the entire PDF).


(4)  The probability that the continuous random variable  $Y$  lies in the range from  $-\varepsilon$  to  $+\varepsilon$  can be calculated using the given equation as follows:

$${\rm Pr}(-\varepsilon \le Y \le +\varepsilon) = F_Y(+\varepsilon) - F_Y(-\varepsilon) \hspace{0.05cm}.$$
  • It was taken into account that for the random variable  $Y$  the "<"sign can be replaced by the "≤" sign without distortion.
  • With the boundary transition  $\varepsilon \to 0$,  the probability we are looking for is obtained:
$${\rm Pr}(Y = 0) =\lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm}{\rm Pr}(-\varepsilon \le Y \le +\varepsilon) = \lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm} F_Y(+\varepsilon) - \lim_{\varepsilon\hspace{0.05cm}\rightarrow\hspace{0.05cm}0}\hspace{0.1cm} F_Y(-\varepsilon) = F_Y(y \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_Y(y \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-})\hspace{0.05cm}.$$
  • Since for a continuous random variable the two limits are equal, $\underline{{\rm Pr}(Y = 0) = 0}$.


In general:   The probability  ${\rm Pr}(Y = y_0)$  that a continuous random variable  $Y$  takes a fixed value  $y_0$,  is always zero.


(5)  Proposed solution 2 is correct:

  • Based on the PDF at hand, the result  $Y=3$  can be excluded.
  • The result  $Y=0$  on the other hand is quite possible, although  ${\rm Pr}(Y = 0) = 0$ .
  • For example, if one performs a random experiment  $N \to \infty$  times and obtains the result  $Y= 0$   for  $N_0$  times, then with finite   $N_0$  according to the classical definition of probability:
$${\rm Pr}(Y = 0) = \lim_{N\hspace{0.05cm}\rightarrow\hspace{0.05cm}\infty}\hspace{0.1cm}{N_0}/{N} = 0\hspace{0.05cm}.$$


(6)  We again assume the equation  $ {\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A)$    valid for the continuous random quantity  $Y$:

  • With  $A = 0$  and  $B \to \infty$  $($or  $B = 2)$  we obtain:
$${\rm Pr}( Y > 0) = {\rm Pr}(0 \le Y \le \infty) = {\rm Pr}(0 \le Y \le 2) = F_Y(2) - F_Y(0) \hspace{0.15cm}\underline {= 0.5}\hspace{0.05cm}.$$
  • Thus, for the symmetric continuous random variable  $Y$  holds indeed as expected:  ${\rm Pr}( Y > 0) = 1/2$.
  • Although the discrete random variable  $X$  is also symmetrical about $x= 0$   ⇒   ${\rm Pr}( X > 0) = 0.3$  was determined in subtask  (3), on the other hand.
  • Further, with  $A = -1$  and  $B = +1$,  one obtains because of $F_Y(-1) = 1- F_Y(+1)$:
$${\rm Pr}( |Y| \le 1) = {\rm Pr}(-1 \le Y \le +1) = F_Y(+1) - F_Y(-1) = 2 \cdot F_Y(+1) -1 = 2 \cdot 0.909 -1 \hspace{0.15cm}\underline {= 0.818}. $$