Difference between revisions of "Aufgaben:Exercise 4.1: Triangular (x, y) Area"

From LNTwww
Line 27: Line 27:
  
 
<quiz display=simple>
 
<quiz display=simple>
{Bestimmen Sie die WDF&ndash;Konstante anhand geometrischer &Uuml;berlegungen.
+
{Determine the PDF constant using geometric considerations.
 
|type="{}"}
 
|type="{}"}
 
$A \ = \ $ { 0.25 3% }
 
$A \ = \ $ { 0.25 3% }
  
  
{Berechnen Sie die Wahrscheinlichkeit, dass&nbsp; $x$&nbsp; gr&ouml;&szlig;er als&nbsp; $y$&nbsp; ist.
+
{Calculate the probability that&nbsp; $x$&nbsp; is greater than&nbsp; $y$&nbsp; .
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(x > y) \ = \ $ { 0.25 3% }
 
${\rm Pr}(x > y) \ = \ $ { 0.25 3% }
  
  
{Ermitteln Sie die Rand&ndash;WDF&nbsp; $f_x(x)$.&nbsp; Berechnen Sie die Wahrscheinlichkeit, dass&nbsp; $x$&nbsp; gr&ouml;&szlig;er oder gleich&nbsp; $2$&nbsp; ist. <br>&Uuml;berpr&uuml;fen Sie den Wert anhand der 2D&ndash;WDF.
+
{Determine the marginal PDF&nbsp; $f_x(x)$.&nbsp; Calculate the probability that&nbsp; $x$&nbsp; is greater than or equal to&nbsp; $2$&nbsp; . <br>Check the value against the 2D PDF.
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(x ≥ 2)\ = \ $ { 0.75 3% }
 
${\rm Pr}(x ≥ 2)\ = \ $ { 0.75 3% }
  
  
{Ermitteln Sie die Rand&ndash;WDF&nbsp; $f_y(y)$.&nbsp; Berechnen Sie die Wahrscheinlichkeit, dass&nbsp; $y$&nbsp; größer oder gleich&nbsp; $3$&nbsp; ist. <br>Überprüfen Sie den Wert anhand der 2D&ndash;WDF.
+
{Determine the marginal PDF&nbsp; $f_y(y)$.&nbsp; Calculate the probability that&nbsp; $y$&nbsp; is greater than or equal to&nbsp; $3$&nbsp; . <br>Check the value against the 2D PDF.
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}(y ≥ 3)\ = \ $ { 0.5 3% }
 
${\rm Pr}(y ≥ 3)\ = \ $ { 0.5 3% }
  
  
{Wie gro&szlig; ist die Wahrscheinlichkeit, dass die Zufallsgr&ouml;&szlig;e&nbsp; $x$&nbsp; gr&ouml;&szlig;er oder gleich&nbsp; $2$&nbsp; und gleichzeitig die Zufallsgr&ouml;&szlig;e&nbsp; $y$&nbsp; gr&ouml;&szlig;er oder gleich&nbsp; $3$&nbsp; ist?
+
{What is the probability that the random variable is $x$&nbsp; greater than or equal to $2$&nbsp; and at the same time the random size is $y$&nbsp; greater than or equal to $3$&nbsp?
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}\big[(x ≥ 2) ∩ (y ≥ 3)\big]\ = \ $ { 0.5 3% }
 
${\rm Pr}\big[(x ≥ 2) ∩ (y ≥ 3)\big]\ = \ $ { 0.5 3% }
  
  
{Wie gro&szlig; ist die Wahrscheinlichkeit, dass&nbsp; $x$&nbsp; gr&ouml;&szlig;er oder gleich&nbsp; $2$&nbsp; ist, unter der Bedingung, dass&nbsp; $y \ge 3$&nbsp; gilt?
+
{What is the probability that&nbsp; $x$&nbsp; is greater than or equal to&nbsp; $2$&nbsp; given&nbsp; $y \ge 3$?
 
|type="{}"}
 
|type="{}"}
 
${\rm Pr}\big[x ≥ 2\hspace{0.05cm} | \hspace{0.05cm} y ≥ 3\big]\ = \ $ { 1 3% }
 
${\rm Pr}\big[x ≥ 2\hspace{0.05cm} | \hspace{0.05cm} y ≥ 3\big]\ = \ $ { 1 3% }
  
  
{Wie gro&szlig; ist die Wahrscheinlichkeit, dass&nbsp; $y \ge 3$&nbsp; ist, unter der Bedingung, dass&nbsp; $x \ge 2$&nbsp; gilt?
+
{What is the probability that&nbsp; $y \ge 3$&nbsp; given that&nbsp; $x \ge 2$&nbsp; holds?
 
|type="{}"}
 
|type="{}"}
${\rm Pr}\big[y ≥ 3\hspace{0.05cm} | \hspace{0.05cm} x ≥ 2\big]\ = \ $ { 0.667 3% }
+
${\rm Pr}\big[y ≥ 3\hspace{0.05cm} | \hspace{0.05cm} x ≥ 2\big]\ = \ $ { 0.667 3% }
 
 
 
 
  
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
'''(1)'''&nbsp; Das Volumen unter der zweidimensionalen WDF ist definitionsgem&auml;&szlig; gleich&nbsp; $1$:
+
'''(1)'''&nbsp; The volume under the two dimensional PDF is by definition equal to&nbsp; $1$:
[[File:P_ID219__Sto_A_4_1_b.png|right|frame|Dreieckförmige 2D-WDF]]
+
[[File:P_ID219__Sto_A_4_1_b.png|right|frame|Triangular 2D PDF]]
 
:$$\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}x\, {\rm d}y=1.$$
 
:$$\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}x\, {\rm d}y=1.$$
  
*Die Dreiecksfl&auml;che ist&nbsp; $D = 0.5 \cdot 2 \cdot 4 = 4$.  
+
*The triangle area is&nbsp; $D = 0.5 \cdot 2 \cdot 4 = 4$.  
*Da in diesem Definitionsgebiet die WDF konstant gleich&nbsp; $A$&nbsp; ist, erh&auml;lt man
+
*Since in this definition area the PDF is constantly equal to&nbsp; $A$&nbsp;, we get.
 
:$$A= 1/D\hspace{0.15cm}\underline{= 0.25}.$$
 
:$$A= 1/D\hspace{0.15cm}\underline{= 0.25}.$$
  
  
'''(2)'''&nbsp; Zur L&ouml;sung gehen wir von nebenstehender Skizze aus.  
+
'''(2)'''&nbsp; For the solution we start from the adjacent sketch.  
*Das Gebiet&nbsp; $x>y$&nbsp; liegt rechts von der Winkelhalbierenden&nbsp; $x=y$&nbsp; und ist grün markiert.
+
*The area&nbsp; $x>y$&nbsp; lies to the right of the angle bisector&nbsp; $x=y$&nbsp; and is marked in green.
  
*Diese grüne  Dreiecksfl&auml;che ist&nbsp; $D_{\rm (2)} = 0.5 \cdot 1 \cdot 2 = 1 $, also genau ein Viertel der Gesamtfl&auml;che&nbsp; $D$&nbsp; des Definitionsgebietes.  
+
*This green triangular area is&nbsp; $D_{\rm (2)} = 0.5 \cdot 1 \cdot 2 = 1 $, i.e. exactly one quarter of the total area&nbsp; $D$&nbsp; of the definition area.  
*Daraus folgt&nbsp; ${\rm Pr}(x > y)\hspace{0.15cm}\underline{= 0.25}$.
+
*From this follows&nbsp; ${\rm Pr}(x > y)\hspace{0.15cm}\underline{= 0.25}$.
  
  
  
'''(3)'''&nbsp; F&uuml;r die gesuchte Rand&ndash;WDF gilt in diesem Fall:
+
'''(3)'''&nbsp; For the wanted marginal PDF holds in this case:
[[File:P_ID220__Sto_A_4_1_c.png|right|frame|Rand&ndash;WDF bezüglich&nbsp; $x$]]
+
[[File:P_ID220__Sto_A_4_1_c.png|right|frame|marginal PDF with respect to&nbsp; $x$]]
 
:$$f_x(x)=\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}y=A\cdot B_y (x).$$
 
:$$f_x(x)=\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}y=A\cdot B_y (x).$$
  
*Hierbei bezeichnet&nbsp; $B_y(x)$&nbsp; die Breite des Gebietes&nbsp; $f_{xy} \ne 0$&nbsp; in&nbsp; $y$&ndash;Richtung beim betrachteten&nbsp; $x$&ndash;Wert.  
+
*Here denotes&nbsp; $B_y(x)$&nbsp; the width of the area&nbsp; $f_{xy} \ne 0$&nbsp; in&nbsp; $y$&ndash;direction at the considered&nbsp; $x$&ndash;value.  
*Es gilt:&nbsp; $B_y(x) = x/2$.&nbsp; Mit&nbsp; $A = 0.25$&nbsp; folgt&nbsp; $f_{x}(x) = x/8$&nbsp; f&uuml;r den Bereich&nbsp; $ 0 \le x \le 4$.
+
*It holds:&nbsp; $B_y(x) = x/2$.&nbsp; With&nbsp; $A = 0.25$&nbsp; it follows&nbsp; $f_{x}(x) = x/8$&nbsp; for the range&nbsp; $ 0 \le x \le 4$.
  
*Die gesuchte Wahrscheinlichkeit entspricht der schraffierten Fl&auml;che in nebenstehender Skizze.&nbsp; Man erhält:
+
*The wanted probability corresponds to the shaded area in the accompanying sketch.&nbsp; One obtains:
:$$\rm Pr(\it x\ge \rm 2) = \rm 1-\rm Pr(\it x < \rm 2) = \rm 1-\frac{1}{2}\cdot2\cdot 0.25\hspace{0.15cm}\underline{ =0.75}. $$
+
:$$\rm Pr(\it x\ge \rm 2) = \rm 1-\rm Pr(\it x < \rm 2) = \rm 1-\frac{1}{2}\cdot2\cdot 0.25\hspace{0.15cm}\underline{ =0.75}. $$
  
*Zum gleichen Ergebnis gelangt man anhand der 2D&ndash;WDF:&nbsp; Rechts von&nbsp; $x = 2$&nbsp; liegt&nbsp; $3/4$&nbsp; des gesamten Definitionsgebiets.
+
*The same result is obtained using 2D PDF:&nbsp; To the right of&nbsp; $x = 2$&nbsp; lies&nbsp; $3/4$&nbsp; of the total definition area.
 
<br clear=all>
 
<br clear=all>
[[File:P_ID221__Sto_A_4_1_d.png|right|frame|Rand&ndash;WDF bezüglich&nbsp; $y$]]
+
[[File:P_ID221__Sto_A_4_1_e.png|right|frame|marginal PDF with respect&nbsp; $y$]]
'''(4)'''&nbsp; Analog der Musterl&ouml;sung zur Teilaufgabe&nbsp; '''(3)'''&nbsp; gilt:
+
'''(4)'''&nbsp; Analogous to the sample solution to the subtask&nbsp; '''(3)'''&nbsp; holds:
 
:$$f_y(y)=\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}x=A\cdot B_x (y).$$
 
:$$f_y(y)=\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}x=A\cdot B_x (y).$$
  
