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

From LNTwww
 
(44 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{LntAppletLink|verteilungen}}  
+
{{LntAppletLinkEnDe|gauss_en|gauss}}
  
==Programmbeschreibung==
+
==Applet Description==
 
<br>
 
<br>
Dieses Applet ermöglicht die Berechnung und graphische Darstellung
+
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$.
*der Wahrscheinlichkeiten ${\rm Pr}(z=\mu)$ einer diskreten Zufallsgröße $z \in \{\mu \} =  \{0, 1, 2, 3, \text{...} \}$, welche die ''Wahrscheinlichkeitsdichtefunktion'' (WDF) &ndash; im Englischen ''Probability Density Function'' (PDF) &ndash; der Zufallsgröße $z$ bestimmen &ndash; hier Darstellung mit Diracfunktionen ${\rm \delta}( z-\mu)$:
 
:$$f_{z}(z)=\sum_{\mu=1}^{M}{\rm Pr}(z=\mu)\cdot {\rm \delta}( z-\mu),$$
 
*der Wahrscheinlichkeiten ${\rm Pr}(z \le \mu)$ der Verteilungsfunktion (VTF)  &ndash; im Englischen ''Cumulative Distribution Function'' (CDF):
 
:$$F_{z}(\mu)={\rm Pr}(z\le\mu).$$
 
  
 +
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.
  
Als diskrete Verteilungen stehen in zwei Parametersätzen zur Auswahl:
 
* die Binomialverteilung mit den Parametern $I$ und $p$ &nbsp; &rArr; &nbsp; $z \in  \{0, 1, \text{...} \ , I \}$ &nbsp; &rArr; &nbsp; $M = I+1$ mögliche Werte,
 
*die Poissonverteilung mit Parameter $\lambda$ &nbsp; &rArr; &nbsp; $z \in  \{0, 1, 2, 3, \text{...}\}$ &nbsp; &rArr; &nbsp; $M \to \infty$.
 
  
 +
The applet uses the framework &nbsp;[https://en.wikipedia.org/wiki/Plotly "Plot.ly"]
  
In der Versuchsdurchführung sollen Sie miteinander vergleichen:
+
==Theoretical Background==
* je zwei Binomialverteilungen mit unterschiedlichen Parameterwerten $I$ und $p$,
+
<br> 
* je zwei Poissonverteilungen mit unterschiedlicher Rate $\lambda$,
 
*jeweils eine Binomial&ndash; und eine Poissonverteilung.
 
  
 +
===Joint probability density function &nbsp; &rArr; &nbsp; 2D&ndash;PDF===
  
==Theoretischer Hintergrund==
+
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:  
<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:  
 
  
 
{{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)$&nbsp;
+
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.
<br><br>
 
  
===2D&ndash;WDF bei Gaußschen Zufallsgrößen===
 
  
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:
+
As a quantitative measure of the linear statistical bindings&nbsp; &rArr; &nbsp; '''correlation'''&nbsp; one uses.
*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&nbsp; '''covariance'''&nbsp; $\mu_{XY}$, which is equal to the first-order common linear moment for mean-free components:
:$$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.$$
+
:$$\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 ,$$
*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.
+
*the&nbsp; '''correlation coefficient'''&nbsp; after normalization to the two rms values &nbsp;$σ_X$&nbsp; and&nbsp;$σ_Y$&nbsp; of the two components:  
*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$.
+
:$$\rho_{XY}=\frac{\mu_{XY} }{\sigma_X \cdot \sigma_Y}.$$
*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:  
 
:$$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{Properties of correlation coefficient:}$&nbsp;  
:$$f_{XY}(x,y)= f_{X}(x) \cdot f_{Y}(y) . $$
+
*Because of normalization, $-1 \le ρ_{XY} ≤ +1$ always holds&nbsp;.
 +
*If the two random variables &nbsp;$X$&nbsp; and &nbsp;$Y$ are uncorrelated, then &nbsp;$ρ_{XY} = 0$.
 +
*For strict linear dependence between &nbsp;$X$&nbsp; and &nbsp;$Y$, &nbsp;$ρ_{XY}= ±1$ &nbsp; &rArr; &nbsp; complete correlation.
 +
*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.  
 +
*In contrast, a negative correlation coefficient expresses that &nbsp;$Y$&nbsp; becomes smaller on average as &nbsp;$X$&nbsp; increases}}. 
 +
<br><br>
  
Bitte beachten Sie:
+
===2D&ndash;PDF for Gaussian random variables===
*Bei keiner anderen WDF kann aus der&nbsp; ''Unkorreliertheit''&nbsp; auf die&nbsp; ''statistische Unabhängigkeit''&nbsp; geschlossen werden.
 
*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:
 
*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. }}
 
  
 +
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:
 +
*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 with}\hspace{0.5cm}-1 \le \rho \le +1.$$
 +
*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.
 +
*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.
 +
