Difference between revisions of "Applets:Two-dimensional Gaussian Random Variables"

From LNTwww
 
(37 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{LntAppletLink|verteilungen}}  
+
{{LntAppletLinkEnDe|gauss_en|gauss}}
  
==Programmbeschreibung==
+
==Applet Description==
 
<br>
 
<br>
Das Applet verdeutlicht die Eigenschaften zweidimensionaler Gaußscher Zufallsgrößen&nbsp; $XY\hspace{-0.1cm}$, gekennzeichet durch die Standardabweichungen (Streuungen)&nbsp; $\sigma_X$&nbsp; und&nbsp; $\sigma_Y$&nbsp; ihrer beiden Komponenten sowie den Korrelationskoeffizienten&nbsp; $\rho_{XY}$&nbsp;zwischen diesen. Die Komponenten werden als mittelwertfrei vorausgesetzt:&nbsp; $m_X = m_Y = 0$.
+
The applet illustrates the properties of two-dimensional Gaussian random variables&nbsp; $XY\hspace{-0.1cm}$, characterized by the standard deviations (rms)&nbsp; $\sigma_X$&nbsp; and&nbsp; $\sigma_Y$&nbsp; of their two components, and the correlation coefficient&nbsp; $\rho_{XY}$&nbsp;between them. The components are assumed to be zero mean:&nbsp; $m_X = m_Y = 0$.
  
Das Applet zeigt
+
The applet shows
* die zweidimensionale Wahrscheinlichkeitsdichtefunktion &nbsp; &rArr; &nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; $f_{XY}(x, \hspace{0.1cm}y)$&nbsp; in dreidimensioanaler Darstellung sowie in Form von Höhenlinien,
+
* the two-dimensional probability density function &nbsp; &rArr; &nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; $f_{XY}(x, \hspace{0.1cm}y)$&nbsp; in three-dimensional representation as well as in the form of contour lines,
* die zweidimensionale Verteilungsfunktion &nbsp; &rArr; &nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}VTF$&nbsp; $F_{XY}(x, \hspace{0.1cm}y)$&nbsp; als 3D-Plot.
+
* the corresponding marginal probability density function&nbsp; &rArr; &nbsp; $\rm 1D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; $f_{X}(x)$&nbsp; of the random variable&nbsp; $X$&nbsp; as a blue curve; likewise&nbsp; $f_{Y}(y)$&nbsp; for the second random variable,
 +
* the two-dimensional distribution function&nbsp; &rArr; &nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$&nbsp; $F_{XY}(x, \hspace{0.1cm}y)$&nbsp; as a 3D plot,
 +
* the distribution function&nbsp; &rArr; &nbsp; $\rm 1D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$&nbsp; $F_{X}(x)$&nbsp; of the random variable&nbsp; $X$; also&nbsp; $F_{Y}(y)$&nbsp; as a red curve.
  
  
Das Applet verwendet das Framework &nbsp;[https://en.wikipedia.org/wiki/Plotly Plot.ly]
+
The applet uses the framework &nbsp;[https://en.wikipedia.org/wiki/Plotly "Plot.ly"]
 
+
 
==Theoretischer Hintergrund==
+
==Theoretical Background==
<br>
+
<br>
===Verbundwahrscheinlichkeitsdichtefunktion &nbsp; &rArr; &nbsp; 2D&ndash;WDF===
+
 
 +
===Joint probability density function &nbsp; &rArr; &nbsp; 2D&ndash;PDF===
  
Wir betrachten zwei wertkontinuierliche Zufallsgrößen&nbsp; $X$&nbsp; und&nbsp; $Y\hspace{-0.1cm}$, zwischen denen statistische Abhängigkeiten bestehen können. Zur Beschreibung der Wechselbeziehungen zwischen diesen Größen ist es zweckmäßig, die beiden Komponenten zu einer&nbsp; '''zweidimensionalen Zufallsgröße'''&nbsp; $XY =(X, Y)$&nbsp; zusammenzufassen. Dann gilt:  
+
We consider two continuous value random variables&nbsp; $X$&nbsp; and&nbsp; $Y\hspace{-0.1cm}$, between which statistical dependencies may exist. To describe the interrelationships between these variables, it is convenient to combine the two components into a&nbsp; '''two-dimensional random variable'''&nbsp; $XY =(X, Y)$&nbsp; . Then holds:  
  
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
 
$\text{Definition:}$&nbsp;  
 
$\text{Definition:}$&nbsp;  
Die &nbsp;'''Verbundwahrscheinlichkeitsdichtefunktion'''&nbsp; ist die Wahrscheinlichkeitsdichtefunktion (WDF, &nbsp;englisch:&nbsp; ''Probability Density Function'', kurz:&nbsp;PDF) der zweidimensionalen Zufallsgröße&nbsp; $XY$&nbsp; an der Stelle&nbsp; $(x, y)$:  
+
The &nbsp;'''joint probability density function'''&nbsp; is the probability density function (PDF) of the two-dimensional random variable&nbsp; $XY$&nbsp; at location&nbsp; $(x, y)$:  
:$$f_{XY}(x, \hspace{0.1cm}y) = \lim_{\left.{\Delta x\rightarrow 0 \atop {\Delta y\rightarrow 0} }\right.}\frac{ {\rm Pr}\big [ (x - {\rm \Delta} x/{\rm 2} \le X \le x + {\rm \Delta} x/{\rm 2}) \cap (y - {\rm \Delta} y/{\rm 2} \le Y \le y +{\rm \Delta}y/{\rm 2}) \big]  }{ {\rm \Delta} \ x\cdot{\rm \Delta} y}.$$
+
:$$f_{XY}(x, \hspace{0.1cm}y) = \lim_{\left.{\delta x\rightarrow 0 \atop {\delta y\rightarrow 0} }\right. }\frac{ {\rm Pr}\big [ (x - {\rm \Delta} x/{\rm 2} \le X \le x + {\rm \Delta} x/{\rm 2}) \cap (y - {\rm \Delta} y/{\rm 2} \le Y \le y +{\rm \Delta}y/{\rm 2}) \big]  }{ {\rm \Delta} \ x\cdot{\rm \Delta} y}.$$
  
*Die Verbundwahrscheinlichkeitsdichtefunktion oder kurz&nbsp; $\text{2D-WDF}$&nbsp; ist eine Erweiterung der eindimensionalen WDF.
+
*The joint probability density function, or in short&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; is an extension of the one-dimensional PDF.
*$∩$&nbsp; kennzeichnet die logische UND-Verknüpfung.
+
*$∩$&nbsp; denotes the logical AND operation.
*$X$&nbsp; und&nbsp; $Y$ bezeichnen die beiden Zufallsgrößen, und&nbsp; $x \in X$&nbsp; sowie &nbsp; $y \in Y$ geben  Realisierungen hiervon an.
+
*$X$&nbsp; and&nbsp; $Y$ denote the two random variables, and&nbsp; $x \in X$&nbsp; and &nbsp; $y \in Y$ indicate realizations thereof.
*Die für dieses Applet verwendete Nomenklatur unterscheidet sich also geringfügig gegenüber der Beschreibung im [[Stochastische_Signaltheorie/Zweidimensionale_Zufallsgrößen#Verbundwahrscheinlichkeitsdichtefunktion|Theorieteil]].}}
+
*The nomenclature used for this applet thus differs slightly from the description in the [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Joint_probability_density_function|"Theory section"]].}}
  
  
Anhand dieser 2D–WDF&nbsp; $f_{XY}(x, y)$&nbsp; werden auch statistische Abhängigkeiten innerhalb der zweidimensionalen Zufallsgröße &nbsp;$XY$&nbsp; vollständig erfasst im Gegensatz zu den beiden eindimensionalen Dichtefunktionen &nbsp; ⇒ &nbsp; '''Randwahrscheinlichkeitsdichtefunktionen''':  
+
Using this 2D–PDF&nbsp; $f_{XY}(x, y)$&nbsp; statistical dependencies within the two-dimensional random variable &nbsp;$XY$&nbsp; are also fully captured in contrast to the two one-dimensional density functions &nbsp; ⇒ &nbsp; '''marginal probability density functions''':  
:$$f_{X}(x) = \int _{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}y ,$$
+
:$$f_{X}(x) = \int _{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}y ,$$
:$$f_{Y}(y) = \int_{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}x .$$
+
:$$f_{Y}(y) = \int_{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}x .$$
  
Diese beiden Randdichtefunktionen&nbsp; $f_X(x)$&nbsp; und&nbsp; $f_Y(y)$  
+
These two marginal density functions&nbsp; $f_X(x)$&nbsp; and&nbsp; $f_Y(y)$  
*liefern lediglich statistische Aussagen über die Einzelkomponenten&nbsp; $X$&nbsp; bzw.&nbsp; $Y$,  
+
*provide only statistical information about the individual components&nbsp; $X$&nbsp; and&nbsp; $Y$, respectively,  
*nicht jedoch über die Bindungen zwischen diesen.
+
*but not about the bindings between them.
  
  
Als quantitatives Maß für die linearen statistischen Bindungen &nbsp; &rArr; &nbsp; '''Korrelation'''&nbsp; verwendet man
+
As a quantitative measure of the linear statistical bindings&nbsp; &rArr; &nbsp; '''correlation'''&nbsp; one uses.
* die&nbsp; '''Kovarianz'''&nbsp; $\mu_{XY}$, die bei mittelwertfreien Komponenten gleich dem gemeinsamen linearen Moment erster Ordnung ist:
+
* the&nbsp; '''covariance'''&nbsp; $\mu_{XY}$, which is equal to the first-order common linear moment for mean-free components:
:$$\mu_{XY} = {\rm E}\big[X \cdot Y\big] = \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} X \cdot Y \cdot f_{XY}(x,y) \,{\rm d}x \, {\rm d}y ,$$   
+
:$$\mu_{XY} = {\rm E}\big[X \cdot Y\big] = \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} X \cdot Y \cdot f_{XY}(x,y) \,{\rm d}x \, {\rm d}y ,$$   
*den&nbsp; '''Korrelationskoeffizienten'''&nbsp; nach Normierung auf die beiden  Effektivwerte &nbsp;$σ_X$&nbsp; und&nbsp;$σ_Y$&nbsp; der beiden Komponenten:  
+
*the&nbsp; '''correlation coefficient'''&nbsp; after normalization to the two rms values &nbsp;$σ_X$&nbsp; and&nbsp;$σ_Y$&nbsp; of the two components:  
 
