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

From LNTwww
Line 3: Line 3:
 
}}
 
}}
  
[[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|CDF (top) and PDF (bottom)]]
Zur Wiederholung einiger wichtiger Grundlagen aus dem Buch "Stochastische Signaltheorie"
+
To repeat some important basics from the book "Theory of Stochastic Signals"
 
beschäftigen wir uns mit
 
beschäftigen wir uns mit
* der  [[Theory_of_Stochastic_Signals/Wahrscheinlichkeitsdichtefunktion|Wahrscheinlichkeitsdichtefunktion]] (WDF),
+
* the  [[Theory_of_Stochastic_Signals/Wahrscheinlichkeitsdichtefunktion|probability density function]] (PDF),
* der  [[Theory_of_Stochastic_Signals/Verteilungsfunktion|Verteilungsfunktion]] (VTF).
+
* the  [[Theory_of_Stochastic_Signals/Verteilungsfunktion|cumulative distribution function]] (CDF).
  
  
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 distribution function  $F_X(x)$  of a discrete value random variable   $X$.  The corresponding PDF  $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, 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-valued random variable&nbsp; $Y$, which is restricted to the range&nbsp; $|Y| \le 2$&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 35:
  
  
''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 problem and further information on continuous-valued random variables can be found in the third chapter "Continuous Random Variables" 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>

Revision as of 22:51, 23 September 2021

CDF (top) and PDF (bottom)

To repeat some important basics from the book "Theory of Stochastic Signals" beschäftigen wir uns mit


The upper plot shows the distribution function  $F_X(x)$  of a discrete value random variable  $X$.  The corresponding PDF  $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-valued 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 task belongs to the chapter  Differential Entropy.
  • Useful hints for solving this problem and further information on continuous-valued 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

Bestimmen Sie die WDF  $f_X(x)$  der wertdiskreten Zufallsgröße  $X$.  Welche der folgenden Aussagen sind zutreffend?

Die WDF setzt sich aus fünf Diracfunktionen zusammen.
Es gilt  ${\rm Pr}(X= 0) = 0.4$  und  ${\rm Pr}(X= 1) = 0.2$.
Es gilt  ${\rm Pr}(X= 2) = 0.4$.

2

Berechnen Sie die folgenden Wahrscheinlichkeiten:

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

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

3

Welche Werte ergeben sich für die Verteilungsfunktion  $F_Y(y) ={\rm Pr}(Y \le y)$  der wertkontinuierlichen Zufallsgröße  $Y$,  insbesondere:

$F_Y(y = 0) \ = \ $

$F_Y(y = 1) \ = \ $

$F_Y(y = 2) \ = \ $

4

Wie groß ist die Wahrscheinlichkeit, dass  $Y = 0$  ist?

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

5

Welche der folgenden Aussagen sind richtig?

Das Ergebnis  $Y = 0$  ist unmöglich.
Das Ergebnis  $Y = 3$  ist unmöglich.

6

Wie groß sind die folgenden Wahrscheinlichkeiten?

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

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


Musterlösung

WDF und VTF der diskreten Zufallsgröße  $X$

(1)  Richtig sind die Lösungsvorschläge 1 und 2:

  • 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$.
  • Die Umkehrung lautet:   Ist die VTF gegeben, so erhält man die WDF durch Differentiation.
  • Die vorgegebene VTF beinhaltet fünf Unstetigkeitsstellen, die nach der Differentiation zu fünf Diracfunktionen führen:
$$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}.$$
  • Die Diracgewichte geben die Auftrittswahrscheinlichkeiten der Zufallsgröße  $X = \{-2,\ -1,\ 0,\ +1,\ +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}.$$
  • 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}.$$


(2)  Aus der eben berechneten WDF erhält man:

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

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  $A= 0$  und  $B = +2$  erhält man somit:
$${\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:
$${\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}.$$


WDF und VTF der kontinuierlichen Zufallsgröße  $Y$

(3)  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:

$$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).$$

Die Gleichung gilt im gesamten Bereich  $0 \le y \le +2$.  Die gesuchten VTF–Werte sind damit:

  • $F_Y(y=0)\hspace{0.15cm}\underline{= 0.5}$  (Integral über die halbe WDF),
  • $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}$  (Integral über die gesamte WDF).


(4)  Die Wahrscheinlichkeit, dass die wertkontinuierliche Zufallsgröße  $Y$  im Bereich von  $-\varepsilon$  bis  $+\varepsilon$  liegt, kann mit der angegebenen Gleichung wie folgt berechnet werden:

$${\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 "<"–Zeichen ohne Verfälschung durch das "≤"–Zeichen ersetzen kann.
  • Mit dem Grenzübergang  $\varepsilon \to 0$  ergibt sich die gesuchte Wahrscheinlichkeit:
$${\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}.$$
  • Da bei einer kontinuierlichen Zufallsgröße die beiden Grenzwerte gleich sind, gilt $\underline{{\rm Pr}(Y = 0) = 0}$.


Allgemein gilt:   Die Wahrscheinlichkeit  ${\rm Pr}(Y = y_0)$, dass eine wertkontinuierliche Zufallsgröße  $Y$  einen festen Wert  $y_0$  annimmt, ist stets Null.


(5)  Richtig ist der Lösungsvorschlag 2:

  • Aufgrund der vorliegenden WDF kann das Ergebnis  $Y=3$  ausgeschlossen werden.
  • Das Ergebnis  $Y=0$  ist dagegen durchaus möglich, obwohl  ${\rm Pr}(Y = 0) = 0$  ist.
  • 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:
$${\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)  Wir gehen wieder von der von der für die kontinuierliche Zufallsgröße  $Y$  gültigen Gleichung   $ {\rm Pr}(A \le Y \le B) = F_Y(B) - F_Y(A)$  aus:

  • Mit  $A = 0$  und  $B \to \infty$  $($bzw.  $B = 2)$  erhält man:
$${\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}.$$
  • Bei der symmetrischen kontinuierlichen Zufallsgröße  $Y$  ist also tatsächlich erwartungsgemäß  ${\rm Pr}( Y > 0) = 1/2$.
  • Obwohl auch die wertdiskrete Zufallsgröße  $X$  symmetrisch um  $x= 0$  ist, wurde in der Teilaufgabe  (3)  dagegen  ${\rm Pr}( X > 0) = 0.3$  ermittelt.
  • Weiter erhält man mit  $A = -1$  und  $B = +1$  wegen  $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}. $$