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

From LNTwww
No edit summary
Fix interlanguage link: resolve redirect chain
 
(34 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_ID2862__Inf_A_4_1_neu.png|right|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. Die Gleichung
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 $$
:$$ {\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 die Wahrscheinlichkeit für das Ereignis „Die Zufallsgröße $X$ liegt in einem Intervall” aus der VTF bzw. der WDF 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.
 
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&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.
 
For example, for the continuous random variable&nbsp; $Y$,&nbsp; 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}.$$
 
 
 
 
 
 
 
 


Die untere Grafik zeigt die Wahrscheinlichkeitsdichtefunktion
Hints:
:$$ 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, \\  
*The exercise belongs to the chapter&nbsp; [[Information_Theory/Differentielle_Entropie|Differential Entropy]].
y < -2 \hspace{0.1cm}{\rm und}\hspace{0.1cm}y > +2 \\ \end{array}$$
*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]].
einer wertkontinuierlichen Zufallsgröße $Y$, die auf den Bereich $|Y| \le 2$ begrenzt ist.
*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).$$


Prinzipiell besteht bei der kontinuierlichen Zufallsgröße $Y$ der gleiche Zusammenhang zwischen WDF, VTF und Wahrscheinlichkeiten wie bei einer diskreten Zufallsgröße. Sie werden trotzdem einige Detailunterschiede feststellen. Beispielsweise kann bei der kontinuierlichen Zufallsgröße $Y$ 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)
\hspace{0.1cm}{\rm d}y\hspace{0.05cm}$$.


''Hinweise:''
*Die Aufgabe gehört zum  Kapitel [[Informationstheorie/Differentielle_Entropie|Differentielle Entropie]].
*Nützliche Hinweise zur Lösung dieser Aufgabe und weitere Informationen zu den wertkontinuierlichen Zufallsgrößen finden Sie im Kapitel &bdquo;Kontinuierliche Zufallsgrößen&rdquo; des Buches  [[Stochastische Signaltheorie]].
*Sollte die Eingabe des Zahlenwertes &bdquo;0&rdquo; erforderlich sein, so geben Sie bitte &bdquo;0.&rdquo; ein.
*Gegeben ist zudem das folgende unbstimmte 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)$$.


===Fragebogen===
===Questions===