:$$\rho_{XY}=\frac{\mu_{XY} }{\sigma_X \cdot \sigma_Y}.$$
 
:$$\rho_{XY}=\frac{\mu_{XY} }{\sigma_X \cdot \sigma_Y}.$$
  
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Eigenschaften des Korrelationskoeffizienten:}$&nbsp;  
+
$\text{Properties of correlation coefficient:}$&nbsp;  
*Aufgrund der Normierung gilt stets&nbsp;  $-1 \le ρ_{XY} ≤ +1$.  
+
*Because of normalization, $-1 \le ρ_{XY} ≤ +1$ always holds&nbsp;.  
*Sind die beiden Zufallsgrößen &nbsp;$X$&nbsp; und &nbsp;$Y$ unkorreliert, so ist &nbsp;$ρ_{XY} = 0$.  
+
*If the two random variables &nbsp;$X$&nbsp; and &nbsp;$Y$ are uncorrelated, then &nbsp;$ρ_{XY} = 0$.  
*Bei strenger linearer Abhängigkeit zwischen &nbsp;$X$&nbsp; und &nbsp;$Y$ ist &nbsp;$ρ_{xy}= ±1$ &nbsp; &rArr; &nbsp; vollständige Korrelation.
+
*For strict linear dependence between &nbsp;$X$&nbsp; and &nbsp;$Y$, &nbsp;$ρ_{XY}= ±1$ &nbsp; &rArr; &nbsp; complete correlation.
*Ein positiver Korrelationskoeffizient bedeutet, dass bei größerem &nbsp;$X$–Wert im statistischen Mittel auch &nbsp;$Y$&nbsp; größer ist als bei kleinerem &nbsp;$X$.  
+
*A positive correlation coefficient means that when &nbsp;$X$ is larger, on statistical average, &nbsp;$Y$&nbsp; is also larger than when &nbsp;$X$ is smaller.  
*Dagegen drückt ein negativer Korrelationskoeffizient aus, dass &nbsp;$Y$&nbsp; mit steigendem &nbsp;$X$&nbsp; im Mittel kleiner wird.}}   
+
*In contrast, a negative correlation coefficient expresses that &nbsp;$Y$&nbsp; becomes smaller on average as &nbsp;$X$&nbsp; increases}}.  
 
<br><br>
 
<br><br>
  
===2D&ndash;WDF bei Gaußschen Zufallsgrößen===  
+
===2D&ndash;PDF for Gaussian random variables===  
  
Für den Sonderfall&nbsp; '''Gaußscher Zufallsgrößen'''&nbsp; – der Name geht auf den Wissenschaftler&nbsp; [https://de.wikipedia.org/wiki/Carl_Friedrich_Gau%C3%9F Carl Friedrich Gauß]&nbsp; zurück – können wir weiterhin vermerken:  
+
For the special case&nbsp; '''Gaussian random variables'''&nbsp; - the name goes back to the scientist&nbsp; [https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss "Carl Friedrich Gauss"]&nbsp; - we can further note:  
*Die Verbund&ndash;WDF einer Gaußschen 2D-Zufallsgröße&nbsp; $XY$&nbsp; mit Mittelwerten&nbsp; $m_X = 0$,&nbsp; $m_Y = 0$&nbsp; und Korrelationskoeffizienten&nbsp; $ρ = ρ_{XY}$&nbsp; lautet:  
+
*The joint PDF of a Gaussian 2D random variable&nbsp; $XY$&nbsp; with means&nbsp; $m_X = 0$&nbsp; and&nbsp; $m_Y = 0$&nbsp; and the correlation coefficient&nbsp; $ρ = ρ_{XY}$&nbsp; is:  
:$$f_{XY}(x,y)=\frac{\rm 1}{\rm 2\it\pi \cdot \sigma_X \cdot \sigma_Y \cdot \sqrt{\rm 1-\rho^2}}\ \cdot\ \exp\Bigg[-\frac{\rm 1}{\rm 2 \cdot (1-\it\rho^{\rm 2} {\rm)}}\cdot(\frac {\it x^{\rm 2}}{\sigma_X^{\rm 2}}+\frac {\it y^{\rm 2}}{\sigma_Y^{\rm 2}}-\rm 2\it\rho\cdot\frac{x \cdot y}{\sigma_x \cdot \sigma_Y}\rm ) \rm \Bigg]\hspace{0.8cm}{\rm mit}\hspace{0.5cm}-1 \le \rho \le +1.$$
+
: $$f_{XY}(x, y)=\frac{\rm 1}{\rm 2\it\pi \cdot \sigma_X \cdot \sigma_Y \cdot \sqrt{\rm 1-\rho^2}}\ \cdot\ \exp\Bigg[-\frac{\rm 1}{\rm 2 \cdot (1- \it\rho^{\rm 2} {\rm)}}\cdot(\frac {\it x^{\rm 2}}{\sigma_X^{\rm 2}}+\frac {\it y^{\rm 2}}{\sigma_Y^{\rm 2}}-\rm 2\it\rho\cdot\frac{x \cdot y}{\sigma_x \cdot \sigma_Y}\rm ) \rm \Bigg]\hspace{0.8cm}{\rm with}\hspace{0.5cm}-1 \le \rho \le +1.$$
*Ersetzt man&nbsp; $x$&nbsp; durch&nbsp; $(x - m_X)$&nbsp; sowie&nbsp; $y$&nbsp; durch&nbsp; $(y- m_Y)$, so ergibt sich die allgemeinere WDF einer zweidimensionalen Gaußschen Zufallsgröße mit Mittelwert.  
+
*Replacing&nbsp; $x$&nbsp; by&nbsp; $(x - m_X)$&nbsp; and&nbsp; $y$&nbsp; by&nbsp; $(y- m_Y)$, we obtain the more general PDF of a two-dimensional Gaussian random variable with mean.  
*Die Randwahrscheinlichkeitsdichtefunktionen&nbsp; $f_{X}(x)$&nbsp; und&nbsp; $f_{Y}(y)$&nbsp; einer Gaußschen 2D-Zufallsgröße sind ebenfalls gaußförmig mit den Streuungen&nbsp; $σ_X$&nbsp; bzw.&nbsp; $σ_Y$.
+
*The marginal probability density functions&nbsp; $f_{X}(x)$&nbsp; and&nbsp; $f_{Y}(y)$&nbsp; of a 2D Gaussian random variable are also Gaussian with the standard deviations&nbsp; $σ_X$&nbsp; and&nbsp; $σ_Y$, respectively.
*Bei unkorrelierten Komponenten&nbsp; $X$&nbsp; und&nbsp; $Y$ muss in obiger Gleichung&nbsp; $ρ = 0$&nbsp; eingesetzt werden, und man erhält dann das Ergebnis:  
+
*For uncorrelated components&nbsp; $X$&nbsp; and&nbsp; $Y$, in the above equation&nbsp; $ρ = 0$&nbsp; must be substituted, and then the result is obtained:  
:$$f_{XY}(x,y)=\frac{1}{\sqrt{2\pi}\cdot\sigma_{X}} \cdot\rm e^{-\it {x^{\rm 2}}\hspace{-0.08cm}/{\rm (}{\rm 2\hspace{0.05cm}\it\sigma_{X}^{\rm 2}} {\rm )}} \cdot\frac{1}{\sqrt{2\pi}\cdot\sigma_{\it Y}}\cdot e^{-\it {y^{\rm 2}}\hspace{-0.08cm}/{\rm (}{\rm 2\hspace{0.05cm}\it\sigma_{Y}^{\rm 2}} {\rm )}} = \it f_{X} \rm ( \it x \rm ) \cdot \it f_{Y} \rm ( \it y \rm ) .$$
+
:$$f_{XY}(x,y)=\frac{1}{\sqrt{2\pi}\cdot\sigma_{X}} \cdot\rm e^{-\it {x^{\rm 2}}\hspace{-0.08cm}/{\rm (}{\rm 2\hspace{0.05cm}\it\sigma_{X}^{\rm 2}} {\rm )}} \cdot\frac{1}{\sqrt{2\pi}\cdot\sigma_{\it Y}}\cdot e^{-\it {y^{\rm 2}}\hspace{-0.08cm}/{\rm (}{\rm 2\hspace{0.05cm}\it\sigma_{Y}^{\rm 2}} {\rm )}} = \it f_{X} \rm ( \it x \rm ) \cdot \it f_{Y} \rm ( \it y \rm ) .$$
  
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Fazit:}$&nbsp; Im Sonderfall einer 2D-Zufallsgröße mit Gaußscher WDF&nbsp; $f_{XY}(x, y)$&nbsp; folgt aus der &nbsp;''Unkorreliertheit''&nbsp; auch direkt die&nbsp; ''statistische Unabhängigkeit:''
+
$\text{Conclusion:}$&nbsp; In the special case of a 2D random variable with Gaussian PDF&nbsp; $f_{XY}(x, y)$&nbsp; it also follows directly from &nbsp;''uncorrelatedness''&nbsp; the&nbsp; ''statistical independence:''
 
:$$f_{XY}(x,y)= f_{X}(x) \cdot f_{Y}(y) . $$
 
:$$f_{XY}(x,y)= f_{X}(x) \cdot f_{Y}(y) . $$
  