*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 ) .$$
  
 +
{{BlaueBox|TEXT= 
 +
$\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) . $$
  
 +
Please note:
 +
*For no other PDF can the&nbsp; ''uncorrelatedness''&nbsp; be used to infer&nbsp; ''statistical independence''&nbsp; .
 +
*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:
 +
*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>
 +
===Contour lines for uncorrelated random variables===
  
===Höhenlinien bei unkorrelierten Zufallsgrößen===
+
[[File:Sto_App_Bild2.png |frame| Contour lines of 2D-PDF with uncorrelated variables | right]]
 +
From the conditional equation&nbsp; $f_{XY}(x, y) = {\rm const.}$&nbsp; the contour lines of the PDF can be calculated.
  
[[File:P_ID318__Sto_T_4_2_S2_ganz_neu.png |frame| Höhenlinien der 2D-WDF bei unkorrelierten Größen | rechts]]
+
If the components&nbsp; $X$&nbsp; and&nbsp; $Y$ are uncorrelated&nbsp; $(ρ_{XY} = 0)$, the equation obtained for the contour lines is:  
Aus der Bedingungsgleichung&nbsp; $f_{XY}(x, y) = {\rm const.}$&nbsp; können die Höhenlinien der WDF berechnet werden.
 
 
 
Sind die Komponenten&nbsp; $X$&nbsp; und&nbsp; $Y$ unkorreliert&nbsp; $(ρ = 0)$, so erhält man als Gleichung für die Höhenlinien:  
 
  
 
:$$\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>
===Höhenlinien bei korrelierten Zufallsgrößen===
+
===Regression line===
  
Bei korrelierten Komponenten&nbsp; $(ρ ≠ 0)$&nbsp; sind die Höhenlinien der WDF (fast) immer elliptisch, also auch für den Sonderfall&nbsp; $σ_X = σ_Y$. Ausnahme:&nbsp; $(ρ=\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)'''.
+
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_ID408__Sto_T_4_2_S3_neu.png|right|frame|Höhenlinien der 2D-WDF bei korrelierten Größen]]
+
[[File:Sto_App_Bild1a.png|frame| Gaussian 2D PDF (approximation with $N$ measurement points) and <br>correlation line &nbsp;$y = K(x)$]]
Hier lautet die Bestimmungsgleichung der WDF-Höhenlinien:
 
  
:$$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\cdot\frac{x\cdot y}{\sigma_X\cdot \sigma_Y}={\rm const.}$$
+
*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:
Die Grafik zeigt in hellerem Blau zwei Höhenlinien für unterschiedliche Parametersätze, jeweils mit&nbsp; $ρ ≠ 0$.
+
:$$\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.$$
  
*Die Ellipsenhauptachse ist dunkelblau gestrichelt.
+
*The angle that the correlation line makes to the &nbsp;$x$&ndash;axis is:
*Die&nbsp; [[Stochastische_Signaltheorie/Zweidimensionale_Zufallsgrößen#Korrelationsgerade|Korrelationsgerade]]&nbsp; $K(x)$&nbsp; ist durchgehend rot eingezeichnet.
+
:$$\theta={\rm arctan}(\frac{\sigma_{Y} }{\sigma_{X} }\cdot \rho_{XY}).$$
  
  
Anhand dieser Darstellung sind folgende Aussagen möglich:
 
*Die Ellipsenform hängt außer vom Korrelationskoeffizienten&nbsp; $ρ$&nbsp; auch vom Verhältnis der beiden Streuungen&nbsp; $σ_X$&nbsp; und&nbsp; $σ_Y$&nbsp; ab. 
 
*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; $ρ$&nbsp; ab:
 
:$$\alpha = {1}/{2} \cdot {\rm arctan } \big ( 2 \cdot \rho \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.
 
* $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. 
 
  
===Zweidimensionale Verteilungsfunktion &nbsp; &rArr; &nbsp; 2D&ndash;VTF===
+
===Contour lines for correlated random variables===
  
{{BlaueBox|TEXT= 
+
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$.  
$\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):
 
:$$F_{XY}(x,y) = {\rm Pr}\big [(X \le x) \cap (Y \le y) \big ]  .$$}}
 
  
 +
<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|height lines of the two dimensional PDF with correlated quantities]]
 +
Here, the determining equation of the PDF height lines is:
  
Es ergeben sich folgende Gemeinsamkeiten und Unterschiede zwischen der 1D-VTF und der 2D-VTF:
+
:$$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.}$$
*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 graph shows a contour line in lighter blue for each of two different sets of parameters.
:$$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?'''
 
:$$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:
 
:$$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.$$
 
*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:
 
:$$\int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}x \,\,{\rm d}y=1  .  $$
 
  
{{BlaueBox|TEXT= 
+
*The ellipse major axis is dashed in dark blue.
$\text{Fazit:}$&nbsp; Beachten Sie den signifikanten Unterschied zwischen eindimensionalen und zweidimensionalen Zufallsgrößen:
+
*The&nbsp; [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Regression_line|"regression line"]]&nbsp; $K(x)$&nbsp; is drawn in red throughout.  
*Bei eindimensionalen Zufallsgrößen ergibt die Fläche unter der WDF stets den Wert $1$.
 
*Bei zweidimensionalen Zufallsgrößen ist das WDF-Volumen immer gleich $1$.}}
 
  
==Vorläufiges ENDE==
 
 
[[File:P_ID630__Sto_T_4_2_S1_neu.png |right|frame| Gaußsche 2D-WDF und 2D-VTF]]
 
{{GraueBox|TEXT= 
 
$\text{Beispiel 1:}$&nbsp; Die beiden Grafiken zeigen
 
*die Wahrscheinlichkeitsdichtefunktion (links) und
 
*Verteilungsfunktion (rechts)
 
 
 
einer zweidimensionalen Gaußschen Zufallsgröße $(x, y)$ mit relativ starker positiver Korrelation der Einzelkomponenten: &nbsp; $ρ_{xy} = 0.8$.
 
 
Wie bei den bisherigen Beispielen ist auch hier die 2D–Zufallsgröße in $x$–Richtung weiter ausgedehnt als in $y$–Richtung: &nbsp;  $σ_x = 2 · σ_y$.
 
<br clear=all>
 
Diese Darstellungen können wie folgt interpretiert werden:
 
*Die WDF ist vergleichbar mit einem Bergkamm, der sich von links unten nach rechts oben erstreckt.
 
*Das Maximum liegt bei $m_x = 0$ und $m_y = 0$. Das bedeutet, dass die die 2D–Zufallsgröße mittelwertfrei ist.
 
*Die 2D–VTF als das Integral in zwei Richtungen über die 2D–WDF steigt von links unten nach rechts oben von $0$ auf $1$ kontinuierlich an. }}
 
  
 
+
Based on this plot, the following statements are possible:
Das interaktive Applet  [[Applets:2D_Gauss|WDF und VTF bei Gaußschen 2D-Zufallsgrößen]] erlaubt die Darstellung der zweidimensionalen Funktionen für beliebige Werte von $σ_x, \ σ_y$ und $ρ_{xy}$.
+
*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; .
 
+
*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; :  
==WDF und VTF bei statistisch unabhängigen Komponenten==
+
:$$\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 ).$$
<br>
+
*The (red) correlation line&nbsp; $y = K(x)$&nbsp; of a Gaussian 2D-random variable always lies below the (blue dashed) ellipse major axis.  
Bei statistisch unabhängigen Komponenten $x$ und $y$ gilt für die Verbundwahrscheinlichkeit nach den elementaren Gesetzmäßigkeiten der Statistik, falls $x$ und $y$ wertkontinuierlich sind:  
+
* $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. 
:$${\rm Pr} \big[(x_{\rm 1}\le x \le x_{\rm 2}) \cap( y_{\rm 1}\le y\le y_{\rm 2})\big] ={\rm Pr} (x_{\rm 1}\le x \le x_{\rm 2}) \cdot {\rm Pr}(y_{\rm 1}\le y\le y_{\rm 2}) .$$
+
<br><br>
Hierfür kann bei unabhängigen Komponenten auch geschrieben werden:
+
===Two dimensional cumulative distribution function &nbsp; &rArr; &nbsp; 2D&ndash;CDF===
:$${\rm Pr} \big[(x_{\rm 1}\le x \le x_{\rm 2}) \cap(y_{\rm 1}\le y\le y_{\rm 2})\big] =\int _{x_{\rm 1}}^{x_{\rm 2}}f_{x}(x) \,{\rm d}x\cdot \int_{y_{\rm 1}}^{y_{\rm 2}} f_{y}(y) \, {\rm d}y.$$
 
  
 