*Die Ausbreitung des WDF&ndash;Gebietes in&nbsp; $x$&ndash;Richtung ist f&uuml;r&nbsp; $y \le 1$&nbsp; und&nbsp; $y \ge 5$&nbsp; jeweils Null.  
+
*The spread of PDF area in&nbsp; $x$&ndash;direction is zero for&nbsp; $y \le 1$&nbsp; and&nbsp; $y \ge 5$&nbsp; respectively.  
*Das Maximum liegt bei&nbsp; $y=3$&nbsp; und ergibt&nbsp; $B_x(y=3) = 2$.  
+
*The maximum is at&nbsp; $y=3$&nbsp; and gives&nbsp; $B_x(y=3) = 2$.  
*Dazwischen ist die Zu&ndash; und Abnahme von&nbsp; $B_x(y)$&nbsp; linear und es ergibt sich eine dreieckf&ouml;rmige WDF.
+
*In between, the increase&nbsp; and decrease of&nbsp; $B_x(y)$&nbsp; is linear, yielding a triangular-shaped PDF.
*Die Wahrscheinlichkeit, dass&nbsp; $y \ge 3$&nbsp; ist, entspricht der grün schraffierten Fl&auml;che in nebenstehender Skizze.
+
*The probability that&nbsp; $y \is 3$&nbsp; corresponds to the green shaded area in the adjacent sketch.
* Aufgrund der Symmetrie erhält man:  
+
* Because of the symmetry, one obtains:  
 