Bitte beachten Sie:
+
Please note:
*Bei keiner anderen WDF kann aus der&nbsp; ''Unkorreliertheit''&nbsp; auf die&nbsp; ''statistische Unabhängigkeit''&nbsp; geschlossen werden.  
+
*For no other PDF can the&nbsp; ''uncorrelatedness''&nbsp; be used to infer&nbsp; ''statistical independence''&nbsp; .  
*Man kann aber stets  &nbsp; ⇒ &nbsp; für jede beliebige 2D–WDF&nbsp; $f_{XY}(x, y)$&nbsp; von der&nbsp; ''statistischen Unabhängigkeit''&nbsp; auf die&nbsp; ''Unkorreliertheit''&nbsp; schließen, weil:  
+
*But one can always &nbsp; ⇒ &nbsp; infer&nbsp; ''uncorrelatedness'' from&nbsp; ''statistical independence''&nbsp; for any 2D-PDF&nbsp; $f_{XY}(x, y)$&nbsp; because:  
*Sind zwei Zufallsgrößen&nbsp; $X$&nbsp; und&nbsp; $Y$&nbsp; völlig voneinander (statistisch) unabhängig, so gibt es zwischen ihnen natürlich auch keine ''linearen''&nbsp; Abhängigkeiten &nbsp; <br>⇒ &nbsp; sie sind dann auch unkorreliert&nbsp; &rArr; &nbsp; $ρ = 0$. }}
+
*If two random variables&nbsp; $X$&nbsp; and&nbsp; $Y$&nbsp; are completely (statistically) independent of each other, then of course there are no ''linear''&nbsp; dependencies between them &nbsp; <br>⇒ &nbsp; they are then also uncorrelated&nbsp; &rArr; &nbsp; $ρ = 0$. }}
 
<br><br>
 
<br><br>
===Höhenlinien bei unkorrelierten Zufallsgrößen===
+
===Contour lines for uncorrelated random variables===
  
[[File:P_ID318__Sto_T_4_2_S2_ganz_neu.png |frame| Höhenlinien der 2D-WDF bei unkorrelierten Größen | rechts]]
+
[[File:Sto_App_Bild2.png |frame| Contour lines of 2D-PDF with uncorrelated variables | right]]
Aus der Bedingungsgleichung&nbsp; $f_{XY}(x, y) = {\rm const.}$&nbsp; können die Höhenlinien der WDF berechnet werden.  
+
From the conditional equation&nbsp; $f_{XY}(x, y) = {\rm const.}$&nbsp; the contour lines of the PDF can be calculated.  
  
Sind die Komponenten&nbsp; $X$&nbsp; und&nbsp; $Y$ unkorreliert&nbsp; $(ρ_{XY} = 0)$, so erhält man als Gleichung für die Höhenlinien:  
+
If the components&nbsp; $X$&nbsp; and&nbsp; $Y$ are uncorrelated&nbsp; $(ρ_{XY} = 0)$, the equation obtained for the contour lines is:  
  
 
:$$\frac{x^{\rm 2}}{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2}}{\sigma_{Y}^{\rm 2}} =\rm const.$$
 
:$$\frac{x^{\rm 2}}{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2}}{\sigma_{Y}^{\rm 2}} =\rm const.$$
Die Höhenlinien beschreiben in diesem Fall folgende Figuren:  
+
In this case, the contour lines describe the following figures:  
*'''Kreise'''&nbsp; (falls&nbsp; $σ_X = σ_Y$, &nbsp; grüne Kurve), oder
+
*'''Circles'''&nbsp; (if&nbsp; $σ_X = σ_Y$, &nbsp; green curve), or
*'''Ellipsen'''&nbsp; (für&nbsp; $σ_X ≠ σ_Y$, &nbsp; blaue Kurve) in Ausrichtung der beiden Achsen.  
+
*'''Ellipses'''&nbsp; (for&nbsp; $σ_X ≠ σ_Y$, &nbsp; blue curve) in alignment of the two axes.  
 
<br clear=all>
 
<br clear=all>
===Korrelationsgerade===
+
===Regression line===
  
Als &nbsp;'''Korrelationsgerade'''&nbsp; bezeichnet man  die Gerade &nbsp;$y = K(x)$&nbsp; in der &nbsp;$(x, y)$&ndash;Ebene durch den „Mittelpunkt” $(m_X, m_Y)$. Diese besitzt folgende Eigenschaften:   
+
As &nbsp;'''regression line'''&nbsp; is called the straight line &nbsp;$y = K(x)$&nbsp; in the &nbsp;$(x, y)$&ndash;plane through the "center" $(m_X, m_Y)$. This has the following properties:   
[[File: P_ID1089__Sto_T_4_1_S7b_neu.png |frame| Gaußsche 2D-WDF (Approximation mit $N$ Messpunkten) und <br>Korrelationsgerade &nbsp;$y = K(x)$]]
+
[[File:Sto_App_Bild1a.png|frame| Gaussian 2D PDF (approximation with $N$ measurement points) and <br>correlation line &nbsp;$y = K(x)$]]
  
*Die mittlere quadratische Abweichung von dieser Geraden – in &nbsp;$y$&ndash;Richtung betrachtet und über alle &nbsp;$N$&nbsp; Messpunkte gemittelt – ist minimal:  
+
*The mean square error from this straight line - viewed in &nbsp;$y$&ndash;direction and averaged over all &nbsp;$N$&nbsp; measurement points - is minimal:  
:$$\overline{\varepsilon_y^{\rm 2} }=\frac{\rm 1}{N} \cdot \sum_{\nu=\rm 1}^{N}\; \;\big [y_\nu - K(x_{\nu})\big ]^{\rm 2}={\rm Minimum}.$$
+
:$$\overline{\varepsilon_y^{\rm 2} }=\frac{\rm 1}{N} \cdot \sum_{\nu=\rm 1}^{N}\; \;\big [y_\nu - K(x_{\nu})\big ]^{\rm 2}={\rm minimum}.$$
*Die Korrelationsgerade kann als eine Art „statistische Symmetrieachse“ interpretiert werden. Die Geradengleichung lautet im allgemeinen Fall:  
+
*The correlation straight line can be interpreted as a kind of "statistical symmetry axis". The equation of the straight line in the general case is:  
:$$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.$$
  
*Der Winkel, den die Korrelationsgerade zur &nbsp;$x$&ndash;Achse einnimmt, beträgt:  
+
*The angle that the correlation line makes to the &nbsp;$x$&ndash;axis is:  
 
:$$\theta={\rm arctan}(\frac{\sigma_{Y} }{\sigma_{X} }\cdot \rho_{XY}).$$
 
:$$\theta={\rm arctan}(\frac{\sigma_{Y} }{\sigma_{X} }\cdot \rho_{XY}).$$
  
  
  
===Höhenlinien bei korrelierten Zufallsgrößen===
+
===Contour lines for correlated random variables===
  
Bei korrelierten Komponenten&nbsp; $(ρ_{XY} ≠ 0)$&nbsp; sind die Höhenlinien der WDF (fast) immer elliptisch, also auch für den Sonderfall&nbsp; $σ_X = σ_Y$.  
+
For correlated components&nbsp; $(ρ_{XY} ≠ 0)$&nbsp; the contour lines of the PDF are (almost) always elliptic, so also for the special case&nbsp; $σ_X = σ_Y$.  
  
<u>Ausnahme:</u>&nbsp; $ρ_{XY}=\pm 1$ &nbsp; &rArr; &nbsp; Diracwand; siehe&nbsp; [[Aufgaben:Aufgabe_4.4:_Gaußsche_2D-WDF|Aufgabe 4.4]]&nbsp; im Buch &bdquo;Stochastische Signaltheorie&rdquo;, Teilaufgabe &nbsp;'''(5)'''.
+
<u>Exception:</u>&nbsp; $ρ_{XY}=\pm 1$ &nbsp; &rArr; &nbsp; "Dirac-wall"; see&nbsp; [[Aufgaben:Exercise_4.4:_Two-dimensional_Gaussian_PDF|"Exercise 4.4"]]&nbsp; in the book "Stochastic Signal Theory", subtask &nbsp;''(5)''.
[[File:P_ID408__Sto_T_4_2_S3_neu.png|right|frame|Höhenlinien der 2D-WDF bei korrelierten Größen]]
+
[[File:Sto_App_Bild3.png|right|frame|height lines of the two dimensional PDF with correlated quantities]]
Hier lautet die Bestimmungsgleichung der WDF-Höhenlinien:  
+
Here, the determining equation of the PDF height lines is:  
  
:$$f_{XY}(x, y) = {\rm const.} \hspace{0.5cm} \Rightarrow \hspace{0.5cm} \frac{x^{\rm 2} }{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2} }{\sigma_{Y}^{\rm 2} }-{\rm 2}\cdot\rho_{XY}\cdot\frac{x\cdot y}{\sigma_X\cdot \sigma_Y}={\rm const.}$$
+
:$$f_{XY}(x, y) = {\rm const.} \hspace{0.5cm} \rightarrow \hspace{0.5cm} \frac{x^{\rm 2} }{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2} }{\sigma_{Y}^{\rm 2} }-{\rm 2}\cdot\rho_{XY}\cdot\frac{x\cdot y}{\sigma_X\cdot \sigma_Y}={\rm const.}$$
Die Grafik zeigt in hellerem Blau für zwei unterschiedliche Parametersätze je eine Höhenlinie.  
+
The graph shows a contour line in lighter blue for each of two different sets of parameters.  
  