<quiz display=simple>
<quiz display=simple>
{Bestimmen Sie die WDF <i>f<sub>X</sub></i>(<i>x</i>) der wertdiskreten Zufallsgröße <i>X</i>. 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 Pr(<i>X</i> = 0) = 0.4 und Pr(<i>X</i> = 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 Pr(<i>X</i> = 2) = 0.4.
- &nbsp;${\rm Pr}(X= 2) = 0.4$&nbsp; is true.




{Berechnen Sie die folgenden Wahrscheinlichkeiten:
{Calculate the following probabilities:
|type="{}"}
|type="{}"}
$Pr(X > 0)$ = { 0.3 3% }
${\rm Pr}(X > 0) \ =  \ $ { 0.3 3% }
$Pr(|X| ≤ 1)$ = { 0.8 3% }
${\rm Pr}(|X| ≤ 1) \ =  \ $ { 0.8 3% }


{Welche Werte ergeben sich für die Verteilungsfunktion <i>F<sub>Y</sub></i>(<i>y</i>) = Pr(<i>Y</i> &#8804; <i>y</i>) der wertkontinuierlichen Zufallsgröße <i>Y</i>, 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% }
$F_Y(y = 1)$ = { 1 3% }
$F_Y(y = 1) \ =  \ $ { 0.909 3% }
$F_Y(y = 2)$ = { 0.909 3% }
$F_Y(y = 2) \ =  \ $ { 1 3% }


{Wie groß ist die Wahrscheinlichkeit, dass <i>Y</i> = 0 ist?
{What is the probability that &nbsp;$Y = 0$&nbsp;?
|type="{}"}
|type="{}"}
$Pr(Y = 0)$ = { 0 3% }
${\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 <i>Y</i> = 0 ist unmöglich.
+ The result&nbsp; $Y = 3$&nbsp; is impossible.
+ Das Ergebnis <i>Y</i> = 3 ist unmöglich.


{Wie groß sind die folgenden Wahrscheinlichkeiten?
{What are the following probabilities?
|type="{}"}
|type="{}"}
$Pr(Y > 0)$ = { 0.5 3% }
${\rm Pr}(Y > 0) \ =  \ $ { 0.5 3% }
$Pr(|Y| ≤ 1)$ = { 0.818 3% }
${\rm Pr}(|Y| ≤ 1) \ =  \ $ { 0.818 3% }


</quiz>
</quiz>


===Musterlösung===
===Solution===
{{ML-Kopf}}
{{ML-Kopf}}
[[File:P_ID2857__Inf_A_4_1a_neu.png|right|]]
[[File:P_ID2857__Inf_A_4_1a_neu.png|right|frame|PDF and CDF of the discrete random variable&nbsp; $X$]]
<b>a)</b>&nbsp;&nbsp;Die Verteilungsfunktion (VTF) <i>F<sub>X</sub></i>(<i>x</i>) ergibt sich aus der Wahrscheinlichkeitsdichtefunktion <i>f<sub>X</sub></i>(<i>x</i>) durch Integration über die (umbenannte) Zufallsgröße im Bereich von &ndash;&#8734; bis <i>x</i>. Die Umkehrung lautet: Ist die VTF gegeben, so erhält man die WDF durch Differentiation.
'''(1)'''&nbsp; <u>Proposed solutions 1 and 2</u> are correct:
Die vorgegebene VTF beinhaltet fünf Unstetigkeitsstellen, die nach der Differentiation zu fünf Diracfunktionen führen:
*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$.  
$$f_X(x) \hspace{-0.15cm}  = \hspace{-0.15cm} 0.1 \cdot {\rm \delta}( x+2)  
*The inverse is: &nbsp; Given the CDF, obtain the PDF by differentiation.
+ 0.2 \cdot {\rm \delta}( x+1)  $$ $$\
*The given CDF contains five discontinuity points, which after differentiation lead to five Dirac functions:
+ \hspace{-0.15cm} 0.4 \cdot {\rm \delta}( x) + 0.2 \cdot {\rm \delta}( x-1) $$ $$\
:$$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}.$$
  +\hspace{-0.15cm} 0.1 \cdot {\rm \delta}( x-2)\hspace{0.05cm}.$$
*The Dirac weights give the occurrence probabilities of the random variable&nbsp; $X = \{-2,\ -1,\ 0,\ +1,\ +2\}$&nbsp;, e.g.:
Die Diracgewichte geben die Auftrittswahrscheinlichkeiten der Zufallsgröße <i>X</i>&nbsp;=&nbsp;{&ndash;2,&nbsp;&ndash;1,&nbsp;0,&nbsp;+1,&nbsp;+2} an, zum Beispiel:
:$${\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}.$$
$${\rm Pr}(X = 0) \hspace{-0.15cm} \hspace{-0.15cm} F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{+}) - F_X(x \hspace{0.05cm}\rightarrow\hspace{0.05cm}0^{-})$$ $$=\
*Accordingly, the other probabilities are:
\hspace{-0.15cm} 0.7 - 0.3 = 0.4\hspace{0.05cm}.$$
:$${\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}.$$
Dementsprechend lauten die weiteren Wahrscheinlichkeiten:
 
$${\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}.$$
 
Richtig sind somit die <u>Lösungsvorschläge 1 und 2</u>.
'''(2)'''&nbsp; 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.&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}.$$
 
* 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}.$$
*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}.$$
 
 
 
[[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$$
:$$\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&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}$&nbsp; (integral over half the PDF),
*$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=2)\hspace{0.15cm}\underline{= 1}$&nbsp; (integral over the entire PDF).


<b>b)</b>&nbsp;&nbsp;Aus der eben berechneten WDF erhält man:
$${\rm Pr}(X >0) \hspace{-0.15cm}  =  \hspace{-0.15cm} {\rm Pr}(X = +1) + {\rm Pr}(X = +2)
\hspace{0.15cm}\underline {= 0.3}\hspace{0.05cm},$$ $$\
{\rm Pr}(|X| \le 1) \hspace{-0.15cm}  =  \hspace{-0.15cm}
{\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}.$$


