Difference between revisions of "Aufgaben:Exercise 4.8: Diamond-shaped Joint PDF"

From LNTwww
Line 3: Line 3:
 
}}
 
}}
  
[[File:P_ID412__Sto_A_4_8.png|right|frame|Diamond shaped joint PDF]]
+
[[File:P_ID412__Sto_A_4_8.png|right|frame|Diamond–shaped joint PDF]]
 
We consider a two-dimensional random variable  $(x,\hspace{0.08cm} y)$  whose components arise as linear combinations of two random variables  $u$  and  $v$:
 
We consider a two-dimensional random variable  $(x,\hspace{0.08cm} y)$  whose components arise as linear combinations of two random variables  $u$  and  $v$:
 
:$$x=2u-2v+1,$$
 
:$$x=2u-2v+1,$$
Line 18: Line 18:
  
 
Hints:  
 
Hints:  
*The exercise belongs to the chapter  [[Theory_of_Stochastic_Signals/Linear_Combinations_of_Random_Variables|Linear_Combinations of Random Variables]].
+
*The exercise belongs to the chapter  [[Theory_of_Stochastic_Signals/Linear_Combinations_of_Random_Variables|Linear Combinations of Random Variables]].
 
*Reference is also made to the page  [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Regression_line|Regression line]].
 
*Reference is also made to the page  [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Regression_line|Regression line]].
 
*We also refer here to the interactive applet  [[Applets:Korrelationskoeffizient_%26_Regressionsgerade|Correlation coefficient and regression line]]
 
*We also refer here to the interactive applet  [[Applets:Korrelationskoeffizient_%26_Regressionsgerade|Correlation coefficient and regression line]]
Line 30: Line 30:
  
 
<quiz display=simple>
 
<quiz display=simple>
{Wie gro&szlig; ist die H&ouml;he&nbsp; $H$&nbsp; der 2D&ndash;WDF innerhalb des Parallelogramms?
+
{What is the height $H$&nbsp; of the joint PDF within the parallelogram?
 
|type="{}"}
 
|type="{}"}
 
$H \ = \ $ { 0.125 3% }
 
$H \ = \ $ { 0.125 3% }
  
  
{Welche Werte von&nbsp; $u$&nbsp; und&nbsp; $v$&nbsp; liegen dem Eckpunkt&nbsp; $(-1, 3)$&nbsp; zugrunde?
+
{What values of&nbsp; $u$&nbsp; and&nbsp; $v$&nbsp; underlie the vertex&nbsp; $(-1, 3)$&nbsp;?
 
|type="{}"}
 
|type="{}"}
 
$u \ = \ $ { 0. }
 
$u \ = \ $ { 0. }
Line 41: Line 41:
  
  
{Berechnen Sie den Korrelationskoeffizienten&nbsp; $\rho_{xy}$.
+
{Calculate the correlation coefficient&nbsp; $\rho_{xy}$.
 
|type="{}"}
 
|type="{}"}
 
$\rho_{xy}\ = \ $ { -0.457--0.437 }
 
$\rho_{xy}\ = \ $ { -0.457--0.437 }
  
  
{Wie lautet die Korrelationsgerade&nbsp; $y=K(x)$?&nbsp; Bei welchem Punkt&nbsp; $y_0$&nbsp; schneidet diese die&nbsp; $y$-Achse?
+
{What is the regression line&nbsp; $y=K(x)$?&nbsp; At what point&nbsp; $y_0$&nbsp; does it intersect the&nbsp; $y$ axis?
 
|type="{}"}
 
|type="{}"}
 
$y_0\ = \ $ { 2.5 3% }
 