*Die Ellipsenhauptachse ist dunkelblau gestrichelt.  
+
*The ellipse major axis is dashed in dark blue.  
*Die&nbsp; [[Stochastische_Signaltheorie/Zweidimensionale_Zufallsgrößen#Korrelationsgerade|Korrelationsgerade]]&nbsp; $K(x)$&nbsp; ist durchgehend rot eingezeichnet.  
+
*The&nbsp; [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Regression_line|"regression line"]]&nbsp; $K(x)$&nbsp; is drawn in red throughout.  
  
  
Anhand dieser Darstellung sind folgende Aussagen möglich:  
+
Based on this plot, the following statements are possible:  
*Die Ellipsenform hängt außer vom Korrelationskoeffizienten&nbsp; $ρ_{XY}$&nbsp; auch vom Verhältnis der beiden Streuungen&nbsp; $σ_X$&nbsp; und&nbsp; $σ_Y$&nbsp; ab.   
+
*The ellipse shape depends not only on the correlation coefficient&nbsp; $ρ_{XY}$&nbsp; but also on the ratio of the two standard deviations&nbsp; $σ_X$&nbsp; and&nbsp; $σ_Y$&nbsp; .   
*Der Neigungswinkel&nbsp; $α$&nbsp; der Ellipsenhauptachse (gestrichelte Gerade) gegenüber der&nbsp; $x$&ndash;Achse hängt ebenfalls von&nbsp; $σ_X$,&nbsp; $σ_Y$&nbsp; und&nbsp; $ρ_{XY}$&nbsp; ab:  
+
*The angle of inclination&nbsp; $α$&nbsp; of the ellipse major axis (dashed straight line) with respect to the&nbsp; $x$&ndash;axis also depends on&nbsp; $σ_X$,&nbsp; $σ_Y$&nbsp; and&nbsp; $ρ_{XY}$&nbsp; :  
 
:$$\alpha = {1}/{2} \cdot {\rm arctan } \big ( 2 \cdot \rho_{XY} \cdot \frac {\sigma_X \cdot \sigma_Y}{\sigma_X^2 - \sigma_Y^2} \big ).$$
 
:$$\alpha = {1}/{2} \cdot {\rm arctan } \big ( 2 \cdot \rho_{XY} \cdot \frac {\sigma_X \cdot \sigma_Y}{\sigma_X^2 - \sigma_Y^2} \big ).$$
*Die (rote) Korrelationsgerade&nbsp; $y = K(x)$&nbsp; einer Gaußschen 2D–Zufallsgröße liegt stets unterhalb der (blau gestrichelten) Ellipsenhauptachse.  
+
*The (red) correlation line&nbsp; $y = K(x)$&nbsp; of a Gaussian 2D-random variable always lies below the (blue dashed) ellipse major axis.  
* $K(x)$&nbsp; kann aus dem Schnittpunkt der Höhenlinien und ihrer vertikalen Tangenten geometrisch konstruiert werden, wie in der Skizze in grüner Farbe angedeutet.   
+
* $K(x)$&nbsp; can be geometrically constructed from the intersection of the contour lines and their vertical tangents, as indicated in the sketch in green color.   
 
<br><br>
 
<br><br>
===Zweidimensionale Verteilungsfunktion &nbsp; &rArr; &nbsp; 2D&ndash;VTF===
+
===Two dimensional cumulative distribution function &nbsp; &rArr; &nbsp; 2D&ndash;CDF===
  
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Definition:}$&nbsp; Die&nbsp; '''2D-Verteilungsfunktion'''&nbsp; ist ebenso wie die 2D-WDF lediglich eine sinnvolle Erweiterung der&nbsp; [[Stochastische_Signaltheorie/Verteilungsfunktion_(VTF)#VTF_bei_kontinuierlichen_Zufallsgr.C3.B6.C3.9Fen_.281.29|eindimensionalen Verteilungsfunktion]]&nbsp; (VTF):  
+
$\text{Definition:}$&nbsp; The&nbsp; '''2D cumulative distribution function'''&nbsp; like the 2D-CDF, is merely a useful extension of the&nbsp; [[Theory_of_Stochastic_Signals/Cumulative_Distribution_Function#CDF_for_continuous-valued_random_variables|"one-dimensional distribution function"]]&nbsp; (PDF):  
:$$F_{XY}(x,y) = {\rm Pr}\big [(X \le x) \cap (Y \le y) \big ] .$$}}
+
:$$F_{XY}(x,y) = {\rm Pr}\big [(X \le x) \cap (Y \le y) \big ] .$$}}
  
  
Es ergeben sich folgende Gemeinsamkeiten und Unterschiede zwischen der &bdquo;1D-VTF&rdquo; und der&bdquo; 2D-VTF&rdquo;:
+
The following similarities and differences between the "1D&ndash;CDF" and the" 2D&ndash;CDF" emerge:
*Der Funktionalzusammenhang zwischen 2D&ndash;WDF und 2D&ndash;VTF ist wie im eindimensionalen Fall durch die Integration gegeben, aber nun in zwei Dimensionen. Bei kontinuierlichen Zufallsgrößen gilt:  
+
*The functional relationship between "2D&ndash;PDF" and "2D&ndash;CDF" is given by the integration as in the one-dimensional case, but now in two dimensions. For continuous random variables, the following holds:  
:$$F_{XY}(x,y)=\int_{-\infty}^{y} \int_{-\infty}^{x} f_{XY}(\xi,\eta) \,\,{\rm d}\xi \,\, {\rm d}\eta   .$$
+
:$$F_{XY}(x,y)=\int_{-\infty}^{y} \int_{-\infty}^{x} f_{XY}(\xi,\eta) \,\,{\rm d}\xi \,\, {\rm d}\eta .$$
*Umgekehrt lässt sich die Wahrscheinlichkeitsdichtefunktion aus der Verteilungsfunktion durch partielle Differentiation nach&nbsp; $x$&nbsp; und&nbsp; $y$&nbsp; angeben: '''Stimmt das?'''
+
*Inversely, the probability density function can be given from the cumulative distribution function by partial differentiation to&nbsp; $x$&nbsp; and&nbsp; $y$&nbsp; :  
 
:$$f_{XY}(x,y)=\frac{{\rm d}^{\rm 2} F_{XY}(\xi,\eta)}{{\rm d} \xi \,\, {\rm d} \eta}\Bigg|_{\left.{x=\xi \atop {y=\eta}}\right.}.$$
 
:$$f_{XY}(x,y)=\frac{{\rm d}^{\rm 2} F_{XY}(\xi,\eta)}{{\rm d} \xi \,\, {\rm d} \eta}\Bigg|_{\left.{x=\xi \atop {y=\eta}}\right.}.$$
*Bezüglich der Verteilungsfunktion&nbsp; $F_{XY}(x, y)$&nbsp; gelten folgende Grenzwerte:
+
*In terms of the cumulative distribution function&nbsp; $F_{XY}(x, y)$&nbsp; the following limits apply:
:$$F_{XY}(-\infty,-\infty) = 0,\hspace{0.5cm}F_{XY}(x,+\infty)=F_{X}(x ),\hspace{0.5cm}
+
:$$F_{XY}(-\infty,\ -\infty) = 0,\hspace{0.5cm}F_{XY}(x,\ +\infty)=F_{X}(x ),\hspace{0.5cm}
F_{XY}(+\infty,y)=F_{Y}(y ) ,\hspace{0.5cm}F_{XY}+\infty,+\infty) = 1.$$  
+
F_{XY}(+\infty,\ y)=F_{Y}(y ) ,\hspace{0.5cm}F_{XY}(+\infty,\ +\infty) = 1.$$  
*Im Grenzfall $($unendlich große&nbsp; $x$&nbsp; und&nbsp; $y)$&nbsp; ergibt sich demnach für die 2D-VTF der Wert&nbsp; $1$. Daraus erhält man die&nbsp; '''Normierungsbedingung'''&nbsp; für die 2D-Wahrscheinlichkeitsdichtefunktion:  
+
*In the limiting case $($infinitely large&nbsp; $x$&nbsp; and&nbsp; $y)$&nbsp; thus the value&nbsp; $1$ is obtained for the "2D&ndash;CDF". From this we obtain the&nbsp; '''normalization condition'''&nbsp; for the two-dimensional probability density function:  
:$$\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 . $$
  
{{BlaueBox|TEXT=
+
{{BlaueBox|TEXT=
$\text{Fazit:}$&nbsp; Beachten Sie den signifikanten Unterschied zwischen eindimensionalen und zweidimensionalen Zufallsgrößen:  
+
$\text{Conclusion:}$&nbsp; Note the significant difference between one-dimensional and two-dimensional random variables:  
*Bei eindimensionalen Zufallsgrößen ergibt die Fläche unter der WDF stets den Wert $1$.  
+
*For one-dimensional random variables, the area under the PDF always yields $1$.  
*Bei zweidimensionalen Zufallsgrößen ist das WDF-Volumen immer gleich $1$.}}
+
*For two-dimensional random variables, the PDF volume always equals $1$.}}
 
<br><br>
 
<br><br>
  
==Versuchsdurchführung==
+
==Exercises==
 +
<br>
 +
*Select the number&nbsp; $(1,\ 2$, ... $)$&nbsp; of the task to be processed.&nbsp; The number "0" corresponds to a "Reset":&nbsp; Setting as at the program start.
 +
*A task description is displayed.&nbsp; Parameter values are adjusted.&nbsp; Solution after pressing "Sample solution".&nbsp;
 +
*In the task description, we use &nbsp;$\rho$&nbsp; instead of &nbsp;$\rho_{XY}$.
 +
*For the one-dimensional Gaussian PDF holds:&nbsp; $f_{X}(x) = \sqrt{1/(2\pi \cdot \sigma_X^2)} \cdot {\rm e}^{-x^2/(2 \hspace{0.05cm}\cdot \hspace{0.05cm} \sigma_X^2)}$.
 +
 
  
[[File:Exercises_binomial_fertig.png|right]]
+
{{BlueBox|TEXT=
*Wählen Sie zunächst die Nummer '''1''' ... '''6''' der zu bearbeitenden Aufgabe.
+
'''(1)'''&nbsp; Get familiar with the program using the default &nbsp;$(\sigma_X=1, \ \sigma_Y=0.5, \ \rho = 0.7)$.&nbsp; Interpret the graphs for &nbsp;$\rm PDF$&nbsp; and&nbsp; $\rm CDF$.}}
*Eine Aufgabenbeschreibung wird angezeigt. Die Parameterwerte sind angepasst.
 
*Lösung nach Drücken von &bdquo;Hide solution&rdquo;.
 
*Aufgabenstellung und Lösung in Englisch.
 
  
 +
*&nbsp;$\rm PDF$&nbsp; is a ridge with the maximum at&nbsp; $x = 0, \ y = 0$.&nbsp; The ridge is slightly twisted with respect to the &nbsp;$x$&ndash;axis.
 +
*&nbsp;$\rm CDF$&nbsp; is obtained from &nbsp;$\rm PDF$&nbsp; by continuous integration in both directions.&nbsp; The maximum $($near &nbsp;$1)$&nbsp; occurs at &nbsp;$x=3, \ y=3$.
  