Zum gleichen Ergebnis kommt man über die Verteilungsfunktion. Hier lautet die allgemeine Gleichung, die für wertdiskrete und wertkontinuierliche Zufallsgrößen gleichermaßen gilt:
$${\rm Pr}(A < X \le B) =F_X(B) - F_X(A) \hspace{0.05cm}.$$


:* Mit <i>A</i> = 0 und <i>B</i> = +2 erhält man somit:
'''(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}(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}(-\varepsilon \le Y \le +\varepsilon) = F_Y(+\varepsilon) - F_Y(-\varepsilon) \hspace{0.05cm}.$$
:*Setzt man A = –2 und B = +1, so ergibt sich:
$${\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}.$$


<b>c)</b>&nbsp;&nbsp;Die Verteilungsfunktion <i>F<sub>Y</sub></i>(<i>y</i>) ergibt sich aus der (umbenannten) WDF <i>f<sub>Y</sub></i>(<i>&eta;</i>) durch Integration von <nobr>&ndash;&#8734; bis <i>y</i></nobr>. Aufgrund der Symmetrie kann hierfür im Bereich 0 &#8804; <i>y</i> &#8804; 2 geschrieben werden:
*It was taken into account that for the random variable&nbsp; $Y$&nbsp; the "<"sign can be replaced by the "&#8804;" sign without distortion.
$$F_Y(y) = \int_{-\infty}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta =\frac{1}{2}+\int_{0}^{\hspace{0.05cm}y} \hspace{-0.1cm}f_Y(\eta) \hspace{0.1cm}{\rm d}\eta.$$
*With the boundary transition&nbsp; $\varepsilon \to 0$,&nbsp; the probability we are looking for is obtained:
$$\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(\frac{\pi}{4} \cdot \eta) \hspace{0.1cm}{\rm d}\eta =  \frac{1}{2}+\frac{y}{4} + \frac{1}{2\pi} \cdot \sin(\frac{\pi}{2} \cdot y).$$
:$${\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}.$$
[[File:P_ID2858__Inf_A_4_1c_neu.png|right|]]
Die Gleichung gilt im gesamten Bereich &ndash;2 &#8804; <i>y</i> &#8804; +2. Die gesuchten VTF&ndash;Werte sind damit:
:*<i>F<sub>Y</sub></i>(<i>y</i> = 0)<u> = 0.5</u> (Integral über die halbe WDF)
:*<i>F<sub>Y</sub></i>(<i>y</i> = 2)<u> = 1</u> (Integral über die gesamte WDF)
:*<i>F<sub>Y</sub></i>(<i>y</i><u> = 1)</u> = 3/4 + 1/(2 <i>&pi;</i>) <u>&asymp; 0.909</u> (rot hinterlegte Fläche in der WDF)


<br><b>d)</b>&nbsp;&nbsp;Die Wahrscheinlichkeit, dass die wertkontinuierliche Zufallsgröße <i>Y</i> im Bereich von &ndash;<i>&epsilon;</i> bis +<i>&epsilon;</i> liegt, kann mit der angegebenen Gleichung wie folgt berechnet werden:
*Since for a continuous random variable the two limits are equal, $\underline{{\rm Pr}(Y = 0) = 0}$.
$${\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 <i>Y</i> das &bdquo;<&rdquo;&ndash;Zeichen ohne Verfälschung durch das &bdquo;&#8804;&rdquo;&ndash;Zeichen ersetzen kann. Mit dem Grenzübergang <i>&epsilon;</i> &#8594; 0  ergibt sich die gesuchte Wahrscheinlichkeit:
$${\rm Pr}(Y = 0)  \hspace{-0.15cm}  =  \hspace{-0.15cm} \ 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)$$ $$=\
    \hspace{-0.15cm} 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 <u>Pr(<i>Y</i> = 0) = 0</u>.
'''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> Die Wahrscheinlichkeit Pr(<i>Y</i> = <i>y</i><sub>0</sub>), dass eine wertkontinuierliche Zufallsgröße <i>Y</i> einen festen Wert <i>y</i><sub>0</sub> annimmt, ist stets 0.


