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

From LNTwww
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{LntAppletLinkEnDe|gauss_en|gauss}}
 
{{LntAppletLinkEnDe|gauss_en|gauss}}
 
  
 
==Applet Description==
 
==Applet Description==
 
<br>
 
<br>
Das Applet verdeutlicht die Eigenschaften zweidimensionaler Gaußscher Zufallsgrößen&nbsp; $XY\hspace{-0.1cm}$, gekennzeichnet 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$.
 +
 
 +
The applet shows
 +
* 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,
 +
* 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 zeigt
+
The applet uses the framework &nbsp;[https://en.wikipedia.org/wiki/Plotly "Plot.ly"]
* 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 dreidimensionaler Darstellung sowie in Form von Höhenlinien,
 
* die zugehörige Randwahrscheinlichkeitsdichtefunktion&nbsp; &rArr; &nbsp;  $\rm 1D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; $f_{X}(x)$&nbsp;  der Zufallsgröße&nbsp; $X$&nbsp; als blaue Kurve;  ebenso&nbsp; $f_{Y}(y)$&nbsp; für die zweite Zufallsgröße,
 
* 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,
 
* die Verteilungsfunktion&nbsp; &rArr; &nbsp; $\rm 1D\hspace{-0.1cm}-\hspace{-0.1cm}VTF$&nbsp; $F_{X}(x)$&nbsp; der Zufallsgröße&nbsp; $X$;  ebenso&nbsp; $F_{Y}(y)$&nbsp; als rote Kurve.
 
  
 +
==Theoretical Background==
 +
<br> 
  
Das Applet verwendet das Framework &nbsp;[https://en.wikipedia.org/wiki/Plotly Plot.ly]
+
===Joint probability density function &nbsp; &rArr; &nbsp; 2D&ndash;PDF===
 
 
====Theoretical Background====
 
<br>
 
===Verbundwahrscheinlichkeitsdichtefunktion &nbsp; &rArr; &nbsp; 2D&ndash;WDF===
 
  
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; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}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 [[Theory_of_Stochastic_Signals/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; und&nbsp; $m_Y = 0$&nbsp; sowie dem 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:Sto_App_Bild2.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:Sto_App_Bild1a.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:Sto_App_Bild3.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; [[Theory_of_Stochastic_Signals/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; [[Theory_of_Stochastic_Signals/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 &bdquo;2D&ndash;WDF&rdquo; und &bdquo;2D&ndash;VTF&rdquo; 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:  
+
*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 &bdquo;2D-VTF&rdquo; 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>
  
Line 151: Line 151:
 
<br>
 
<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.
 
*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)}$.
 +
 +
 +
{{BlueBox|TEXT=
 +
'''(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$.}}
 +
 +
*&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$.
  
*A task description is displayed.&nbsp; Parameter values are adjusted.&nbsp; Solution after pressing "Sample solution".&nbsp;
 
  
*In the task description, we sometimes use &nbsp;$\rho$&nbsp; instead of &nbsp;$\rho_{XY}$.
+
{{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}}
  
*For the one-dimensional probability density function&nbsp; $\text{(1D&ndash;PDF)}$&nbsp; 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)}$.  
+
*&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.
 +
*&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.
  
  
'''Deutsch'''
+
{{BlueBox|TEXT=
*Wählen Sie die Nummer&nbsp; $(1,\ 2$, ... $)$&nbsp; der zu bearbeitenden Aufgabe.&nbsp; Die Nummer&nbsp; &bdquo;0&rdquo; entspricht einem &bdquo;Reset&rdquo;:&nbsp; Einstellung wie beim Programmstart.
+
'''(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.}}
  
*Eine Aufgabenbeschreibung wird angezeigt.&nbsp; Die Parameterwerte sind angepasst.&nbsp; Lösung nach Drücken von &bdquo;Musterlösung&rdquo;.&nbsp;
+
*&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.
*Bei der Aufgabenbeschreibung verwenden wir teilweise &nbsp;$\rho$&nbsp; anstelle von &nbsp;$\rho_{XY}$.
 
  
*Für die eindimensionale Wahrscheinlichkeitsdichtefunktion&nbsp; $\text{(1D&ndash;WDF)}$&nbsp; gilt:&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)}$.
 
  
 +
{{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}}
  
{{BlaueBox|TEXT=
+
*&nbsp;Due to rotational symmetry, same results as in&nbsp; $(3)$.
'''(1)'''&nbsp; Machen Sie sich anhand der Voreinstellung &nbsp;$(\sigma_X=1, \ \sigma_Y=0.5, \ \rho = 0.7)$&nbsp; mit dem Programm vertraut. Interpretieren Sie die Grafiken für &nbsp;$\rm WDF$&nbsp; und&nbsp; $\rm VTF$.}}
 
  
::*&nbsp;$\rm WDF$&nbsp; ist ein Bergrücken mit dem Maximum bei&nbsp; $x = 0, \ y = 0$. Der Bergkamm ist leicht verdreht gegenüber der &nbsp;$x$&ndash;Achse.
 
::*&nbsp;$\rm VTF$&nbsp; ergibt sich aus &nbsp;$\rm WDF$&nbsp; durch fortlaufende Integration in beide Richtungen. Das Maximum $($nahezu &nbsp;$1)$&nbsp; tritt bei &nbsp;$x=3, \ y=3$&nbsp; auf. 
 
  
{{BlaueBox|TEXT=
+
{{BlueBox|TEXT=
'''(2)'''&nbsp; Nun lautet die Einstellung &nbsp;$\sigma_X= \sigma_Y=1, \ \rho = 0$. Welche Werte ergeben sich für &nbsp;$f_{XY}(0,\ 0)$&nbsp; und &nbsp;$F_{XY}(0,\ 0)$? Interpretieren Sie die Ergebnisse.}}
+
'''(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$.}}
  
::*&nbsp;Das WDF&ndash;Maximum ist&nbsp; $f_{XY}(0,\ 0) = 1/(2\pi)= 0.1592$, wegen &nbsp;$\sigma_X= \sigma_Y = 1, \ \rho = 0$. Die Höhenlinien sind Kreise.
+
*&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$.
::*&nbsp;Für den VTF-Wert gilt:&nbsp; $F_{XY}(0,\ 0) = [{\rm Pr}(X \le 0)] \cdot [{\rm Pr}(Y \le 0)] = 0.25$. Geringfügige Abweichung wegen numerischer Integration.
+
*&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.
  
{{BlaueBox|TEXT=
 
'''(3)'''&nbsp; Es gelten weiter die Einstellungen von '''(2)'''. Welche Werte ergeben sich für &nbsp;$f_{XY}(0,\ 1)$&nbsp; und &nbsp;$F_{XY}(0,\ 1)$? Interpretieren Sie die Ergebnisse.}}
 
  
::*&nbsp;Es gilt&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$.
+
{{BlueBox|TEXT=
::*&nbsp;Das Programm liefert&nbsp; $F_{XY}(0,\ 1) = [{\rm Pr}(X \le 0)] \cdot [{\rm Pr}(Y \le 1)] = 0.4187$, also einen größeren Wert als in '''(2)''', da weiter integriert wird.
+
'''(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.
'''(4)'''&nbsp; Die Einstellungen bleiben erhalten. Welche Werte ergeben sich für &nbsp;$f_{XY}(1,\ 0)$&nbsp; und &nbsp;$F_{XY}(1,\ 0)$? Interpretieren Sie die Ergebnisse.}}
 
  
::*&nbsp;Aufgrund der Rotationssysmmetrie gleiche Ergebnisse wie in '''(3)'''.
 
  
{{BlaueBox|TEXT=
+
{{BlueBox|TEXT=
'''(5)'''&nbsp; Stimmt die Aussage:&nbsp;&bdquo;Elliptische Höhenlinien gibt es nur für &nbsp;$\rho \ne 0$&rdquo;. Interpretieren Sie die&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; und $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}VTF$&nbsp; für &nbsp;$\sigma_X=1, \ \sigma_Y=0.5$&nbsp; und&nbsp; $\rho = 0$.}}
+
'''(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)$?}}
  
::*&nbsp;Nein! Auch für&nbsp; $\ \rho = 0$&nbsp; sind die Höhenlinien elliptisch (nicht kreisförmig), falls &nbsp;$\sigma_X \ne \sigma_Y$.
+
*&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$.
::*&nbsp;Für&nbsp;$\sigma_X \gg \sigma_Y$&nbsp; hat die&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; die Form eines langgestreckten Bergkamms parallel zur&nbsp; $x$&ndash;Achse, für&nbsp;$\sigma_X \ll \sigma_Y$&nbsp; parallel zur&nbsp; $y$&ndash;Achse.
 
::*&nbsp;Für&nbsp;$\sigma_X \gg \sigma_Y$&nbsp; ist der Anstieg der&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}VTF$&nbsp; in Richtung der &nbsp;$y$&ndash;Achse deutlich steiler als in Richtung der &nbsp;$x$&ndash;Achse.
 
  
{{BlaueBox|TEXT=
 
'''(6)'''&nbsp; Variieren Sie ausgehend von&nbsp; $\sigma_X=\sigma_Y=1, \ \rho = 0.7$&nbsp; den Korrelationskoeffizienten&nbsp; $\rho$. Wie groß ist der Neigungswinkel &nbsp;$\alpha$&nbsp; der Ellipsen&ndash;Hauptachse?}}
 
  
::*&nbsp;Für&nbsp; $\rho > 0$&nbsp; ist &nbsp;$\alpha = 45^\circ$&nbsp; und für&nbsp; $\rho < 0$&nbsp; ist &nbsp;$\alpha = -45^\circ$. Für&nbsp; $\rho = 0$&nbsp; sind die Höhenlinien kreisfömig und somit gibt es auch keine Ellipsen&ndash;Hauptachse.
+
{{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$?}}
  
{{BlaueBox|TEXT=
+
*&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'''.
'''(7)'''&nbsp; Variieren Sie ausgehend von&nbsp; $\sigma_X=\sigma_Y=1, \ \rho = 0.7$&nbsp; den Korrelationskoeffizienten&nbsp; $\rho > 0$. Wie groß ist der Neigungswinkel &nbsp;$\theta$&nbsp; der Korrelationsgeraden&nbsp; $K(x)$?}}
 
  
::*&nbsp;Für&nbsp; $\sigma_X=\sigma_Y$&nbsp; ist &nbsp;$\theta={\rm arctan}\ (\rho)$. Die Steigung nimmt mit wachsendem&nbsp; $\rho > 0$&nbsp; zu. In allen Fällen gilt  &nbsp;$\theta < \alpha = 45^\circ$. Für&nbsp; $\rho = 0.7$&nbsp; ergibt sich &nbsp;$\theta = 35^\circ$.
 
  
{{BlaueBox|TEXT=
+
{{BlueBox|TEXT=
'''(8)'''&nbsp; Variieren Sie ausgehend von&nbsp; $\sigma_X=\sigma_Y=0.75, \ \rho = 0.7$&nbsp; die Parameter&nbsp; $\sigma_Y$&nbsp; und&nbsp; $\rho \ (>0)$. Welche Aussagen gelten für die Winkel &nbsp;$\alpha$&nbsp; und&nbsp; $\theta$?}}
+
'''(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;Für&nbsp; $\sigma_Y<\sigma_X$&nbsp; ist &nbsp;$\alpha < 45^\circ$&nbsp; und für&nbsp; $\sigma_Y>\sigma_X$&nbsp; dagegen &nbsp;$\alpha > 45^\circ$.
+
*&nbsp;The correlation line intersects all contour lines at that points where the tangent line is perpendicular to the contour line.
::*&nbsp;Bei allen Einstellungen gilt:&nbsp;  '''Die Korrelationsgerade liegt unter der Ellipsen&ndash;Hauptachse'''.
 
  
{{BlaueBox|TEXT=
 
'''(9)'''&nbsp; Gehen Sie von&nbsp; $\sigma_X= 1, \ \sigma_Y=0.75, \ \rho = 0.7$&nbsp; aus und variieren Sie&nbsp; $\rho$. Wie könnte man die Korrelationsgerade aus den Höhenlinien konstruieren?}}
 
  
::*&nbsp;Die Korrelationsgerade schneidet alle Höhenlinien an den Punkten, an denen die Tangente zu der Höhenlinie senkrecht verläuft.
+
{{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;?}}
  
{{BlaueBox|TEXT=
+
*&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$.
'''(10)'''&nbsp; Nun gelte&nbsp; $\sigma_X=  \sigma_Y=1, \ \rho = 0.95$. Interpretieren Sie die&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$. Welche Aussagen würden für den Grenzfall&nbsp; $\rho \to 1$&nbsp; zutreffen?}}
+
*&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.
  
::*&nbsp;Die&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; hat nur Anteile in der Nähe der Ellipsen&ndash;Hauptachse. Die Korrelationsgerade liegt nur knapp darunter:&nbsp; $\alpha = 45^\circ, \ \theta = 43.5^\circ$.
+
::*&nbsp;Im Grenzfall&nbsp; $\rho \to 1$&nbsp; wäre&nbsp; $\theta = \alpha = 45^\circ$. Außerhalb der Korrelationsgeraden hätte die&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}WDF$&nbsp; keine Anteile. Das heißt:
 
::*&nbsp;Längs der Korrelationsgeraden ergäbe sich eine '''Diracwand'''&nbsp; &rArr; &nbsp; Alle Werte sind unendlich groß, trotzdem um den Mittelwert gaußisch gewichtet.
 
  
  
Line 234: Line 231:
 
==Applet Manual==
 
==Applet Manual==
 
<br>
 
<br>
[[File:Anleitung_2D-Gauss.png|left|600px]]
+
[[File:Anleitung_2D-Gauss.png|left|500px|frame|Screen shot from the German version]]
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Parametereingabe per Slider:&nbsp; $\sigma_X$, &nbsp;$\sigma_Y$ und&nbsp; $\rho$  
+
<br><br>
 +
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Parameter input via slider:&nbsp; $\sigma_X$, &nbsp;$\sigma_Y$ and&nbsp; $\rho$.
  
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Auswahl:&nbsp; Darstellung von WDF oder VTF
+
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Selection:&nbsp; Representation of PDF or CDF.
  
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Reset:&nbsp; Einstellung wie beim Programmstart
+
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Reset:&nbsp; Setting as at program start.
  
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Höhenlinien darstellen anstelle von &bdquo;1D-WDF&rdquo;
+
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Display contour lines instead of one-dimensional PDF.
  
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Darstellungsbereich für &bdquo;2D-WDF&rdquo;
+
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Display range for two-dimensional PDF.
  
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Manipulation der 3D-Grafik (Zoom, Drehen, ...)
+
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Manipulation of the three-dimensional graph (zoom, rotate, ...)
  
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Darstellungsbereich für &bdquo;1D-WDF&rdquo; bzw. &bdquo;Höhenlinien&rdquo;
+
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Display range for&nbsp; "one-dimensional PDF"&nbsp; or&nbsp; "contour lines".
  
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Manipulation der 2D-Grafik (&bdquo;1D-WDF&rdquo;)
+
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Manipulation of the two-dimensional graphics ("one-dimensional PDF")
  
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Bereich für die Versuchsdurchführung:   Aufgabenauswahl  
+
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Area for exercises: Task selection.  
  
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Bereich für die Versuchsdurchführung:   Aufgabenstellung
+
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Area for exercises: Task description
  
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Bereich für die Versuchsdurchführung:   Musterlösung einblenden
+
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Area for exercises: Show/hide solution
  
&nbsp; &nbsp; '''( L)''' &nbsp; &nbsp; Bereich für die Versuchsdurchführung:   Musterlösung
+
&nbsp; &nbsp; '''( L)''' &nbsp; &nbsp; Area for exercises: Output of the sample solution
<br><br><br><br><br><br><br><br>
+
 
Werte&ndash;Ausgabe über Maussteuerung (sowohl bei 2D als auch bei 3D)
+
<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>
 +
  
  
 
==About the Authors==
 
==About the Authors==
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.  
+
<br>
*Die erste Version wurde 2003 von [[Biographies_and_Bibliographies/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: [[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]]).  
+
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].  
* 2019 wurde das Programm  von&nbsp;[[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]]&nbsp; im Rahmen einer Werkstudententätigkeit auf  &bdquo;HTML5&rdquo; umgesetzt und neu gestaltet (Betreuer: [[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]]).
+
*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.
  
Die Umsetzung dieses Applets auf HTML 5 wurde durch&nbsp; [https://www.ei.tum.de/studium/studienzuschuesse/ Studienzuschüsse]&nbsp; der Fakultät EI der TU München finanziell unterstützt. Wir bedanken uns.
 
  
  

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