Die Nummer '''0''' entspricht einem &bdquo;Reset&rdquo;:
 
*Gleiche Einstellung wie beim Programmstart.
 
*Ausgabe eines &bdquo;Reset&ndash;Textes&rdquo; mit weiteren Erläuterungen zum Applet.
 
  
 +
{{BlueBox|TEXT=
 +
'''(2)'''&nbsp; The new setting is &nbsp;$\sigma_X= \sigma_Y=1, \ \rho = 0$.&nbsp; What are the values for &nbsp;$f_{XY}(0,\ 0)$&nbsp; and &nbsp;$F_{XY}(0,\ 0)$?&nbsp; Interpret the results}}
  
In der folgenden Beschreibung bedeutet
+
*&nbsp;The PDF maximum is&nbsp; $f_{XY}(0,\ 0) = 1/(2\pi)= 0.1592$, because of &nbsp;$\sigma_X= \sigma_Y = 1, \ \rho = 0$.&nbsp; The contour lines are circles.
*'''Blau''': &nbsp; Verteilungsfunktion 1 (im Applet blau markiert),
+
*&nbsp;For the CDF value:&nbsp; $F_{XY}(0,\ 0) = [{\rm Pr}(X \le 0)] \cdot [{\rm Pr}(Y \le 0)] = 0.25$.&nbsp; Minor deviation due to numerical integration.
*'''Rot''': &nbsp; &nbsp; Verteilungsfunktion 2 (im Applet rot markiert).
 
  
  
{{BlaueBox|TEXT=
+
{{BlueBox|TEXT=
'''(1)'''&nbsp; Setzen Sie '''Blau''': Binomialverteilung $(I=5, \ p=0.4)$ und '''Rot''': Binomialverteilung $(I=10, \ p=0.2)$.
+
'''(3)'''&nbsp; The settings of&nbsp; $(2)$&nbsp; continue to apply.&nbsp; What are the values for &nbsp;$f_{XY}(0,\ 1)$&nbsp; and &nbsp;$F_{XY}(0,\ 1)$?&nbsp; Interpret the results.}}
:Wie lauten die Wahrscheinlichkeiten ${\rm Pr}(z=0)$ und ${\rm Pr}(z=1)$?}}
+
 
 +
*&nbsp;It holds&nbsp; $f_{XY}(0,\ 1) = f_{X}(0) \cdot f_{Y}(1) = [ \sqrt{1/(2\pi)}] \cdot [\sqrt{1/(2\pi)} \cdot {\rm e}^{-0.5}] = 1/(2\pi) \cdot {\rm e}^{-0.5} = 0.0965$.
 +
*&nbsp;The program returns&nbsp; $F_{XY}(0,\ 1) = [{\rm Pr}(X \le 0)] \cdot [{\rm Pr}(Y \le 1)] = 0.4187$, i.e. a larger value than in&nbsp; $(2)$,&nbsp; since it integrates over a wider range.
  
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm}\text{Blau: }{\rm Pr}(z=0)=0.6^5=7.78\%, \hspace{0.3cm}{\rm Pr}(z=1)=0.4 \cdot 0.6^4=25.92\%;$
+
{{BlueBox|TEXT=
 +
'''(4)'''&nbsp; The settings are kept.&nbsp; What values are obtained for &nbsp;$f_{XY}(1,\ 0)$&nbsp; and &nbsp;$F_{XY}(1,\ 0)$?&nbsp; Interpret the results}}
  
$\hspace{1.85cm}\text{Rot: }{\rm Pr}(z=0)=0.8^10=10.74\%, \hspace{0.3cm}{\rm Pr}(z=1)=0.2 \cdot 0.8^9=26.84\%.$
+
*&nbsp;Due to rotational symmetry, same results as in&nbsp; $(3)$.
  
{{BlaueBox|TEXT=
 
'''(2)'''&nbsp; Es gelten weiter die Einstellungen von '''(1)'''. Wie groß sind die Wahrscheinlichkeiten ${\rm Pr}(3 \le z \le 5)$?}}
 
  
 +
{{BlueBox|TEXT=
 +
'''(5)'''&nbsp; Is the statement true:&nbsp;"Elliptic contour lines exist only for &nbsp;$\rho \ne 0$".&nbsp; Interpret the&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; and&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$&nbsp; for &nbsp;$\sigma_X=1, \ \sigma_Y=0.5$&nbsp; and&nbsp; $\rho = 0$.}}
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm}\text{Es gilt }{\rm Pr}(3 \le z \le 5) = {\rm Pr}(z=3) + {\rm Pr}(z=4) + {\rm Pr}(z=5)\text{, oder }
+
*&nbsp;No!&nbsp; Also, for&nbsp; $\ \rho = 0$&nbsp; the contour lines are elliptical&nbsp; (not circular)&nbsp; if &nbsp;$\sigma_X \ne \sigma_Y$.
{\rm Pr}(3 \le z \le 5) = {\rm Pr}(z \le 5) - {\rm Pr}(z \le 2)$.
+
*&nbsp;For&nbsp;$\sigma_X \gg \sigma_Y$&nbsp; the&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; has the shape of an elongated ridge parallel to&nbsp; $x$&ndash;axis, for&nbsp;$\sigma_X \ll \sigma_Y$&nbsp; parallel to&nbsp; $y$&ndash;axis.
 +
*&nbsp;For&nbsp;$\sigma_X \gg \sigma_Y$&nbsp; the slope of&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$&nbsp; in the direction of the &nbsp;$y$&ndash;axis is much steeper than in the direction of the &nbsp;$x$&ndash;axis.
  
$\hspace{1.85cm}\text{Blau: }{\rm Pr}(3 \le z \le 5) = 0.2304+ 0.0768 + 0.0102 =1 - 0.6826 = 0.3174;$
 
  
$\hspace{1.85cm}\text{Rot: }{\rm Pr}(3 \le z \le 5) = 0.2013 + 0.0881 + 0.0264 = 0.9936 - 0.6778 = 0.3158.$
+
{{BlueBox|TEXT=
 +
'''(6)'''&nbsp; Starting from&nbsp; $\sigma_X=\sigma_Y=1\ \rho = 0.7$&nbsp; vary the correlation coefficient&nbsp; $\rho$.&nbsp; What is the slope angle &nbsp;$\alpha$&nbsp; of the ellipse main axis?}}
  
{{BlaueBox|TEXT=
+
*&nbsp;For&nbsp; $\rho > 0$:&nbsp; &nbsp;$\alpha = 45^\circ$. &nbsp; &nbsp; For&nbsp; $\rho < 0$:&nbsp; &nbsp;$\alpha = -45^\circ$.&nbsp; For&nbsp; $\rho = 0$:&nbsp; The contour lines are circular and thus there are no ellipses main axis.
'''(3)'''&nbsp; Es gelten weiter die Einstellungen von '''(1)'''. Wie unterscheiden sich der Mittelwert $m_1$ und die Streuung $\sigma$ der beiden Binomialverteilungen?}}
 
  
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm}\text{Mittelwert:}\hspace{0.2cm}m_\text{1} = I \cdot p\hspace{0.3cm} \Rightarrow\hspace{0.3cm} m_\text{1, Blau} = 5 \cdot 0.4\underline{ = 2 =}  \ m_\text{1, Rot} = 10 \cdot 0.2; $
+
{{BlueBox|TEXT=
 +
'''(7)'''&nbsp; Starting from&nbsp; $\sigma_X=\sigma_Y=1\ \rho = 0.7$&nbsp; vary the correlation coefficient&nbsp; $\rho$.&nbsp; What is the slope angle &nbsp;$\theta$&nbsp; of the correlation line&nbsp; $K(x)$?}}
  
$\hspace{1.85cm}\text{Streuung:}\hspace{0.4cm}\sigma = \sqrt{I \cdot p \cdot (1-p)} = \sqrt{m_1 \cdot (1-p)}\hspace{0.3cm}\Rightarrow\hspace{0.3cm} \sigma_{\rm Blau} = \sqrt{2 \cdot 0.6} =1.095 < \sigma_{\rm Rot} = \sqrt{2 \cdot 0.8} = 1.265.$
+
*&nbsp;For&nbsp; $\sigma_X=\sigma_Y$:&nbsp;  &nbsp;$\theta={\rm arctan}\ (\rho)$.&nbsp; The slope increases with increasing&nbsp; $\rho > 0$.&nbsp; In all cases, &nbsp;$\theta < \alpha = 45^\circ$ holds. For&nbsp; $\rho = 0.7$&nbsp; this gives &nbsp;$\theta = 35^\circ$.
  
{{BlaueBox|TEXT=
 
'''(4)'''&nbsp; Setzen Sie '''Blau''': Binomialverteilung $(I=15, p=0.3)$ und '''Rot''': Poissonverteilung $(\lambda=4.5)$.
 
:Welche Unterschiede ergeben sich  zwischen beiden Verteilungen hinsichtlich Mittelwert $m_1$ und Varianz $\sigma^2$?}}
 
  
 +
{{BlueBox|TEXT=
 +
'''(8)'''&nbsp; Starting from&nbsp; $\sigma_X=\sigma_Y=0.75, \ \rho = 0.7$&nbsp; vary the parameters&nbsp; $\sigma_Y$&nbsp; and&nbsp; $\rho $.&nbsp; What statements hold for the angles &nbsp;$\alpha$&nbsp; and&nbsp; $\theta$?}}
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm}\text{Beide Verteilungern haben gleichen Mittelwert:}\hspace{0.2cm}m_\text{1, Blau}  =  I \cdot p\ = 15 \cdot 0.3\hspace{0.15cm}\underline{ = 4.5 =} m_\text{1, Rot} = \lambda$;
+
*&nbsp;For&nbsp; $\sigma_Y<\sigma_X$: &nbsp; $\alpha < 45^\circ$. &nbsp; &nbsp; For&nbsp; $\sigma_Y>\sigma_X$: &nbsp; $\alpha > 45^\circ$. &nbsp;For all settings:&nbsp; '''The correlation line is below the ellipse main axis'''.
  