<b>e)</b>&nbsp;&nbsp;Richtig ist der <u>Lösungsvorschlag 2</u>: Aufgrund der vorliegenden WDF kann das Ergebnis <i>Y</i> = 3 ausgeschlossen werden. Das Ergebnis <i>Y</i> = 0 ist dagegen durchaus möglich, obwohl Pr(<i>Y</i> = 0) = 0 ist. Führt man zum Beispiel ein Zufallsexperiment <i>N</i> &#8594; &#8734; mal durch und erhält dabei <i>N</i><sub>0</sub> mal das Ergebnis <i>Y</i> = 0, so gilt bei endlichem <i>N</i><sub>0</sub> nach der klassischen Definition:
$${\rm Pr}(Y = 0) = \lim_{N\hspace{0.05cm}\rightarrow\hspace{0.05cm}\infty}\hspace{0.1cm}{N_0}/{N} = 0\hspace{0.05cm}.$$


<b>f)</b>&nbsp;&nbsp;Wir gehen wieder von der Gleichung Pr(<i>A</i> &#8804; <i>Y</i> &#8804; <i>B</i>) = <i>F<sub>Y</sub></i>(<i>B</i>) &ndash; <i>F<sub>Y</Sub></i>(<i>A</i>) aus. Mit <i>A</i> = 0 und <i>B</i> &#8594; &#8734; (bzw. <i>B</i> = 2) erhält man:
'''(5)'''&nbsp; <u>Proposed solution 2</u> is correct:
$${\rm Pr}( Y > 0) = {\rm Pr}(0 \le Y \le \infty)
*Based on the PDF at hand, the result&nbsp; $Y=3$&nbsp; can be excluded.
= {\rm Pr}(0 \le Y \le 2) = F_Y(2) - F_Y(0)
*The result&nbsp; $Y=0$&nbsp; on the other hand is quite possible, although&nbsp; ${\rm Pr}(Y = 0) = 0$&nbsp;.
\hspace{0.15cm}\underline {= 0.5}\hspace{0.05cm}.$$
*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}.$$


Bei der symmetrischen kontinuierlichen Zufallsgröße <i>Y</i> ist erwartungsgemäß Pr(<i>Y</i> > 0) = 1/2. Obwohl auch die wertdiskrete Zufallsgröße <i>X</i> symmetrisch um <i>x</i> = 0 ist, wurde dagegen oben Pr(<i>X</i> > 0) = 0.3 ermittelt. Weiter erhält man mit <i>A</i> = &ndash;1 und <i>B</i> = +1 wegen <i>F<sub>Y</Sub></i>(&ndash;1) = 1 &ndash;
<i>F<sub>Y</sub></i>(+1):


$${\rm Pr}( |Y| \le 1)  =  {\rm Pr}(-1 \le Y \le +1)  
'''(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$:
=  F_Y(+1) - F_Y(-1) $$ $$\
*With&nbsp; $A = 0$&nbsp; and&nbsp; $B \to \infty$&nbsp; $($or&nbsp; $B = 2)$&nbsp; we obtain:
   =  2 \cdot F_Y(+1) -1 = 2 \cdot 0.909 -1 \hspace{0.15cm}\underline {= 0.818}. $$
:$${\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&nbsp; $Y$&nbsp;  holds indeed as expected: &nbsp;${\rm Pr}( Y > 0) = 1/2$.
*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.
*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)=  F_Y(+1) - F_Y(-1)  =  2 \cdot F_Y(+1) -1 = 2 \cdot 0.909 -1 \hspace{0.15cm}\underline {= 0.818}. $$




Line 141: Line 151:




[[Category:Aufgaben zu Informationstheorie|^4.1  Differentielle Entropie^]]
[[Category:Information Theory: Exercises|^4.1  Differential Entropy^]]
[[de:Aufgaben:Aufgabe 4.1: WDF, VTF und Wahrscheinlichkeit]]

Latest revision as of 17:58, 16 March 2026

$\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}. $$