{{BlaueBox|TEXT=   
 
{{BlaueBox|TEXT=   
$\text{Definition:}$&nbsp; Daraus folgt, dass bei '''statistischer Unabhängigkeit''' folgende Bedingung bezüglich der 2D&ndash;WDF erfüllt sein muss:  
+
$\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)=f_{x}(x) \cdot f_y(y) .$$}}
+
:$$F_{XY}(x,y) = {\rm Pr}\big [(X \le x) \cap (Y \le y) \big ] .$$}}
  
  
{{GraueBox|TEXT= 
+
The following similarities and differences between the "1D&ndash;CDF" and the" 2D&ndash;CDF" emerge:
$\text{Beispiel 2:}$&nbsp; In der Grafik sind die Momentanwerte einer zweidimensionalen Zufallsgröße als Punkte in der $(x, y)$-Ebene eingetragen.  
+
*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:
*Bereiche mit vielen Punkten, die dementsprechend dunkel wirken, kennzeichnen große Werte der WDF $f_{xy}(x, y)$.  
+
:$$F_{XY}(x,y)=\int_{-\infty}^{y} \int_{-\infty}^{x} f_{XY}(\xi,\eta) \,\,{\rm d}\xi \,\, {\rm d}\eta .$$
*Dagegen besitzt die Zufallsgröße $(x, y)$ in eher hellen Bereichen nur verhältnismäßig wenig Anteile.
+
*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.}.$$
 +
*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,\ y)=F_{Y}(y ) ,\hspace{0.5cm}F_{XY}(+\infty,\ +\infty) = 1.$$
 +
*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 . $$
  
 +
{{BlaueBox|TEXT=
 +
$\text{Conclusion:}$&nbsp; 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$.}}
 +
<br><br>
  
[[File:P_ID153__Sto_T_4_1_S4_nochmals_neu.png |frame| Statistisch unabhängige Komponenten: &nbsp; $f_{xy}(x,y)$, $f_{x}(x)$, $f_{y}(y)$]]
+
==Exercises==
 
 
Die Grafik kann wie folgt interpretiert werden:
 
*Die Randwahrscheinlichkeitsdichten $f_{x}(x)$ und $f_{y}(y)$ lassen bereits erkennen, dass sowohl $x$ als auch $y$ gaußähnlich und mittelwertfrei sind, und dass die Zufallsgröße $x$ eine größere Streuung als $y$ aufweist.
 
*$f_{x}(x)$ und $f_{y}(y)$ liefern jedoch keine Informationen darüber, ob bei der Zufallsgröße $(x, y)$ statistische Bindungen bestehen oder nicht.
 
*Anhand der 2D-WDF $f_{xy}(x,y)$ erkennt man aber, dass es hier zwischen den beiden Komponenten $x$ und $y$ keine statistischen Bindungen gibt.
 
*Bei statistischer Unabhängigkeit liefert jeder Schnitt durch $f_{xy}(x, y)$ parallel zur $y$-Achse eine Funktion, die formgleich mit der Rand&ndash;WDF $f_{y}(y)$ ist.
 
*Ebenso sind alle Schnitte parallel zur $x$-Achse formgleich mit $f_{x}(x)$.
 
<br clear=all>
 
Diese Tatsache ist gleichbedeutend mit der Aussage, dass in diesem Beispiel die 2D-WDF $f_{xy}(x, y)$ als Produkt der beiden Randwahrscheinlichkeitsdichten dargestellt werden kann: &nbsp; $f_{xy}(x,y)=f_{x}(x) \cdot f_y(y) .$}}
 
 
 
==WDF und VTF bei statistisch abhängigen Komponenten==
 
 
<br>
 
<br>
Bestehen statistische Bindungen zwischen den Komponenten $x$ und $y$, so liefern unterschiedliche Schnitte parallel zur $x$&ndash; bzw. $y$&ndash;Achse jeweils unterschiedliche, nicht formgleiche Funktionen.  
+
*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 diesem Fall lässt sich die Verbund&ndash;WDF natürlich auch nicht als Produkt der beiden (eindimensionalen) Randwahrscheinlichkeitsdichten beschreiben.
+
*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:P_ID156__Sto_T_4_1_S5_neu.png |right|frame|Statistisch abhängige Komponenten: &nbsp; $f_{xy}(x,y)$, $f_{x}(x)$, $f_{y}(y)$ ]]
 