$\hspace{1.85cm} \text{Binomialverteilung: }\hspace{0.2cm} \sigma_\text{Blau}^2 = m_\text{1, Blau} \cdot (1-p)\hspace{0.15cm}\underline { = 3.15} \le \text{Poissonverteilung: }\hspace{0.2cm} \sigma_\text{Rot}^2 = \lambda\hspace{0.15cm}\underline { = 4.5}$;
 
  
{{BlaueBox|TEXT=
+
{{BlueBox|TEXT=
'''(5)'''&nbsp; Es gelten die Einstellungen von '''(4)'''. Wie groß sind die Wahrscheinlichkeiten ${\rm Pr}(z  \gt 10)$ und ${\rm Pr}(z \gt 15)$?}}
+
'''(9)'''&nbsp; Assume&nbsp; $\sigma_X= 1, \ \sigma_Y=0.75, \ \rho = 0.7$.&nbsp; Vary&nbsp; $\rho$.&nbsp; How to construct the correlation line from the contour lines?}}
  
 +
*&nbsp;The correlation line intersects all contour lines at that points where the tangent line is perpendicular to the contour line.
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm} \text{Binomial: }\hspace{0.2cm} {\rm Pr}(z  \gt 10) = 1 - {\rm Pr}(z  \le 10) = 1 - 0.9993 = 0.0007;\hspace{0.3cm} {\rm Pr}(z \gt 15) = 0 \ {\rm  (exakt)}$.
 
  
$\hspace{1.85cm}\text{Poisson: }\hspace{0.2cm} {\rm Pr}(z  \gt 10) = 1 - 0.9933 = 0.0067;\hspace{0.3cm}{\rm Pr}(z \gt 15) \gt  0 \ ( \approx 0)$
+
{{BlueBox|TEXT=
 +
'''(10)'''&nbsp; Now let be&nbsp; $\sigma_X= \sigma_Y=1, \ \rho = 0.95$.&nbsp; Interpret the&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$.&nbsp; Which statements are true for the limiting case&nbsp; $\rho \to 1$&nbsp;?}}
  
$\hspace{1.85cm} \text{Näherung: }\hspace{0.2cm}{\rm Pr}(z \gt 15) \ge {\rm Pr}(z = 16) = \lambda^{16}/{16!}\approx 2 \cdot 10^{-22}$.
+
*&nbsp;The&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; only has components near the ellipse main axis.&nbsp; The correlation line is just below:&nbsp; $\alpha = 45^\circ, \ \theta = 43.5^\circ$.
 +
*&nbsp;In the limiting case&nbsp; $\rho \to 1$&nbsp; it holds&nbsp; $\theta = \alpha = 45^\circ$.&nbsp; Outside the correlation line, the&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; would have no shares.&nbsp; That is:
 +
*&nbsp;Along the correlation line, there would be a&nbsp; "Dirac wall" &nbsp; &rArr; &nbsp; All values are infinitely large, nevertheless Gaussian weighted around the mean.
  
{{BlaueBox|TEXT=
+
'''(6)'''&nbsp; Es gelten weiter die Einstellungen von '''(4)'''. Mit welchen Parametern ergeben sich symmetrische Verteilungen um $m_1$?}}
 
  
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm} \text{Binomialverung mit }p = 0.5\text{:  }p_\mu =  {\rm Pr}(z  = \mu)\text{ symmetrisch um } m_1 = I/2 = 7.5 \ ⇒  \ p_μ = p_{I–μ}\ ⇒  \  p_8 = p_7, \ p_9 = p_6,  \text{usw.}$
 
  
$\hspace{1.85cm}\text{Die Poissonverteilung wird dagegen nie symmetrisch, da sie sich bis ins Unendliche erstreckt!}$
 
  
==Zur Handhabung des Applets==
 
[[File:Handhabung_binomial.png|left|600px]]
 
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Vorauswahl für blauen Parametersatz
 
  
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Parametereingabe $I$ und $p$ per Slider
 
  
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Vorauswahl für roten Parametersatz
+
==Applet Manual==
 +
<br>
 +
[[File:Anleitung_2D-Gauss.png|left|500px|frame|Screen shot from the German version]]
 +
<br><br>
 +
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Parameter input via slider:&nbsp; $\sigma_X$, &nbsp;$\sigma_Y$ and&nbsp; $\rho$.
  
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Parametereingabe $\lambda$ per Slider
+
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Selection:&nbsp; Representation of PDF or CDF.
  
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Graphische Darstellung der Verteilungen
+
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Reset:&nbsp; Setting as at program start.
  
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Momentenausgabe für blauen Parametersatz
+
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Display contour lines instead of one-dimensional PDF.
  
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Momentenausgabe für roten Parametersatz
+
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Display range for two-dimensional PDF.
  
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Variation der grafischen Darstellung
+
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Manipulation of the three-dimensional graph (zoom, rotate, ...)
  
 +
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Display range for&nbsp; "one-dimensional PDF"&nbsp; or&nbsp; "contour lines".
  
$\hspace{1.5cm}$&bdquo;$+$&rdquo; (Vergrößern),
+
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Manipulation of the two-dimensional graphics ("one-dimensional PDF")
  
$\hspace{1.5cm}$ &bdquo;$-$&rdquo; (Verkleinern)
+
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Area for exercises: Task selection. 
  
$\hspace{1.5cm}$ &bdquo;$\rm o$&rdquo; (Zurücksetzen)
+
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Area for exercises: Task description
  
$\hspace{1.5cm}$ &bdquo;$\leftarrow$&rdquo; (Verschieben nach links),  usw.
+
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Area for exercises: Show/hide solution
  
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Ausgabe von ${\rm Pr} (z = \mu)$ und ${\rm Pr} (z  \le \mu)$
+
&nbsp; &nbsp; '''( L)''' &nbsp; &nbsp; Area for exercises: Output of the sample solution
  
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Bereich für die Versuchsdurchführung
+
<u>Note:</u> &nbsp; &nbsp;Value output of the graphics&nbsp; $($both 2D and 3D$)$&nbsp; via mouse control.
 
<br clear=all>
 
<br clear=all>
<br>'''Andere Möglichkeiten zur Variation der grafischen Darstellung''':
 
*Gedrückte Shifttaste und Scrollen:  Zoomen im Koordinatensystem,
 
*Gedrückte Shifttaste und linke Maustaste: Verschieben des Koordinatensystems.
 
  
==Über die Autoren==
 