$y_0\ = \ $ { 2.5 3% }
  
  
{Berechnen Sie die Randwahrscheinlichkeitsdichtefunktion $f_x(x)$.&nbsp; Wie gro&szlig; ist die Wahrscheinlichkeit, dass die Zufallsgr&ouml;&szlig;e&nbsp; $x$&nbsp; negativ ist?
+
{Calculate the marginal probability density function $f_x(x)$.&nbsp; What is the probability that the random variable&nbsp; $x$&nbsp; is negative?
 
|type="{}"}
 
|type="{}"}
${\rm Pr}(x < 0)\ = \ $ { 0.125 3% }
+
${\rm Pr}(x < 0)\ = \ $ { 0.125 3% }
  
  
{Berechnen Sie die Randwahrscheinlichkeitsdichtefunktion $f_y(y)$.&nbsp; Wie gro&szlig; ist die Wahrscheinlichkeit, dass die Zufallsgr&ouml;&szlig;e&nbsp; $y >3$&nbsp; ist?
+
{Calculate the marginal probability density function $f_y(y)$.&nbsp; What is the probability that the random variable&ouml;&aerospace;e&nbsp; $y >3$&nbsp;?
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(y > 3)\ = \ $ { 0.167 3% }
 
${\rm Pr}(y > 3)\ = \ $ { 0.167 3% }
Line 63: Line 63:
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Die Fl&auml;che des Parallelogramms kann aus zwei gleich gro&szlig;en Dreiecken zusammengesetzt werden.  
+
'''(1)'''&nbsp; The area of the parallelogram can be composed of two triangles of equal size.  
*Die Fl&auml;che des Dreiecks&nbsp; $(1,0)\ (1,4)\ (-1,3)$&nbsp; ergibt&nbsp; $0.5 &middot; 4 &middot; 2 = 4$.  
+
*The area of the triangle $(1,0)\ (1,4)\ (-1,3)$&nbsp; gives&nbsp; $0.5 &middot; 4 &middot; 2 = 4$.  
*Die Gesamtfl&auml;che ist doppelt so groß: &nbsp; $F = 8$.  
+
*The total area is double: &nbsp; $F = 8$.  
*Da das WDF&ndash;Volumen stets&nbsp; $1$&nbsp; ist, gilt&nbsp; $H= 1/F\hspace{0.15cm}\underline{ = 0.125}$.
+
*Since the PDF&ndash;volume is always&nbsp; $1$&nbsp;, then&nbsp; $H= 1/F\hspace{0.15cm}\underline{ = 0.125}$.
 +
'''(2)'''&nbsp; The minimum value of&nbsp; $x$&nbsp; is obtained for&nbsp; $\underline{ u=0}$&nbsp; and&nbsp; $\underline{ v=1}$.
 +
*From the above equations, the results&nbsp; $x= -1$&nbsp; and&nbsp; $y= +3$ follow.
 +
'''(3)'''&nbsp; The equation given in the theory section is valid in general, i.e., for any PDF of the two statistically independent variables&nbsp; $u$&nbsp; and&nbsp; $v$,
 +
*as long as they have equal standard deviations&nbsp; $(\sigma_u = \sigma_v)$.  
  
 
+
*With&nbsp; $A = 2$,&nbsp; $B = -2$,&nbsp; $D = 1$&nbsp; and&nbsp; $E = 3$&nbsp; we obtain:
 
 
'''(2)'''&nbsp; Der minimale Wert von&nbsp; $x$&nbsp; ergibt sich f&uuml;r&nbsp; $\underline{ u=0}$&nbsp; und&nbsp; $\underline{ v=1}$.
 
*Daraus folgen aus obigen Gleichungen die Ergebnisse&nbsp; $x= -1$&nbsp; und&nbsp; $y= +3$.
 
 
 
 
 
 
 
'''(3)'''&nbsp; Die im Theorieteil angegebene Gleichung gilt allgemein, also f&uuml;r jede beliebige WDF der beiden statistisch unabh&auml;ngigen Gr&ouml;&szlig;en&nbsp; $u$&nbsp; und&nbsp; $v$,
 
*so lange diese gleiche Streuungen aufweisen&nbsp; $(\sigma_u = \sigma_v)$.
 
 
 
*Mit&nbsp; $A = 2$,&nbsp; $B = -2$,&nbsp; $D = 1$&nbsp; und&nbsp; $E = 3$&nbsp; erh&auml;lt man:
 
 
:$$\rho_{xy } =  \frac {\it A \cdot D + B \cdot E}{\sqrt{(\it A^{\rm 2}+\it B^{\rm 2})(\it D^{\rm 2}+\it E^{\rm 2})}} =\frac {2 \cdot 1 -2 \cdot 3}{\sqrt{(4 +4)(1+9)}} = \frac {-4}{\sqrt{80}} = \frac {-1}{\sqrt{5}}\hspace{0.15cm}\underline{ = -0.447}. $$
 
:$$\rho_{xy } =  \frac {\it A \cdot D + B \cdot E}{\sqrt{(\it A^{\rm 2}+\it B^{\rm 2})(\it D^{\rm 2}+\it E^{\rm 2})}} =\frac {2 \cdot 1 -2 \cdot 3}{\sqrt{(4 +4)(1+9)}} = \frac {-4}{\sqrt{80}} = \frac {-1}{\sqrt{5}}\hspace{0.15cm}\underline{ = -0.447}. $$
  
  
  
'''(4)'''&nbsp; Die Korrelationsgerade lautet allgemein:
+
'''(4)'''&nbsp; The regression line is generally:
 
:$$y=K(x)=\frac{\sigma_y}{\sigma_x}\cdot\rho_{xy}\cdot(x-m_x)+m_y.$$
 
:$$y=K(x)=\frac{\sigma_y}{\sigma_x}\cdot\rho_{xy}\cdot(x-m_x)+m_y.$$
  
*Aus den linearen Mittelwerten&nbsp; $m_u = m_v = 0.5$&nbsp; und den in der Aufgabenstellung angegebenen Gleichungen erh&auml;lt man&nbsp; $m_x = 1$&nbsp; und&nbsp; $m_y = 2$.
+
*From the linear means&nbsp; $m_u = m_v = 0.5$&nbsp; and the equations given in the problem statement, we obtain&nbsp; $m_x = 1$&nbsp; and&nbsp; $m_y = 2$.
  
*Die Varianzen von&nbsp; $u$&nbsp; und&nbsp; $v$&nbsp; betragen jeweils&nbsp; $\sigma_u^2 = \sigma_v^2 =1/12$.&nbsp; Daraus folgt:
+
*The variances of&nbsp; $u$&nbsp; and&nbsp; $v$&nbsp; are respectively&nbsp; $\sigma_u^2 = \sigma_v^2 =1/12$.&nbsp; It follows:
 
:$$\sigma_x^2 = 4 \cdot \sigma_u^2 + 4 \cdot \sigma_v^2 = 2/3,$$
 
:$$\sigma_x^2 = 4 \cdot \sigma_u^2 + 4 \cdot \sigma_v^2 = 2/3,$$
 
:$$\sigma_y^2 = \sigma_u^2 + 9\cdot \sigma_v^2 = 5/6.$$
 
:$$\sigma_y^2 = \sigma_u^2 + 9\cdot \sigma_v^2 = 5/6.$$
  
*Setzt man diese Werte in die Gleichung der Korrelationsgeraden ein, so ergibt sich:
+
*Substituting these values into the equation of the regression line, we get:
 
:$$y=K(x)=\frac{\sqrt{5/6}}{\sqrt{2/3}}\cdot (\frac{-1}{\sqrt{5}})\cdot(x-1)+2= - x/{2} + 2.5.$$
 
:$$y=K(x)=\frac{\sqrt{5/6}}{\sqrt{2/3}}\cdot (\frac{-1}{\sqrt{5}})\cdot(x-1)+2= - x/{2} + 2.5.$$
  
*Daraus folgt der Wert&nbsp; $y_0=K(x=0)\hspace{0.15cm}\underline{ = 2.5}$
+
*From this follows the value&nbsp; $y_0=K(x=0)\hspace{0.15cm}\underline{ = 2.5}$
 
 
  
  
'''(5)'''&nbsp; Mit den Hilfsgr&ouml;&szlig;en &nbsp; $q= 2u$, &nbsp; $r= -2v$ &nbsp; und &nbsp; $s= x-1$&nbsp; gilt der Zusammenhang: &nbsp;  $s= q+r$.
 
  
*Da&nbsp; $u$&nbsp;  und&nbsp; $v$&nbsp;  jeweils zwischen&nbsp; $0$&nbsp; und&nbsp; $1$&nbsp; gleichverteilt sind, besitzt&nbsp; $q$&nbsp; eine Gleichverteilung im Bereich von&nbsp; $0$&nbsp; bis&nbsp; $2$&nbsp; und&nbsp; $r$&nbsp; ist gleichverteilt zwischen&nbsp; $-2$&nbsp; und&nbsp; $0$.
+
'''(5)'''&nbsp; With the auxiliary quantities &nbsp; $q= 2u$, &nbsp; $r= -2v$ &nbsp; and &nbsp; $s= x-1$&nbsp; the relation holds: &nbsp; $s= q+r$.  
  
*Da zudem&nbsp; $q$&nbsp; und&nbsp; $r$&nbsp; nicht statistisch voneinander abh&auml;ngen, gilt f&uuml;r die WDF der Summe:
+
*Since&nbsp; $u$&nbsp; and&nbsp; $v$&nbsp; are each uniformly distributed between&nbsp; $0$&nbsp; and&nbsp; $1$&nbsp; ,&nbsp; $q$&nbsp; has a uniform distribution in the range from&nbsp; $0$&nbsp; to&nbsp; $2$&nbsp; and&nbsp; $r$&nbsp; is uniformly distributed between&nbsp; $-2$&nbsp; and&nbsp; $0$.
[[File:P_ID414__Sto_A_4_8_e.png|right|frame|Dreieckförmige WDF $f_x(x)$]]
+
*In addition, since&nbsp; $q$&nbsp; and&nbsp; $r$&nbsp; are not statistically dependent on each other, the PDF of the sum is:
 +
[[File:P_ID414__Sto_A_4_8_e.png|right|frame|Triangular PDF $f_x(x)$]]
 
:$$f_s(s) = f_q(q) \star f_r(r).$$
 
:$$f_s(s) = f_q(q) \star f_r(r).$$
 
+
*The addition&nbsp; $x = s+1$&nbsp; leads to a shift of the triangular&ndash;PDF by&nbsp; $1$&nbsp; to the right.  
*Die Addition&nbsp; $x = s+1$&nbsp; f&uuml;hrt zu einer Verschiebung der Dreieck&ndash;WDF um&nbsp; $1$&nbsp; nach rechts.  
+
*For the sought probability&nbsp; (highlighted in green in the following image)&nbsp; therefore holds: &nbsp; ${\rm Pr}(x < 0)\hspace{0.15cm}\underline{ = 0.125}$.
*F&uuml;r die gesuchte Wahrscheinlichkeit&nbsp; (im folgenden Bild gr&uuml;n hinterlegt)&nbsp; gilt deshalb: &nbsp; ${\rm Pr}(x < 0)\hspace{0.15cm}\underline{ = 0.125}$.
 
 
<br clear=all>
 
<br clear=all>
[[File: P_ID415__Sto_A_4_8_f.png|right|frame|Trapezförmige WDF $f_y(y)$]]
+
[[File: P_ID415__Sto_A_4_8_f.png|right|frame|Trapezoidal PDF $f_y(y)$]]
'''(6)'''&nbsp; Analog zur Musterl&ouml;sung für die Teilaufgabe&nbsp; '''(5)'''&nbsp; gilt mit&nbsp; $t = 3v$:
+
'''(6)'''&nbsp; Analogous to the sample solution for the subtask&nbsp; '''(5)'''&nbsp; holds with&nbsp; $t = 3v$:
 
:$$f_y(y) = f_u(u) \star f_t(t).$$
 
:$$f_y(y) = f_u(u) \star f_t(t).$$
  
*Die Faltung zwischen zwei verschieden breiten Rechtecken ergibt ein Trapez.  
+
*The convolution between two rectangles of different widths results in a trapezoid.  
*F&uuml;r die gesuchte Wahrscheinlichkeit erhält man&nbsp; ${\rm Pr}(y>3) =1/6\hspace{0.15cm}\underline{ \approx 0.167}$.   
+
*For the probability we are looking for, we get&nbsp; ${\rm Pr}(y>3) =1/6\hspace{0.15cm}\underline{ \approx 0.167}$.   
*Diese Wahrscheinlichkeit ist in der rechten Skizze gr&uuml;n hinterlegt.
+
*This probability is highlighted in green in the right sketch.
  
  

Revision as of 20:16, 25 February 2022

Diamond–shaped joint PDF

We consider a two-dimensional random variable  $(x,\hspace{0.08cm} y)$  whose components arise as linear combinations of two random variables  $u$  and  $v$:

$$x=2u-2v+1,$$
$$y=u+3v.$$

Further,  note:

  • The two statistically independent random variables  $u$  and  $v$  are each uniformly distributed between  $0$  and  $1$.
  • In the figure you can see the joint PDF.  Within the parallelogram drawn in blue holds:
$$f_{xy}(x,\hspace{0.08cm} y) = H = {\rm const.}$$
  • Outside the parallelogram no values are possible:  $f_{xy}(x,\hspace{0.08cm} y) = 0$.



Hints:



Questions

1

What is the height $H$  of the joint PDF within the parallelogram?

$H \ = \ $

2

What values of  $u$  and  $v$  underlie the vertex  $(-1, 3)$ ?

$u \ = \ $

$v \ = \ $

3

Calculate the correlation coefficient  $\rho_{xy}$.

$\rho_{xy}\ = \ $

4

What is the regression line  $y=K(x)$?  At what point  $y_0$  does it intersect the  $y$ axis?

$y_0\ = \ $

5

Calculate the marginal probability density function $f_x(x)$.  What is the probability that the random variable  $x$  is negative?

${\rm Pr}(x < 0)\ = \ $

6

Calculate the marginal probability density function $f_y(y)$.  What is the probability that the random variableö&aerospace;e  $y >3$ ?

${\rm Pr}(y > 3)\ = \ $


Solution

(1)  The area of the parallelogram can be composed of two triangles of equal size.

  • The area of the triangle $(1,0)\ (1,4)\ (-1,3)$  gives  $0.5 · 4 · 2 = 4$.
  • The total area is double:   $F = 8$.
  • Since the PDF–volume is always  $1$ , then  $H= 1/F\hspace{0.15cm}\underline{ = 0.125}$.

(2)  The minimum value of  $x$  is obtained for  $\underline{ u=0}$  and  $\underline{ v=1}$.

  • From the above equations, the results  $x= -1$  and  $y= +3$ follow.

(3)  The equation given in the theory section is valid in general, i.e., for any PDF of the two statistically independent variables  $u$  and  $v$,

  • as long as they have equal standard deviations  $(\sigma_u = \sigma_v)$.
  • With  $A = 2$,  $B = -2$,  $D = 1$  and  $E = 3$  we obtain:
$$\rho_{xy } = \frac {\it A \cdot D + B \cdot E}{\sqrt{(\it A^{\rm 2}+\it B^{\rm 2})(\it D^{\rm 2}+\it E^{\rm 2})}} =\frac {2 \cdot 1 -2 \cdot 3}{\sqrt{(4 +4)(1+9)}} = \frac {-4}{\sqrt{80}} = \frac {-1}{\sqrt{5}}\hspace{0.15cm}\underline{ = -0.447}. $$


(4)  The regression line is generally:

$$y=K(x)=\frac{\sigma_y}{\sigma_x}\cdot\rho_{xy}\cdot(x-m_x)+m_y.$$
  • From the linear means  $m_u = m_v = 0.5$  and the equations given in the problem statement, we obtain  $m_x = 1$  and  $m_y = 2$.
  • The variances of  $u$  and  $v$  are respectively  $\sigma_u^2 = \sigma_v^2 =1/12$.  It follows:
$$\sigma_x^2 = 4 \cdot \sigma_u^2 + 4 \cdot \sigma_v^2 = 2/3,$$
$$\sigma_y^2 = \sigma_u^2 + 9\cdot \sigma_v^2 = 5/6.$$
  • Substituting these values into the equation of the regression line, we get:
$$y=K(x)=\frac{\sqrt{5/6}}{\sqrt{2/3}}\cdot (\frac{-1}{\sqrt{5}})\cdot(x-1)+2= - x/{2} + 2.5.$$
  • From this follows the value  $y_0=K(x=0)\hspace{0.15cm}\underline{ = 2.5}$


(5)  With the auxiliary quantities   $q= 2u$,   $r= -2v$   and   $s= x-1$  the relation holds:   $s= q+r$.

  • Since  $u$  and  $v$  are each uniformly distributed between  $0$  and  $1$  ,  $q$  has a uniform distribution in the range from  $0$  to  $2$  and  $r$  is uniformly distributed between  $-2$  and  $0$.
  • In addition, since  $q$  and  $r$  are not statistically dependent on each other, the PDF of the sum is:
Triangular PDF $f_x(x)$
$$f_s(s) = f_q(q) \star f_r(r).$$
  • The addition  $x = s+1$  leads to a shift of the triangular–PDF by  $1$  to the right.
  • For the sought probability  (highlighted in green in the following image)  therefore holds:   ${\rm Pr}(x < 0)\hspace{0.15cm}\underline{ = 0.125}$.


Trapezoidal PDF $f_y(y)$

(6)  Analogous to the sample solution for the subtask  (5)  holds with  $t = 3v$:

$$f_y(y) = f_u(u) \star f_t(t).$$
  • The convolution between two rectangles of different widths results in a trapezoid.
  • For the probability we are looking for, we get  ${\rm Pr}(y>3) =1/6\hspace{0.15cm}\underline{ \approx 0.167}$.
  • This probability is highlighted in green in the right sketch.