:$${\rm Pr}(y ≥ 3)\hspace{0.15cm}\underline{ =0.5}. $$
 
:$${\rm Pr}(y ≥ 3)\hspace{0.15cm}\underline{ =0.5}. $$
  
Zum gleichen Ergebnis kommt man anhand der 2D&ndash;WDF: &nbsp; Oberhalb der Horizontalen&nbsp; $y= 3$&nbsp; liegt die H&auml;lfte des gesamten Definitionsgebietes.
+
The same result is obtained using 2D PDF: &nbsp; Above the horizontal&nbsp; $y= 3$&nbsp; lies half of the total definition area.
  
  
  
[[File:P_ID222__Sto_A_4_1_e.png|right|frame|Zur Teilaufgabe '''(5)''']]
+
[[File:P_ID222__Sto_A_4_1_e.png|right|frame|On subtask '''(5)''']]
'''(5)'''&nbsp; Wenn&nbsp; $y \ge 3$&nbsp; ist&nbsp; $($rot hinterlegtes Dreieck&nbsp; $D)$,&nbsp; gilt stets auch&nbsp; $x \ge 2$&nbsp; $($gr&uuml;n umrandetes Trapez&nbsp; $T)$.  
+
'''(5)'''&nbsp; If&nbsp; $y \ge 3$&nbsp; is&nbsp; $($red highlighted triangle&nbsp; $D)$,&nbsp; is always also true&nbsp; $x \ge 2$&nbsp; $($green outlined trapezoid&nbsp; $T)$.  
*Das bedeutet:&nbsp; In diesem Beispiel ist&nbsp; $D$&nbsp; eine Teilmenge von&nbsp; $T$, und es gilt:
+
*This means:&nbsp; In this example&nbsp; $D$&nbsp; is a subset of&nbsp; $T$, and it holds:
 