Dieses interaktive Berechnungstool  wurde am [http://www.lnt.ei.tum.de/startseite Lehrstuhl für Nachrichtentechnik] der [https://www.tum.de/ Technischen Universität München] konzipiert und realisiert.
 
*Die erste Version wurde 2003 von [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Studierende#Ji_Li_.28Bachelorarbeit_EI_2003.2C_Diplomarbeit_EI_2005.29|Ji Li]] im Rahmen ihrer Diplomarbeit mit &bdquo;FlashMX&ndash;Actionscript&rdquo; erstellt (Betreuer: [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Mitarbeiter_und_Dozenten#Prof._Dr.-Ing._habil._G.C3.BCnter_S.C3.B6der_.28am_LNT_seit_1974.29|Günter Söder]]).
 
*2018 wurde das Programm  von [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Studierende#Jimmy_He_.28Bachelorarbeit_2018.29|Jimmy He]]  (Bachelorarbeit, Betreuer: [[Biografien_und_Bibliografien/Beteiligte_der_Professur_Leitungsgebundene_%C3%9Cbertragungstechnik#Tasn.C3.A1d_Kernetzky.2C_M.Sc._.28bei_L.C3.9CT_seit_2014.29|Tasnád Kernetzky]] )  auf  &bdquo;HTML5&rdquo; umgesetzt und neu gestaltet.
 
  
==Nochmalige Aufrufmöglichkeit des Applets in neuem Fenster==
 
  
{{LntAppletLink|verteilungen}}
+
==About the Authors==
 +
<br>
 +
This interactive calculation tool was designed and implemented at the&nbsp; [https://www.ei.tum.de/en/lnt/home/ Institute for Communications Engineering]&nbsp; at the&nbsp; [https://www.tum.de/en Technical University of Munich].
 +
*The first version was created in 2003 by&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Ji_Li_.28Bachelorarbeit_EI_2003.2C_Diplomarbeit_EI_2005.29|Ji Li]] &nbsp; as part of his diploma thesis with “FlashMX – Actionscript” (Supervisor: [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Mitarbeiter_und_Dozenten#Prof._Dr.-Ing._habil._G.C3.BCnter_S.C3.B6der_.28am_LNT_seit_1974.29|Günter Söder]]).
 +
*In 2019 the program was redesigned by&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]]&nbsp; as part of her bachelor thesis&nbsp; (Supervisor: [[Biographies_and_Bibliographies/Beteiligte_der_Professur_Leitungsgebundene_%C3%9Cbertragungstechnik#Tasn.C3.A1d_Kernetzky.2C_M.Sc._.28bei_L.C3.9CT_seit_2014.29|Tasnád Kernetzky]] ) via "HTML5".
 +
*Last revision and English version 2021 by&nbsp; [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]]&nbsp; in the context of a working student activity.&nbsp;
 +
 
 +
 
 +
The conversion of this applet to HTML 5 was financially supported by&nbsp; [https://www.ei.tum.de/studium/studienzuschuesse/ "Studienzuschüsse"]&nbsp; (Faculty EI of the TU Munich).&nbsp; We thank.
 +
 
 +
 
 +
 
 +
==Once again: Open Applet in new Tab==
 +
 
 +
{{LntAppletLinkEnDe|gauss_en|gauss}}

Latest revision as of 21:20, 16 April 2023

Open Applet in new Tab   Deutsche Version Öffnen

Applet Description


The applet illustrates the properties of two-dimensional Gaussian random variables  $XY\hspace{-0.1cm}$, characterized by the standard deviations (rms)  $\sigma_X$  and  $\sigma_Y$  of their two components, and the correlation coefficient  $\rho_{XY}$ between them. The components are assumed to be zero mean:  $m_X = m_Y = 0$.

The applet shows

  • the two-dimensional probability density function   ⇒   $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$  $f_{XY}(x, \hspace{0.1cm}y)$  in three-dimensional representation as well as in the form of contour lines,
  • the corresponding marginal probability density function  ⇒   $\rm 1D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$  $f_{X}(x)$  of the random variable  $X$  as a blue curve; likewise  $f_{Y}(y)$  for the second random variable,
  • the two-dimensional distribution function  ⇒   $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$  $F_{XY}(x, \hspace{0.1cm}y)$  as a 3D plot,
  • the distribution function  ⇒   $\rm 1D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$  $F_{X}(x)$  of the random variable  $X$; also  $F_{Y}(y)$  as a red curve.


The applet uses the framework  "Plot.ly"

Theoretical Background


Joint probability density function   ⇒   2D–PDF

We consider two continuous value random variables  $X$  and  $Y\hspace{-0.1cm}$, between which statistical dependencies may exist. To describe the interrelationships between these variables, it is convenient to combine the two components into a  two-dimensional random variable  $XY =(X, Y)$  . Then holds:

$\text{Definition:}$  The  joint probability density function  is the probability density function (PDF) of the two-dimensional random variable  $XY$  at location  $(x, y)$:

$$f_{XY}(x, \hspace{0.1cm}y) = \lim_{\left.{\delta x\rightarrow 0 \atop {\delta y\rightarrow 0} }\right. }\frac{ {\rm Pr}\big [ (x - {\rm \Delta} x/{\rm 2} \le X \le x + {\rm \Delta} x/{\rm 2}) \cap (y - {\rm \Delta} y/{\rm 2} \le Y \le y +{\rm \Delta}y/{\rm 2}) \big] }{ {\rm \Delta} \ x\cdot{\rm \Delta} y}.$$
  • The joint probability density function, or in short  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$  is an extension of the one-dimensional PDF.
  • $∩$  denotes the logical AND operation.
  • $X$  and  $Y$ denote the two random variables, and  $x \in X$  and   $y \in Y$ indicate realizations thereof.
  • The nomenclature used for this applet thus differs slightly from the description in the "Theory section".


Using this 2D–PDF  $f_{XY}(x, y)$  statistical dependencies within the two-dimensional random variable  $XY$  are also fully captured in contrast to the two one-dimensional density functions   ⇒   marginal probability density functions:

$$f_{X}(x) = \int _{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}y ,$$
$$f_{Y}(y) = \int_{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}x .$$

These two marginal density functions  $f_X(x)$  and  $f_Y(y)$

  • provide only statistical information about the individual components  $X$  and  $Y$, respectively,
  • but not about the bindings between them.


As a quantitative measure of the linear statistical bindings  ⇒   correlation  one uses.

  • the  covariance  $\mu_{XY}$, which is equal to the first-order common linear moment for mean-free components:
$$\mu_{XY} = {\rm E}\big[X \cdot Y\big] = \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} X \cdot Y \cdot f_{XY}(x,y) \,{\rm d}x \, {\rm d}y ,$$
  • the  correlation coefficient  after normalization to the two rms values  $σ_X$  and $σ_Y$  of the two components:
$$\rho_{XY}=\frac{\mu_{XY} }{\sigma_X \cdot \sigma_Y}.$$

$\text{Properties of correlation coefficient:}$ 

  • Because of normalization, $-1 \le ρ_{XY} ≤ +1$ always holds .
  • If the two random variables  $X$  and  $Y$ are uncorrelated, then  $ρ_{XY} = 0$.
  • For strict linear dependence between  $X$  and  $Y$,  $ρ_{XY}= ±1$   ⇒   complete correlation.
  • A positive correlation coefficient means that when  $X$ is larger, on statistical average,  $Y$  is also larger than when  $X$ is smaller.
  • In contrast, a negative correlation coefficient expresses that  $Y$  becomes smaller on average as  $X$  increases

.



2D–PDF for Gaussian random variables

For the special case  Gaussian random variables  - the name goes back to the scientist  "Carl Friedrich Gauss"  - we can further note:

  • The joint PDF of a Gaussian 2D random variable  $XY$  with means  $m_X = 0$  and  $m_Y = 0$  and the correlation coefficient  $ρ = ρ_{XY}$  is:
$$f_{XY}(x, y)=\frac{\rm 1}{\rm 2\it\pi \cdot \sigma_X \cdot \sigma_Y \cdot \sqrt{\rm 1-\rho^2}}\ \cdot\ \exp\Bigg[-\frac{\rm 1}{\rm 2 \cdot (1- \it\rho^{\rm 2} {\rm)}}\cdot(\frac {\it x^{\rm 2}}{\sigma_X^{\rm 2}}+\frac {\it y^{\rm 2}}{\sigma_Y^{\rm 2}}-\rm 2\it\rho\cdot\frac{x \cdot y}{\sigma_x \cdot \sigma_Y}\rm ) \rm \Bigg]\hspace{0.8cm}{\rm with}\hspace{0.5cm}-1 \le \rho \le +1.$$
  • Replacing  $x$  by  $(x - m_X)$  and  $y$  by  $(y- m_Y)$, we obtain the more general PDF of a two-dimensional Gaussian random variable with mean.
  • The marginal probability density functions  $f_{X}(x)$  and  $f_{Y}(y)$  of a 2D Gaussian random variable are also Gaussian with the standard deviations  $σ_X$  and  $σ_Y$, respectively.
  • For uncorrelated components  $X$  and  $Y$, in the above equation  $ρ = 0$  must be substituted, and then the result is obtained:
$$f_{XY}(x,y)=\frac{1}{\sqrt{2\pi}\cdot\sigma_{X}} \cdot\rm e^{-\it {x^{\rm 2}}\hspace{-0.08cm}/{\rm (}{\rm 2\hspace{0.05cm}\it\sigma_{X}^{\rm 2}} {\rm )}} \cdot\frac{1}{\sqrt{2\pi}\cdot\sigma_{\it Y}}\cdot e^{-\it {y^{\rm 2}}\hspace{-0.08cm}/{\rm (}{\rm 2\hspace{0.05cm}\it\sigma_{Y}^{\rm 2}} {\rm )}} = \it f_{X} \rm ( \it x \rm ) \cdot \it f_{Y} \rm ( \it y \rm ) .$$

$\text{Conclusion:}$  In the special case of a 2D random variable with Gaussian PDF  $f_{XY}(x, y)$  it also follows directly from  uncorrelatedness  the  statistical independence:

$$f_{XY}(x,y)= f_{X}(x) \cdot f_{Y}(y) . $$

Please note:

  • For no other PDF can the  uncorrelatedness  be used to infer  statistical independence  .
  • But one can always   ⇒   infer  uncorrelatedness from  statistical independence  for any 2D-PDF  $f_{XY}(x, y)$  because:
  • If two random variables  $X$  and  $Y$  are completely (statistically) independent of each other, then of course there are no linear  dependencies between them  
    ⇒   they are then also uncorrelated  ⇒   $ρ = 0$.



Contour lines for uncorrelated random variables

Contour lines of 2D-PDF with uncorrelated variables

From the conditional equation  $f_{XY}(x, y) = {\rm const.}$  the contour lines of the PDF can be calculated.

If the components  $X$  and  $Y$ are uncorrelated  $(ρ_{XY} = 0)$, the equation obtained for the contour lines is:

$$\frac{x^{\rm 2}}{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2}}{\sigma_{Y}^{\rm 2}} =\rm const.$$

In this case, the contour lines describe the following figures:

  • Circles  (if  $σ_X = σ_Y$,   green curve), or
  • Ellipses  (for  $σ_X ≠ σ_Y$,   blue curve) in alignment of the two axes.


Regression line

As  regression line  is called the straight line  $y = K(x)$  in the  $(x, y)$–plane through the "center" $(m_X, m_Y)$. This has the following properties:

Gaussian 2D PDF (approximation with $N$ measurement points) and
correlation line  $y = K(x)$
  • The mean square error from this straight line - viewed in  $y$–direction and averaged over all  $N$  measurement points - is minimal:
$$\overline{\varepsilon_y^{\rm 2} }=\frac{\rm 1}{N} \cdot \sum_{\nu=\rm 1}^{N}\; \;\big [y_\nu - K(x_{\nu})\big ]^{\rm 2}={\rm minimum}.$$
  • The correlation straight line can be interpreted as a kind of "statistical symmetry axis". The equation of the straight line in the general case is:
$$y=K(x)=\frac{\sigma_Y}{\sigma_X}\cdot\rho_{XY}\cdot(x - m_X)+m_Y.$$
  • The angle that the correlation line makes to the  $x$–axis is:
$$\theta={\rm arctan}(\frac{\sigma_{Y} }{\sigma_{X} }\cdot \rho_{XY}).$$


Contour lines for correlated random variables

For correlated components  $(ρ_{XY} ≠ 0)$  the contour lines of the PDF are (almost) always elliptic, so also for the special case  $σ_X = σ_Y$.

Exception:  $ρ_{XY}=\pm 1$   ⇒   "Dirac-wall"; see  "Exercise 4.4"  in the book "Stochastic Signal Theory", subtask  (5).

height lines of the two dimensional PDF with correlated quantities

Here, the determining equation of the PDF height lines is:

$$f_{XY}(x, y) = {\rm const.} \hspace{0.5cm} \rightarrow \hspace{0.5cm} \frac{x^{\rm 2} }{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2} }{\sigma_{Y}^{\rm 2} }-{\rm 2}\cdot\rho_{XY}\cdot\frac{x\cdot y}{\sigma_X\cdot \sigma_Y}={\rm const.}$$

The graph shows a contour line in lighter blue for each of two different sets of parameters.

  • The ellipse major axis is dashed in dark blue.
  • The  "regression line"  $K(x)$  is drawn in red throughout.


Based on this plot, the following statements are possible:

  • The ellipse shape depends not only on the correlation coefficient  $ρ_{XY}$  but also on the ratio of the two standard deviations  $σ_X$  and  $σ_Y$  .
  • The angle of inclination  $α$  of the ellipse major axis (dashed straight line) with respect to the  $x$–axis also depends on  $σ_X$,  $σ_Y$  and  $ρ_{XY}$  :
$$\alpha = {1}/{2} \cdot {\rm arctan } \big ( 2 \cdot \rho_{XY} \cdot \frac {\sigma_X \cdot \sigma_Y}{\sigma_X^2 - \sigma_Y^2} \big ).$$
  • The (red) correlation line  $y = K(x)$  of a Gaussian 2D-random variable always lies below the (blue dashed) ellipse major axis.
  • $K(x)$  can be geometrically constructed from the intersection of the contour lines and their vertical tangents, as indicated in the sketch in green color.



Two dimensional cumulative distribution function   ⇒   2D–CDF

$\text{Definition:}$  The  2D cumulative distribution function  like the 2D-CDF, is merely a useful extension of the  "one-dimensional distribution function"  (PDF):

$$F_{XY}(x,y) = {\rm Pr}\big [(X \le x) \cap (Y \le y) \big ] .$$


The following similarities and differences between the "1D–CDF" and the" 2D–CDF" emerge:

  • The functional relationship between "2D–PDF" and "2D–CDF" is given by the integration as in the one-dimensional case, but now in two dimensions. For continuous random variables, the following holds:
$$F_{XY}(x,y)=\int_{-\infty}^{y} \int_{-\infty}^{x} f_{XY}(\xi,\eta) \,\,{\rm d}\xi \,\, {\rm d}\eta .$$
  • Inversely, the probability density function can be given from the cumulative distribution function by partial differentiation to  $x$  and  $y$  :
$$f_{XY}(x,y)=\frac{{\rm d}^{\rm 2} F_{XY}(\xi,\eta)}{{\rm d} \xi \,\, {\rm d} \eta}\Bigg|_{\left.{x=\xi \atop {y=\eta}}\right.}.$$
  • In terms of the cumulative distribution function  $F_{XY}(x, y)$  the following limits apply:
$$F_{XY}(-\infty,\ -\infty) = 0,\hspace{0.5cm}F_{XY}(x,\ +\infty)=F_{X}(x ),\hspace{0.5cm} F_{XY}(+\infty,\ y)=F_{Y}(y ) ,\hspace{0.5cm}F_{XY}(+\infty,\ +\infty) = 1.$$
  • In the limiting case $($infinitely large  $x$  and  $y)$  thus the value  $1$ is obtained for the "2D–CDF". From this we obtain the  normalization condition  for the two-dimensional probability density function:
$$\int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}x \,\,{\rm d}y=1 . $$

$\text{Conclusion:}$  Note the significant difference between one-dimensional and two-dimensional random variables:

  • For one-dimensional random variables, the area under the PDF always yields $1$.
  • For two-dimensional random variables, the PDF volume always equals $1$.



Exercises


  • Select the number  $(1,\ 2$, ... $)$  of the task to be processed.  The number "0" corresponds to a "Reset":  Setting as at the program start.
  • A task description is displayed.  Parameter values are adjusted.  Solution after pressing "Sample solution". 
  • In the task description, we use  $\rho$  instead of  $\rho_{XY}$.
  • For the one-dimensional Gaussian PDF holds:  $f_{X}(x) = \sqrt{1/(2\pi \cdot \sigma_X^2)} \cdot {\rm e}^{-x^2/(2 \hspace{0.05cm}\cdot \hspace{0.05cm} \sigma_X^2)}$.


(1)  Get familiar with the program using the default  $(\sigma_X=1, \ \sigma_Y=0.5, \ \rho = 0.7)$.  Interpret the graphs for  $\rm PDF$  and  $\rm CDF$.

  •  $\rm PDF$  is a ridge with the maximum at  $x = 0, \ y = 0$.  The ridge is slightly twisted with respect to the  $x$–axis.
  •  $\rm CDF$  is obtained from  $\rm PDF$  by continuous integration in both directions.  The maximum $($near  $1)$  occurs at  $x=3, \ y=3$.


(2)  The new setting is  $\sigma_X= \sigma_Y=1, \ \rho = 0$.  What are the values for  $f_{XY}(0,\ 0)$  and  $F_{XY}(0,\ 0)$?  Interpret the results

  •  The PDF maximum is  $f_{XY}(0,\ 0) = 1/(2\pi)= 0.1592$, because of  $\sigma_X= \sigma_Y = 1, \ \rho = 0$.  The contour lines are circles.
  •  For the CDF value:  $F_{XY}(0,\ 0) = [{\rm Pr}(X \le 0)] \cdot [{\rm Pr}(Y \le 0)] = 0.25$.  Minor deviation due to numerical integration.


(3)  The settings of  $(2)$  continue to apply.  What are the values for  $f_{XY}(0,\ 1)$  and  $F_{XY}(0,\ 1)$?  Interpret the results.

  •  It holds  $f_{XY}(0,\ 1) = f_{X}(0) \cdot f_{Y}(1) = [ \sqrt{1/(2\pi)}] \cdot [\sqrt{1/(2\pi)} \cdot {\rm e}^{-0.5}] = 1/(2\pi) \cdot {\rm e}^{-0.5} = 0.0965$.
  •  The program returns  $F_{XY}(0,\ 1) = [{\rm Pr}(X \le 0)] \cdot [{\rm Pr}(Y \le 1)] = 0.4187$, i.e. a larger value than in  $(2)$,  since it integrates over a wider range.


(4)  The settings are kept.  What values are obtained for  $f_{XY}(1,\ 0)$  and  $F_{XY}(1,\ 0)$?  Interpret the results

  •  Due to rotational symmetry, same results as in  $(3)$.


(5)  Is the statement true: "Elliptic contour lines exist only for  $\rho \ne 0$".  Interpret the  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$  and  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$  for  $\sigma_X=1, \ \sigma_Y=0.5$  and  $\rho = 0$.

  •  No!  Also, for  $\ \rho = 0$  the contour lines are elliptical  (not circular)  if  $\sigma_X \ne \sigma_Y$.
  •  For $\sigma_X \gg \sigma_Y$  the  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$  has the shape of an elongated ridge parallel to  $x$–axis, for $\sigma_X \ll \sigma_Y$  parallel to  $y$–axis.
  •  For $\sigma_X \gg \sigma_Y$  the slope of  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$  in the direction of the  $y$–axis is much steeper than in the direction of the  $x$–axis.


(6)  Starting from  $\sigma_X=\sigma_Y=1\ \rho = 0.7$  vary the correlation coefficient  $\rho$.  What is the slope angle  $\alpha$  of the ellipse main axis?

  •  For  $\rho > 0$:   $\alpha = 45^\circ$.     For  $\rho < 0$:   $\alpha = -45^\circ$.  For  $\rho = 0$:  The contour lines are circular and thus there are no ellipses main axis.


(7)  Starting from  $\sigma_X=\sigma_Y=1\ \rho = 0.7$  vary the correlation coefficient  $\rho$.  What is the slope angle  $\theta$  of the correlation line  $K(x)$?

  •  For  $\sigma_X=\sigma_Y$:   $\theta={\rm arctan}\ (\rho)$.  The slope increases with increasing  $\rho > 0$.  In all cases,  $\theta < \alpha = 45^\circ$ holds. For  $\rho = 0.7$  this gives  $\theta = 35^\circ$.


(8)  Starting from  $\sigma_X=\sigma_Y=0.75, \ \rho = 0.7$  vary the parameters  $\sigma_Y$  and  $\rho $.  What statements hold for the angles  $\alpha$  and  $\theta$?

  •  For  $\sigma_Y<\sigma_X$:   $\alpha < 45^\circ$.     For  $\sigma_Y>\sigma_X$:   $\alpha > 45^\circ$.  For all settings:  The correlation line is below the ellipse main axis.


(9)  Assume  $\sigma_X= 1, \ \sigma_Y=0.75, \ \rho = 0.7$.  Vary  $\rho$.  How to construct the correlation line from the contour lines?

  •  The correlation line intersects all contour lines at that points where the tangent line is perpendicular to the contour line.


(10)  Now let be  $\sigma_X= \sigma_Y=1, \ \rho = 0.95$.  Interpret the  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$.  Which statements are true for the limiting case  $\rho \to 1$ ?

  •  The  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$  only has components near the ellipse main axis.  The correlation line is just below:  $\alpha = 45^\circ, \ \theta = 43.5^\circ$.
  •  In the limiting case  $\rho \to 1$  it holds  $\theta = \alpha = 45^\circ$.  Outside the correlation line, the  $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$  would have no shares.  That is:
  •  Along the correlation line, there would be a  "Dirac wall"   ⇒   All values are infinitely large, nevertheless Gaussian weighted around the mean.





Applet Manual


Screen shot from the German version



    (A)     Parameter input via slider:  $\sigma_X$,  $\sigma_Y$ and  $\rho$.

    (B)     Selection:  Representation of PDF or CDF.

    (C)     Reset:  Setting as at program start.

    (D)     Display contour lines instead of one-dimensional PDF.

    (E)     Display range for two-dimensional PDF.

    (F)     Manipulation of the three-dimensional graph (zoom, rotate, ...)

    (G)     Display range for  "one-dimensional PDF"  or  "contour lines".

    (H)     Manipulation of the two-dimensional graphics ("one-dimensional PDF")

    ( I )     Area for exercises: Task selection.

    (J)     Area for exercises: Task description

    (K)     Area for exercises: Show/hide solution

    ( L)     Area for exercises: Output of the sample solution

Note:    Value output of the graphics  $($both 2D and 3D$)$  via mouse control.


About the Authors


This interactive calculation tool was designed and implemented at the  Institute for Communications Engineering  at the  Technical University of Munich.

  • The first version was created in 2003 by  Ji Li   as part of his diploma thesis with “FlashMX – Actionscript” (Supervisor: Günter Söder).
  • In 2019 the program was redesigned by  Carolin Mirschina  as part of her bachelor thesis  (Supervisor: Tasnád Kernetzky ) via "HTML5".
  • Last revision and English version 2021 by  Carolin Mirschina  in the context of a working student activity. 


The conversion of this applet to HTML 5 was financially supported by  "Studienzuschüsse"  (Faculty EI of the TU Munich).  We thank.


Once again: Open Applet in new Tab

Open Applet in new Tab   Deutsche Version Öffnen