{{GraueBox|TEXT= 
 
$\text{Beispiel 3:}$&nbsp; Die Grafik zeigt die Momentanwerte einer zweidimensionalen Zufallsgröße in der $(x,  y)$&ndash;Ebene, wobei nun im Gegensatz zum $\text{Beispiel 2}$ zwischen $x$ und $y$ statistische Bindungen bestehen.
 
*Die 2D&ndash;Zufallsgröße nimmt im blau eingezeichneten Parallelogramm alle Werte mit gleicher Wahrscheinlichkeit an.
 
*Außerhalb sind keine Werte möglich.  
 
 
 
  
Man erkennt aus dieser Darstellung:
 
*Die Integration über $f_{xy}(x, y)$ parallel zu der $x$&ndash;Achse führt zur dreieckförmigen Randdichte $f_{y}(y)$, die Integration parallel zur $y$&ndash;Achse zur trapezförmigen WDF $f_{x}(x)$.
 
*Aus der 2D-WDF $f_{xy}(x, y)$ ist bereits zu erahnen, dass für jeden $x$&ndash;Wert im statistischen Mittel ein anderer $y$&ndash;Wert zu erwarten ist.
 
*Das bedeutet aber, dass hier die Komponenten $x$ und $y$ statistisch voneinander abhängen. }}
 
  
==Erwartungswerte zweidimensionaler Zufallsgrößen==
+
{{BlueBox|TEXT=
<br>
+
'''(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$.}}
Ein Sonderfall der statistischen Abhängigkeit ist die ''Korrelation''.  
 
  
{{BlaueBox|TEXT= 
+
*&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.
$\text{Definition:}$&nbsp; Unter '''Korrelation''' versteht man eine ''lineare Abhängigkeit''&nbsp; zwischen den Einzelkomponenten $x$ und $y$.  
+
*&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$.
*Korrelierte Zufallsgrößen sind damit stets auch statistisch abhängig.  
 
*Aber nicht jede statistische Abhängigkeit bedeutet gleichzeitig eine Korrelation.}}
 
  
  
Zur quantitativen Erfassung der Korrelation verwendet man verschiedene Erwartungswerte der 2D-Zufallsgröße $(x, y)$.
+
{{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}}
  
Diese sind analog  definiert zum eindimensionalen Fall 
+
*&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.
*gemäß [[Stochastische_Signaltheorie/Momente_einer_diskreten_Zufallsgröße|Kapitel 2]] (bei wertdiskreten Zufallsgrößen)  
+
*&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.
*bzw. [[Stochastische_Signaltheorie/Erwartungswerte_und_Momente|Kapitel 3]] (bei wertkontinuierlichen Zufallsgrößen):
 
 
  
{{BlaueBox|TEXT= 
 
$\text{Definition:}$&nbsp; Für die (nichtzentrierten) '''Momente''' gilt die Beziehung:
 
:$$m_{kl}={\rm E}\big[x^k\cdot y^l\big]=\int_{-\infty}^{+\infty}\hspace{0.2cm}\int_{-\infty}^{+\infty} x\hspace{0.05cm}^{k} \cdot y\hspace{0.05cm}^{l} \cdot f_{xy}(x,y) \, {\rm d}x\, {\rm d}y.$$
 
Die beiden linearen Mittelwerte sind somit $m_x = m_{10}$ und $m_y = m_{01}.$ }}
 
 
 
{{BlaueBox|TEXT= 
 
$\text{Definition:}$&nbsp; Die auf $m_x$ bzw. $m_y$ bezogenen '''Zentralmomente''' lauten:
 
:$$\mu_{kl} = {\rm E}\big[(x-m_{x})\hspace{0.05cm}^k \cdot (y-m_{y})\hspace{0.05cm}^l\big] .$$
 
In dieser allgemein gültigen Definitionsgleichung sind die Varianzen $σ_x^2$ und $σ_y^2$ der zwei Einzelkomponenten durch $\mu_{20}$ bzw. $\mu_{02}$ mit enthalten. }}
 
 
 
{{BlaueBox|TEXT= 
 
$\text{Definition:}$&nbsp; Besondere Bedeutung besitzt die  '''Kovarianz''' $(k = l = 1)$, die ein Maß für die ''lineare statistische Abhängigkeit'' zwischen den Zufallsgrößen $x$ und $y$ ist:
 
:$$\mu_{11} = {\rm E}\big[(x-m_{x})\cdot(y-m_{y})\big] = \int_{-\infty}^{+\infty} \int_{-\infty}^{+\infty} (x-m_{x}) (y-m_{y})\cdot f_{xy}(x,y) \,{\rm d}x \,  {\rm d}y .$$}}
 
 
 
Im Folgenden bezeichnen wir die Kovarianz $\mu_{11}$ teilweise auch mit $\mu_{xy}$, falls sich die Kovarianz auf die Zufallsgrößen $x$ und $y$ bezieht. Die Kovarianz hängt wie folgt mit dem nichtzentrierten Moment $m_{11} = m_{xy} = {\rm E}\big[x · y\big]$ zusammen:
 
:$$\mu_{xy} = m_{xy} -m_{x }\cdot m_{y}.$$
 
 
''Anmerkung:''
 
*Diese Gleichung ist für die numerische Auswertung enorm vorteilhaft, da $m_{xy}$, $m_x$ und $m_y$ aus den Folgen $〈x_v〉$ und $〈y_v〉$ in einem Durchlauf gefunden werden können.
 
*Würde man dagegen die Kovarianz $\mu_{xy}$ entsprechend der oberen Definitionsgleichung berechnen, so müsste man in einem ersten Durchlauf die Mittelwerte $m_x$ und $m_y$ ermitteln und dann in einem zweiten Durchlauf den Erwartungswert ${\rm E}\big[(x - m_x) · (y - m_y)\big]$.
 
 
 
{{GraueBox|TEXT= 
 
$\text{Beispiel 4:}$&nbsp; In den beiden ersten Zeilen der folgenden Tabelle sind die jeweils ersten Elemente zweier Zufallsfolgen $〈x_ν〉$ und $〈y_ν〉$ eingetragen. In der letzten Zeile sind die jeweiligen Produkte $x_ν · y_ν$ angegeben.
 
 
[[File:P_ID628__Sto_T_4_1_S6Neu.png |center|frame| Beispielhafte 2D-Erwartungswerte]]
 
 
Die Tabelle zeigt folgenden Sachverhalt: 
 
*Durch Mittelung über die jeweils zehn Folgenelemente erhält man $m_x =0.5$, $m_y = 1$ und $m_{xy} = 0.69$.
 
*Daraus ergibt sich die Kovarianz zu $\mu_{xy} = 0.69 - 0.5 · 1 = 0.19.$
 
*Ohne Kenntnis der Gleichung $\mu_{xy} = m_{xy} - m_x · m_y$ hätte man zunächst im ersten Durchlauf die Mittelwerte $m_x$ und $m_y$ ermitteln müssen, um im zweiten Durchlauf die Kovarianz $\mu_{xy}$ als Erwartungswert des Produkts der mittelwertfreien Größen bestimmen zu können.}}
 
 
==Korrelationskoeffizient==
 
<br>
 
Bei statististischer Unabhängigkeit der beiden Komponenten $x$ und $y$ ist die Kovarianz $\mu_{xy} \equiv 0$. Dieser Fall wurde bereits im $\text{Beispiel 2}$ auf der Seite [[Stochastische_Signaltheorie/Zweidimensionale_Zufallsgrößen#WDF_und_VTF_bei_statistisch_unabh.C3.A4ngigen_Komponenten|WDF und VTF bei statistisch unabhängigen Komponenten]] betrachtet.
 
 
*Das Ergebnis $\mu_{xy} = 0$ ist aber auch bei statistisch abhängigen Komponenten $x$ und $y$ möglich, nämlich dann, wenn diese unkorreliert, also    ''linear unabhängig'' sind.
 
*Die  statistische Abhängigkeit ist dann nicht von erster, sondern von höherer Ordnung, zum Beispiel entsprechend der Gleichung $y=x^2.$
 
 
 
Man spricht von &bdquo;vollständiger Korrelation&rdquo;, wenn die (deterministische) Abhängigkeit zwischen $x$ und  $y$  durch die Gleichung $y = K · x$ ausgedrückt wird. Dann ergibt sich  für die Kovarianz:
 
* $\mu_{xy} = σ_x · σ_y$ bei positivem Wert von $K$,
 
* $\mu_{xy} = - σ_x · σ_y$ bei negativem $K$&ndash;Wert. 
 
 
 
Deshalb verwendet man häufig als Beschreibungsgröße anstelle der Kovarianz den so genannten Korrelationskoeffizienten.
 
 
{{BlaueBox|TEXT= 
 
$\text{Definition:}$&nbsp; Der '''Korrelationskoeffizient''' ist der Quoient aus Kovarianz $\mu_{xy}$ und dem Produkt der Effektivwerte $σ_x$ und $σ_y$ der beiden Komponenten:
 
:$$\rho_{xy}=\frac{\mu_{xy} }{\sigma_x \cdot \sigma_y}.$$}}
 
 
 
Der Korrelationskoeffizient $\rho_{xy}$ weist folgende Eigenschaften auf:
 
*Aufgrund der Normierung gilt stets  $-1 \le  ρ_{xy}  ≤ +1$.
 
*Sind die beiden Zufallsgrößen $x$ und $y$ unkorreliert, so ist $ρ_{xy} = 0$.
 
*Bei strenger linearer Abhängigkeit zwischen $x$ und $y$ ist $ρ_{xy}= ±1$ &nbsp; &rArr; &nbsp; vollständige Korrelation.
 
*Ein positiver Korrelationskoeffizient bedeutet, dass bei größerem $x$–Wert im statistischen Mittel auch $y$&nbsp; größer ist als bei kleinerem $x$.
 
*Dagegen drückt ein negativer Korrelationskoeffizient aus, dass $y$&nbsp; mit steigendem $x$ im Mittel kleiner wird. 
 
 
 
[[File:P_ID232__Sto_T_4_1_S7a_neu.png |right|frame| Gaußsche 2D-WDF mit Korrelation]]
 
{{GraueBox|TEXT= 
 
$\text{Beispiel 5:}$&nbsp;  Es gelten folgende Voraussetzungen:
 
*Die betrachteten Komponenten $x$ und $y$ besitzen jeweils eine gaußförmige WDF.
 
*Die beiden Streuungen sind unterschiedlich $(σ_y < σ_x)$.
 
*Der Korrelationskoeffizient beträgt $ρ_{xy} = 0.8$.
 
 
 
Im Unterschied zum [[Stochastische_Signaltheorie/Zweidimensionale_Zufallsgrößen#WDF_und_VTF_bei_statistisch_unabh.C3.A4ngigen_Komponenten| Beispiel 2]] mit statistisch unabhängigen Komponenten &nbsp; &rArr; &nbsp; $ρ_{xy} = 0$ (trotz $σ_y < σ_x$) erkennt man, dass hier bei größerem $x$–Wert im statistischen Mittel auch $y$ größer ist als bei kleinerem $x$.}}
 
 
 
==Korrelationsgerade==
 
<br>
 
 
[[File: P_ID1089__Sto_T_4_1_S7b_neu.png  |frame| Gaußsche 2D-WDF mit Korrelationsgerade]]
 
{{BlaueBox|TEXT= 
 
$\text{Definition:}$&nbsp; Als '''Korrelationsgerade''' bezeichnet man  die Gerade $y = K(x)$  in der $(x, y)$&ndash;Ebene durch den „Mittelpunkt” $(m_x, m_y)$. Manchmal wird diese Gerade auch  ''Regressionsgerade'' genannt.
 
  
Die Korrelationsgerade besitzt folgende Eigenschaften: 
+
{{BlueBox|TEXT=
 +
'''(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.}}
  
*Die mittlere quadratische Abweichung von dieser Geraden – in $y$&ndash;Richtung betrachtet und über alle $N$ Punkte gemittelt – ist minimal:
+
*&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$.
:$$\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}.$$
+
*&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.
*Die Korrelationsgerade kann als eine Art „statistische Symmetrieachse“ interpretiert werden. Die Geradengleichung lautet:
 