:$${\rm Pr}[(x ≥ 2) ∩ (y ≥ 3)] = {\rm Pr}(y ≥ 3) \hspace{0.15cm}\underline{= 0.50}.$$
 
:$${\rm Pr}[(x ≥ 2) ∩ (y ≥ 3)] = {\rm Pr}(y ≥ 3) \hspace{0.15cm}\underline{= 0.50}.$$
  
  
  
'''(6)'''&nbsp; Entsprechend der L&ouml;sung zur Teilaufgabe&nbsp; '''(5)'''&nbsp; folgt aus&nbsp; $y \ge 3$&nbsp; mit Sicherheit auch&nbsp; $x \ge 2$.  
+
'''(6)'''&nbsp; According to the solution to the subtask&nbsp; '''(5)'''&nbsp; it follows from&nbsp; $y \ge 3$&nbsp; with certainty also&nbsp; $x \ge 2$.  
*Somit ist die gesuchte bedingte Wahrscheinlichkeit:
+
*So the conditional probability we are looking for is:
 
:$${\rm Pr}[x ≥ 2\hspace{0.05cm} | \hspace{0.05cm} y ≥ 3]\hspace{0.15cm}\underline{= 1}.$$
 
:$${\rm Pr}[x ≥ 2\hspace{0.05cm} | \hspace{0.05cm} y ≥ 3]\hspace{0.15cm}\underline{= 1}.$$
  
  
  
'''(7)'''&nbsp; Diese Teilaufgabe kann man mit dem Satz von Bayes und den Ergebnissen aus&nbsp; '''(2)'''&nbsp; und&nbsp; '''(5)'''&nbsp; lösen:
+
'''(7)'''&nbsp; This subtask can be solved using Bayes' theorem and the results from&nbsp; '''(2)'''&nbsp; and&nbsp; '''(5)'''&nbsp; :
 
:$$\rm Pr(\it y \ge \rm 3\hspace{0.1cm}|\hspace{0.1cm} \it x \ge \rm 2) = \frac{ \rm Pr((\it x \ge \rm 2)\cap(\it y \ge \rm 3))} {\rm Pr(\it x \ge \rm 2)}=2/3\hspace{0.15cm}\underline{=0.667}.$$
 
:$$\rm Pr(\it y \ge \rm 3\hspace{0.1cm}|\hspace{0.1cm} \it x \ge \rm 2) = \frac{ \rm Pr((\it x \ge \rm 2)\cap(\it y \ge \rm 3))} {\rm Pr(\it x \ge \rm 2)}=2/3\hspace{0.15cm}\underline{=0.667}.$$
  
* Oder anders ausgedr&uuml;ckt: &nbsp; Die Fl&auml;che&nbsp; $D$&nbsp; des rot hinterlegten Dreiecks macht&nbsp; $2/3$&nbsp; der Fl&auml;che des gr&uuml;n umrandeten Trapezes&nbsp; $T$&nbsp; aus.
+
* Or expressed differently: &nbsp; The area&nbsp; $D$&nbsp; of the triangle with red background makes&nbsp; $2/3$&nbsp; of the area of the trapezoid with green border&nbsp; $T$&nbsp;.
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  

Revision as of 15:29, 17 January 2022

Triangular 2D area

A 2D random variable is defined by the adjacent sketch:

  • F  $(x, \ y)$  only values within the triangular-shaped region defined by the three vertices  $(0,\ 1)$, $(4,\ 3)$, and $(4,\ 5)$  can occur.
  • Within the triangle, all the random variables  $(x,\ y)$  are equally probable.
  • For the 2D–WDF, in this domain:
$$f_{xy}(x,y) = A .$$

In addition, the straight line  $x = y$   ⇒   "angle bisector"   is drawn in the sketch above   ⇒  see subtask  (2).





Hints:


Questions

1

Determine the PDF constant using geometric considerations.

$A \ = \ $

2

Calculate the probability that  $x$  is greater than  $y$  .

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

3

Determine the marginal PDF  $f_x(x)$.  Calculate the probability that  $x$  is greater than or equal to  $2$  .
Check the value against the 2D PDF.

${\rm Pr}(x ≥ 2)\ = \ $

4

Determine the marginal PDF  $f_y(y)$.  Calculate the probability that  $y$  is greater than or equal to  $3$  .
Check the value against the 2D PDF.

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

5

What is the probability that the random variable is $x$  greater than or equal to $2$  and at the same time the random size is $y$  greater than or equal to $3$&nbsp?

${\rm Pr}\big[(x ≥ 2) ∩ (y ≥ 3)\big]\ = \ $

6

What is the probability that  $x$  is greater than or equal to  $2$  given  $y \ge 3$?

${\rm Pr}\big[x ≥ 2\hspace{0.05cm} | \hspace{0.05cm} y ≥ 3\big]\ = \ $

7

What is the probability that  $y \ge 3$  given that  $x \ge 2$  holds?

${\rm Pr}\big[y ≥ 3\hspace{0.05cm} | \hspace{0.05cm} x ≥ 2\big]\ = \ $


Solution

(1)  The volume under the two dimensional PDF is by definition equal to  $1$:

Triangular 2D PDF
$$\int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}x\, {\rm d}y=1.$$
  • The triangle area is  $D = 0.5 \cdot 2 \cdot 4 = 4$.
  • Since in this definition area the PDF is constantly equal to  $A$ , we get.
$$A= 1/D\hspace{0.15cm}\underline{= 0.25}.$$


(2)  For the solution we start from the adjacent sketch.

  • The area  $x>y$  lies to the right of the angle bisector  $x=y$  and is marked in green.
  • This green triangular area is  $D_{\rm (2)} = 0.5 \cdot 1 \cdot 2 = 1 $, i.e. exactly one quarter of the total area  $D$  of the definition area.
  • From this follows  ${\rm Pr}(x > y)\hspace{0.15cm}\underline{= 0.25}$.


(3)  For the wanted marginal PDF holds in this case:

marginal PDF with respect to  $x$
$$f_x(x)=\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}y=A\cdot B_y (x).$$
  • Here denotes  $B_y(x)$  the width of the area  $f_{xy} \ne 0$  in  $y$–direction at the considered  $x$–value.
  • It holds:  $B_y(x) = x/2$.  With  $A = 0.25$  it follows  $f_{x}(x) = x/8$  for the range  $ 0 \le x \le 4$.
  • The wanted probability corresponds to the shaded area in the accompanying sketch.  One obtains:
$$\rm Pr(\it x\ge \rm 2) = \rm 1-\rm Pr(\it x < \rm 2) = \rm 1-\frac{1}{2}\cdot2\cdot 0.25\hspace{0.15cm}\underline{ =0.75}. $$
  • The same result is obtained using 2D PDF:  To the right of  $x = 2$  lies  $3/4$  of the total definition area.


File:P ID221 Sto A 4 1 e.png
marginal PDF with respect  $y$

(4)  Analogous to the sample solution to the subtask  (3)  holds:

$$f_y(y)=\int_{-\infty}^{+\infty}f_{xy}(x,y)\, {\rm d}x=A\cdot B_x (y).$$
  • The spread of PDF area in  $x$–direction is zero for  $y \le 1$  and  $y \ge 5$  respectively.
  • The maximum is at  $y=3$  and gives  $B_x(y=3) = 2$.
  • In between, the increase  and decrease of  $B_x(y)$  is linear, yielding a triangular-shaped PDF.
  • The probability that  $y \is 3$  corresponds to the green shaded area in the adjacent sketch.
  • Because of the symmetry, one obtains:
$${\rm Pr}(y ≥ 3)\hspace{0.15cm}\underline{ =0.5}. $$

The same result is obtained using 2D PDF:   Above the horizontal  $y= 3$  lies half of the total definition area.


On subtask (5)

(5)  If  $y \ge 3$  is  $($red highlighted triangle  $D)$,  is always also true  $x \ge 2$  $($green outlined trapezoid  $T)$.

  • This means:  In this example  $D$  is a subset of  $T$, and it holds:
$${\rm Pr}[(x ≥ 2) ∩ (y ≥ 3)] = {\rm Pr}(y ≥ 3) \hspace{0.15cm}\underline{= 0.50}.$$


(6)  According to the solution to the subtask  (5)  it follows from  $y \ge 3$  with certainty also  $x \ge 2$.

  • So the conditional probability we are looking for is:
$${\rm Pr}[x ≥ 2\hspace{0.05cm} | \hspace{0.05cm} y ≥ 3]\hspace{0.15cm}\underline{= 1}.$$


(7)  This subtask can be solved using Bayes' theorem and the results from  (2)  and  (5)  :

$$\rm Pr(\it y \ge \rm 3\hspace{0.1cm}|\hspace{0.1cm} \it x \ge \rm 2) = \frac{ \rm Pr((\it x \ge \rm 2)\cap(\it y \ge \rm 3))} {\rm Pr(\it x \ge \rm 2)}=2/3\hspace{0.15cm}\underline{=0.667}.$$
  • Or expressed differently:   The area  $D$  of the triangle with red background makes  $2/3$  of the area of the trapezoid with green border  $T$ .