:$$y=K(x)=\frac{\sigma_y}{\sigma_x}\cdot\rho_{xy}\cdot(x - m_x)+m_y.$$}}
 
  
  
Der Winkel, den die Korrelationsgerade zur $x$&ndash;Achse einnimmt, beträgt:
+
{{BlueBox|TEXT=
:$$\theta_{y\hspace{0.05cm}\rightarrow \hspace{0.05cm}x}={\rm arctan}(\frac{\sigma_{y} }{\sigma_{x} }\cdot \rho_{xy}).$$
+
'''(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}}
  
Durch diese Nomenklatur soll deutlich gemacht werden, dass es sich hier um die Regression von $y$ auf $x$ handelt.  
+
*&nbsp;Due to rotational symmetry, same results as in&nbsp; $(3)$.
  
*Die Regression in Gegenrichtung – also von $x$ auf $y$ – bedeutet dagegen die Minimierung der mittleren quadratischen Abweichung in $x$–Richtung.
 
  
*Das interaktive Applet  [[Applets:Korrelationskoeffizient_%26_Regressionsgerade|Korrelationskoeffizient und Regressionsgerade]] verdeutlicht, dass sich im Allgemeinen (falls $σ_y \ne σ_x$) für die Regression von $x$ auf $y$  ein anderer Winkel und damit auch eine andere Regressionsgerade ergeben wird:
+
{{BlueBox|TEXT=
:$$\theta_{x\hspace{0.05cm}\rightarrow \hspace{0.05cm} y}={\rm arctan}(\frac{\sigma_{x}}{\sigma_{y}}\cdot \rho_{xy}).$$
+
'''(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;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;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.
  
  
 +
{{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?}}
  
 +
*&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.
  
{{Display}}
 
  
 +
{{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)$?}}
  
 +
*&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$.
  
'''Wahrscheinlichkeiten der Binomialverteilung'''
 
 
Hierfür gilt mit $μ = 0, \text{...}\ , I$:
 
:$$p_\mu = {\rm Pr}(z=\mu)={I \choose \mu}\cdot p^\mu\cdot ({\rm 1}-p)^{I-\mu}.$$
 
Der erste Term gibt hierbei die Anzahl der Kombinationen $(I \text{ über }\mu)$ an:
 
:$${I \choose \mu}=\frac{I !}{\mu !\cdot (I-\mu) !}=\frac{ {I\cdot (I- 1) \cdot \ \cdots \ \cdot (I-\mu+ 1)} }{ 1\cdot  2\cdot \ \cdots \ \cdot  \mu}.$$
 
  
 +
{{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$?}}
  
'''Momente der Binomialverteilung'''
+
*&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'''.
  
Für das Moment $k$-ter Ordnung einer binomialverteilten Zufallsgröße $z$ gilt:
 
:$$m_k={\rm E}[z^k]=\sum_{\mu={\rm 0}}^{I}\mu^k\cdot{I \choose \mu}\cdot p^\mu\cdot ({\rm 1}-p)^{I-\mu}.$$
 
  
Daraus erhält man nach einigen Umformungen für
+
{{BlueBox|TEXT=
*den linearen Mittelwert:  &nbsp; $m_1 = I\cdot p,$
+
'''(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?}}
*den quadratischen Mittelwert: &nbsp; $m_2 = (I^2-I)\cdot p^2+I\cdot p,$
 
*die Varianz bzw. die Streuung: &nbsp; $\sigma^2 = {m_2-m_1^2} = {I \cdot p\cdot (1-p)} \hspace{0.3cm}\Rightarrow \hspace{0.3cm}
 
\sigma =  \sqrt{I \cdot p\cdot (1-p)}.$
 
  
 +
*&nbsp;The correlation line intersects all contour lines at that points where the tangent line is perpendicular to the contour line.
  
'''Anwendungen der Binomialverteilung'''
 
  
Die Binomialverteilung findet in der Nachrichtentechnik ebenso wie in anderen Disziplinen mannigfaltige Anwendungen: 
+
{{BlueBox|TEXT=
*Sie beschreibt die Verteilung von Ausschussstücken in der statistischen Qualitätskontrolle.  
+
'''(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;?}}
*Auch die per Simulation gewonnene Bitfehlerquote eines digitalen Übertragungssystems ist eigentlich eine binomialverteilte Zufallsgröße.
 
*Die Binomialverteilung erlaubt die Berechnung der Restfehlerwahrscheinlichkeit bei blockweiser Codierung, wie das folgende Beispiel zeigt.  
 
  
 +
*&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.
  
{{GraueBox|TEXT= 
 
$\text{Beispiel 1:}$&nbsp;
 
Überträgt man jeweils Blöcke von $I =5$ Binärsymbolen über einen Kanal, der
 
*mit der Wahrscheinlichkeit $p = 0.1$ ein Symbol verfälscht &nbsp; &rArr; &nbsp; Zufallsgröße $e_i = 1$, und
 
*entsprechend mit der Wahrscheinlichkeit $1 - p = 0.9$ das Symbol unverfälscht überträgt  &nbsp; &rArr; &nbsp; Zufallsgröße $e_i = 0$,
 
 
   
 
   
  
so gilt für die neue Zufallsgröße $f$  (&bdquo;Fehler pro Block&rdquo;):
 
:$$f=\sum_{i=1}^{I}e_i.$$
 
  
Die Zufallsgröße $f$ kann nun alle ganzzahligen Werte zwischen $\mu = 0$ (kein Symbol verfälscht) und $\mu = I = 5$ (alle fünf Symbole falsch) annehmen. Die Wahrscheinlichkeiten für $\mu$ Verfälschungen bezeichnen wir mit $p_μ = {\rm Pr}(f = \mu)$.
 
*Der Fall, dass alle fünf Symbole richtig übertragen werden, tritt mit der Wahrscheinlichkeit $p_0 = 0.9^{5} ≈ 0.5905$ ein. Dies ergibt sich auch aus der Binomialformel für $μ = 0$ unter Berücksichtigung der Definition $5\text{ über } 0 = 1$.
 
*Ein einziger Symbolfehler $(f = 1)$ tritt mit der Wahrscheinlichkeit $p_1 = 5\cdot 0.1\cdot 0.9^4\approx 0.3281$ auf. Der erste Faktor berücksichtigt, dass es für die Position eines einzigen Fehlers genau $5\text{ über } 1 = 5$ Möglichkeiten gibt. Die beiden weiteren Faktoren beücksichtigen, dass ein Symbol verfälscht und vier richtig übertragen werden müssen, wenn $f =1$ gelten soll.
 
*Für $f =2$ gibt es mehr Kombinationen, nämlich $5\text{ über } 2 = (5 \cdot 4)/(1 \cdot 2) = 10$, und man erhält $p_2 = 10\cdot 0.1^2\cdot 0.9^3\approx 0.0729$.
 
  
  
Kann ein Blockcode bis zu zwei Fehlern korrigieren, so ist die Restfehlerwahrscheinlichkeit $p_{\rm R} =  1-p_{\rm 0}-p_{\rm 1}-p_{\rm 2}\approx 0.85\%$. Eine zweite Berechnungsmöglichkeit wäre $p_{\rm R} =  p_{3}  + p_{4} + p_{5}$ mit der Näherung $p_{\rm R} \approx p_{3} = 0.81\%.$
 
  
Die mittlere  Fehleranzahl in einem Block ist $m_f = 5 \cdot 0.1 = 0.5$. Die Varianz der Zufallsgröße $f$ beträgt $\sigma_f^2 = 5 \cdot 0.1 \cdot 0.9= 0.45$ &nbsp; &rArr; &nbsp;  Streuung $\sigma_f \approx 0.671.$}}
 
  
===Eigenschaften der Poissonverteilung===
+
==Applet Manual==
 
<br>
 
<br>
Die ''Poissonverteilung'' ist ein Grenzfall der Binomialverteilung, wobei
+
[[File:Anleitung_2D-Gauss.png|left|500px|frame|Screen shot from the German version]]
*zum einen von den Grenzübergängen $I → ∞$ und $p →$ 0 ausgegangen wird,
+
<br><br>
*zusätzlich vorausgesetzt ist, dass das Produkt $I · p = λ$ einen endlichen Wert besitzt.  
+
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Parameter input via slider:&nbsp; $\sigma_X$, &nbsp;$\sigma_Y$ and&nbsp; $\rho$.  
  
 +
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Selection:&nbsp; Representation of PDF or CDF.
  
Der Parameter $λ$ gibt die mittlere Anzahl der „Einsen” in einer festgelegten Zeiteinheit an und wird als die ''Rate'' bezeichnet.  
+
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Reset:&nbsp; Setting as at program start.
  
Im Gegensatz zur Binomialverteilung ($0 ≤ μ ≤ I$) kann hier die Zufallsgröße beliebig große (ganzzahlige, nichtnegative) Werte annehmen, was bedeutet, dass die Menge der möglichen Werte hier nicht abzählbar ist. Da jedoch keine Zwischenwerte auftreten können, spricht man auch hier von einer ''diskreten Verteilung''.  
+
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Display contour lines instead of one-dimensional PDF.
  
 +
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Display range for two-dimensional PDF.
  
'''Wahrscheinlichkeiten der Poissonverteilung'''
+
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Manipulation of the three-dimensional graph (zoom, rotate, ...)
  
Berücksichtigt man die oben genannten Grenzübergänge in der Gleichung für die Wahrscheinlichkeiten der Binomialverteilung, so folgt für die Auftrittswahrscheinlichkeiten der poissonverteilten Zufallsgröße $z$:
+
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Display range for&nbsp; "one-dimensional PDF"&nbsp; or&nbsp; "contour lines".
:$$p_\mu = {\rm Pr} ( z=\mu ) = \lim_{I\to\infty} \cdot \frac{I !}{\mu ! \cdot (I-\mu  )!} \cdot (\frac{\lambda}{I}  )^\mu \cdot  ( 1-\frac{\lambda}{I})^{I-\mu}.$$
 
Daraus erhält man nach einigen algebraischen Umformungen:
 
:$$p_\mu = \frac{ \lambda^\mu}{\mu!}\cdot {\rm e}^{-\lambda}.$$
 
  
 +
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Manipulation of the two-dimensional graphics ("one-dimensional PDF")
  
'''Momente der Poissonverteilung'''
+
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Area for exercises: Task selection. 
  
Bei der Poissonverteilung ergeben sich Mittelwert und Streuung direkt aus den entsprechenden Gleichungen der Binomialverteilung durch zweifache Grenzwertbildung:
+
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Area for exercises: Task description
:$$m_1 =\lim_{\left.{I\hspace{0.05cm}\to\hspace{0.05cm}\infty, \hspace{0.2cm}  {p\hspace{0.05cm}\to\hspace{0.05cm} 0}}\right.} \hspace{0.2cm} I \cdot p= \lambda,$$
 
:$$\sigma =\lim_{\left.{I\hspace{0.05cm}\to\hspace{0.05cm}\infty, \hspace{0.2cm}  {p\hspace{0.05cm}\to\hspace{0.05cm} 0}}\right.} \hspace{0.2cm} \sqrt{I \cdot p \cdot (1-p)} = \sqrt {\lambda}.$$
 
  
Daraus ist zu erkennen, dass bei der Poissonverteilung stets $\sigma^2 = m_1 = \lambda$ ist. Dagegen gilt bei der Binomialverteilung immer $\sigma^2 < m_1$.
+
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Area for exercises: Show/hide solution
  
[[File: P_ID616__Sto_T_2_4_S2neu.png |frame| Momente der Poissonverteilung | rechts]]
+
&nbsp; &nbsp; '''( L)''' &nbsp; &nbsp; Area for exercises: Output of the sample solution
{{GraueBox|TEXT= 
 
$\text{Beispiel 2:}$&nbsp;
 
Wir vergleichen nun die Binomialverteilung mit den Parametern $I =6$ und $p = 0.4$ und die Poissonverteilung mit $λ = 2.4$:
 
*Beide Verteilungen besitzen genau den gleichen Mittelwert $m_1 = 2.4$.
 
*Bei der Poissonverteilung (im Bild rot markiert) beträgt die Streuung $σ ≈ 1.55$.
 
*Bei der (blauen) Binomialverteilung ist die Standardabweichung nur $σ = 1.2$.}}
 
  
 +
<u>Note:</u> &nbsp; &nbsp;Value output of the graphics&nbsp; $($both 2D and 3D$)$&nbsp; via mouse control.
 +
<br clear=all>
  
'''Anwendungen der Poissonverteilung'''
 
  
Die Poissonverteilung ist das Ergebnis eines so genannten ''Poissonprozesses''. Ein solcher dient häufig als Modell für Folgen von Ereignissen, die zu zufälligen Zeitpunkten eintreten können. Beispiele für derartige Ereignisse sind
 
*der Ausfall von Geräten – eine wichtige Aufgabenstellung in der Zuverlässigkeitstheorie,
 
*das Schrotrauschen bei der optischen Übertragung, und
 
*der Beginn von Telefongesprächen in einer Vermittlungsstelle („Verkehrstheorie”).
 
  
 
+
==About the Authors==
{{GraueBox|TEXT=
 
$\text{Beispiel 3:}$&nbsp;
 
Gehen bei einer Vermittlungsstelle im Langzeitmittel neunzig Vermittlungswünsche pro Minute ein (also $λ = 1.5 \text{ pro Sekunde}$), so lauten die Wahrscheinlichkeiten $p_{\mu}$, dass in einem beliebigen Zeitraum von einer Sekunde genau $\mu$ Belegungen auftreten:
 
:$$p_\mu = \frac{1.5^\mu}{\mu!}\cdot {\rm e}^{-1.5}.$$
 
 
 
Es ergeben sich die Zahlenwerte $p_0 = 0.223$, $p_1 = 0.335$, $p_2 = 0.251$, usw.
 
 
 
Daraus lassen sich weitere Kenngrößen ableiten:
 
*Die Abstand $τ$ zwischen zwei Vermittlungswünschen genügt der ''Exponentialverteilung''.
 
*Die mittlere Zeitspanne zwischen Vermittlungswünschen beträgt ${\rm E}[τ] = 1/λ ≈ 0.667 \ \rm s$.}}
 
 
 
 
 
 
 
===Gegenüberstellung Binomialverteilung vs. Poissonverteilung===
 
 
<br>
 
<br>
Hier sollen die Gemeinsamkeiten und die Unterschiede zwischen binomial- und poissonverteilten Zufallsgrößen herausgearbeitet werden.
+
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]]).  
[[File: P_ID60__Sto_T_2_4_S3_neu.png |frame| Binomialverteilung vs. Poissonverteilung]]
+
*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".
Die '''Binomialverteilung''' ist zur Beschreibung solcher stochastischer Ereignisse geeignet, die durch einen festen Takt $T$ gekennzeichnet sind. Beispielsweise beträgt bei ISDN  (''Integrated Services Digital Network'') mit $64 \ \rm kbit/s$ die Taktzeit $T \approx 15.6 \ \rm &micro; s$.  
+
*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;
*Nur in diesem Zeitraster treten binäre Ereignisse auf. Solche Ereignisse sind beispielsweise die fehlerfreie $(e_i = 0)$ oder fehlerhafte $(e_i = 1)$ Übertragung einzelner Symbole.  
 
*Die Binomialverteilung ermöglicht nun statistische Aussagen über die Anzahl der in einem längeren Zeitintervall $T_{\rm I} = I · T$ zu erwartenden Übertragungsfehler entsprechend des skizzierten Zeitdiagramms (blau markierte Zeitpunkte).
 
*Für sehr große Werte von $I$ und gleichzeitig sehr kleine Werte von $p$ kann die Binomialverteilung durch die ''Poissonverteilung'' mit $\lambda = I \cdot p$ angenähert werden.  
 
*Ist gleichzeitig das Produkt $I · p \gg 1$, so geht nach dem ''Grenzwertsatz von de Moivre-Laplace'' die Poissonverteilung (und damit auch die Binomialverteilung) in eine diskrete Gaußverteilung über.
 
 
 
 
 
Die '''Poissonverteilung''' macht ebenfalls Aussagen über die Anzahl eintretender Binärereignisse in einem endlichen Zeitintervall.
 
 
Geht man hierbei vom gleichen Betrachtungszeitraum $T_{\rm I}$ aus und vergrößert die Anzahl $I$ der Teilintervalle immer mehr, so wird die Taktzeit $T,$ zu der jeweils ein neues Binärereignis ($0$ oder $1$) eintreten kann, immer kleiner. Im Grenzfall geht $T$ gegen Null. Das heißt:
 
*Bei der Poissonverteilung sind die binären Ereignisse nicht nur zu diskreten, durch ein Zeitraster vorgegebenen Zeitpunkten möglich, sondern jederzeit. Das untere Zeitdiagramm verdeutlicht diesen Sachverhalt.  
 
*Um im Mittel während der Zeit $T_{\rm I}$ genau so viele „Einsen” wie bei der Binomialverteilung zu erhalten (im Beispiel: sechs), muss allerdings die auf das infinitesimal kleine Zeitintervall $T$ bezogene charakteristische Wahrscheinlichkeit $p = {\rm Pr}( e_i = 1)$ gegen Null tendieren.  
 
 
 
 
 
 
 
==Versuchsdurchführung==
 
 
 
[[File:Exercises_binomial_fertig.png|right]]
 
*Wählen Sie zunächst die Nummer '''1''' ... '''6''' der zu bearbeitenden Aufgabe.
 
*Eine Aufgabenbeschreibung wird angezeigt. Die Parameterwerte sind angepasst.
 
*Lösung nach Drücken von &bdquo;Hide solution&rdquo;.
 
*Aufgabenstellung und Lösung in Englisch.  
 
 
 
  
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.
 
  
 +
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.
  
In der folgenden Beschreibung bedeutet
 
*'''Blau''': &nbsp; Verteilungsfunktion 1 (im Applet blau markiert),
 
*'''Rot''': &nbsp; &nbsp; Verteilungsfunktion 2 (im Applet rot markiert).
 
 
 
{{BlaueBox|TEXT=
 
'''(1)'''&nbsp; Setzen Sie '''Blau''': Binomialverteilung $(I=5, \ p=0.4)$ und '''Rot''': Binomialverteilung $(I=10, \ p=0.2)$.
 
:Wie lauten die Wahrscheinlichkeiten ${\rm Pr}(z=0)$ und ${\rm Pr}(z=1)$?}}
 
 
 
$\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\%;$
 
 
$\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\%.$
 
 
{{BlaueBox|TEXT=
 
'''(2)'''&nbsp; Es gelten weiter die Einstellungen von '''(1)'''. Wie groß sind die Wahrscheinlichkeiten ${\rm Pr}(3 \le z \le 5)$?}}
 
 
 
$\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 }
 
{\rm Pr}(3 \le z \le 5) = {\rm Pr}(z \le 5) - {\rm Pr}(z \le 2)$.
 
 
$\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.$
 
 
{{BlaueBox|TEXT=
 
'''(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; $
 
 
$\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.$
 
 
{{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$?}}
 
 
 
$\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$;
 
 
$\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=
 
'''(5)'''&nbsp; Es gelten die Einstellungen von '''(4)'''. Wie groß sind die Wahrscheinlichkeiten ${\rm Pr}(z  \gt 10)$ und ${\rm Pr}(z \gt 15)$?}}
 
 
 
$\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)$
 
 
$\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}$.
 
 
{{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
 
 
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Parametereingabe $\lambda$ per Slider
 
 
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Graphische Darstellung der Verteilungen
 
 
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Momentenausgabe für blauen Parametersatz
 
 
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Momentenausgabe für roten Parametersatz
 
 
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Variation der grafischen Darstellung
 
 
 
$\hspace{1.5cm}$&bdquo;$+$&rdquo; (Vergrößern),
 
 
$\hspace{1.5cm}$ &bdquo;$-$&rdquo; (Verkleinern)
 
 
$\hspace{1.5cm}$ &bdquo;$\rm o$&rdquo; (Zurücksetzen)
 
 
$\hspace{1.5cm}$ &bdquo;$\leftarrow$&rdquo; (Verschieben nach links),  usw.
 
 
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Ausgabe von ${\rm Pr} (z = \mu)$ und ${\rm Pr} (z  \le \mu)$
 
 
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Bereich für die Versuchsdurchführung
 
<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==
+
==Once again: Open Applet in new Tab==
  
{{LntAppletLink|verteilungen}}
+
{{LntAppletLinkEnDe|gauss_en|gauss}}

Latest revision as of 22: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