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

From LNTwww
(Die Seite wurde neu angelegt: „{{LntAppletLink|verteilungen}} ==Programmbeschreibung== <br> Dieses Applet ermöglicht die Berechnung und graphische Darstellung *der Wahrscheinlichkeiten $…“)
 
 
(51 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>
 
===Eigenschaften der Binomialverteilung===
 
<br>
 
Die ''Binomialverteilung'' stellt einen wichtigen Sonderfall für die Auftrittswahrscheinlichkeiten einer diskreten Zufallsgröße dar. Zur Herleitung gehen wir davon aus, dass $I$ binäre und statistisch voneinander unabhängige Zufallsgrößen $b_i \in \{0, 1 \}$  
 
*den Wert $1$ mit der Wahrscheinlichkeit ${\rm Pr}(b_i = 1) = p$, und
 
*den Wert  $0$ mit der Wahrscheinlichkeit ${\rm Pr}(b_i = 0) = 1-p$ annehmen kann.  
 
  
 +
{{BlaueBox|TEXT= 
 +
$\text{Definition:}$&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}.$$
  
Dann ist die Summe $z$ ebenfalls eine diskrete Zufallsgröße mit dem Symbolvorrat $\{0, 1, 2, \text{...}\ , I\}$, die man als binomialverteilt bezeichnet:
+
*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.
:$$z=\sum_{i=1}^{I}b_i.$$
+
*$∩$&nbsp; denotes the logical AND operation.
Der Symbolumfang beträgt somit $M = I + 1.$
+
*$X$&nbsp; and&nbsp; $Y$ denote the two random variables, and&nbsp; $x \in X$&nbsp; and &nbsp; $y \in Y$ indicate realizations thereof.
 +
*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"]].}}
  
  
'''Wahrscheinlichkeiten der Binomialverteilung'''
+
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 ,$$
Hierfür gilt mit $μ = 0, \text{...}\ , I$:
+
:$$f_{Y}(y) = \int_{-\infty}^{+\infty} f_{XY}(x,y) \,\,{\rm d}x .$$
:$$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}.$$
 
  
 +
These two marginal density functions&nbsp; $f_X(x)$&nbsp; and&nbsp; $f_Y(y)$
 +
*provide only statistical information about the individual components&nbsp; $X$&nbsp; and&nbsp; $Y$, respectively,
 +
*but not about the bindings between them.
  
'''Momente der Binomialverteilung'''
 
  
Für das Moment $k$-ter Ordnung einer binomialverteilten Zufallsgröße $z$ gilt:  
+
As a quantitative measure of the linear statistical bindings&nbsp; &rArr; &nbsp; '''correlation'''&nbsp; one uses.
:$$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}.$$
+
* 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 ,$$ 
 +
*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}.$$
  
Daraus erhält man nach einigen Umformungen für
+
{{BlaueBox|TEXT= 
*den linearen Mittelwert: &nbsp; $m_1 = I\cdot p,$
+
$\text{Properties of correlation coefficient:}$&nbsp;  
*den quadratischen Mittelwert: &nbsp; $m_2 = (I^2-I)\cdot p^2+I\cdot p,$
+
*Because of normalization, $-1 \le ρ_{XY} ≤ +1$ always holds&nbsp;.
*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}
+
*If the two random variables &nbsp;$X$&nbsp; and &nbsp;$Y$ are uncorrelated, then &nbsp;$ρ_{XY} = 0$.
\sigma =  \sqrt{I \cdot p\cdot (1-p)}.$
+
*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>
  
 +
===2D&ndash;PDF for Gaussian random variables===
  
'''Anwendungen der Binomialverteilung'''
+
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 ) .$$
  
Die Binomialverteilung findet in der Nachrichtentechnik ebenso wie in anderen Disziplinen mannigfaltige Anwendungen:  
+
{{BlaueBox|TEXT=  
*Sie beschreibt die Verteilung von Ausschussstücken in der statistischen Qualitätskontrolle.
+
$\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:''
*Auch die per Simulation gewonnene Bitfehlerquote eines digitalen Übertragungssystems ist eigentlich eine binomialverteilte Zufallsgröße.
+
:$$f_{XY}(x,y)= f_{X}(x) \cdot f_{Y}(y) . $$
*Die Binomialverteilung erlaubt die Berechnung der Restfehlerwahrscheinlichkeit bei blockweiser Codierung, wie das folgende Beispiel zeigt.  
 
  
 +
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===
  
{{GraueBox|TEXT= 
+
[[File:Sto_App_Bild2.png |frame| Contour lines of 2D-PDF with uncorrelated variables | right]]
$\text{Beispiel 1:}$&nbsp;
+
From the conditional equation&nbsp; $f_{XY}(x, y) = {\rm const.}$&nbsp; the contour lines of the PDF can be calculated.  
Ü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;):
+
If the components&nbsp; $X$&nbsp; and&nbsp; $Y$ are uncorrelated&nbsp; $(ρ_{XY} = 0)$, the equation obtained for the contour lines is:
:$$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)$.
+
:$$\frac{x^{\rm 2}}{\sigma_{X}^{\rm 2}}+\frac{y^{\rm 2}}{\sigma_{Y}^{\rm 2}} =\rm const.$$
*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$.
+
In this case, the contour lines describe the following figures:
*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.
+
*'''Circles'''&nbsp; (if&nbsp; $σ_X = σ_Y$, &nbsp; green curve), or
*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$.
+
*'''Ellipses'''&nbsp; (for&nbsp; $σ_X ≠ σ_Y$, &nbsp; blue curve) in alignment of the two axes.  
 +
<br clear=all>
 +
===Regression line===
  
 +
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| Gaussian 2D PDF (approximation with $N$ measurement points) and <br>correlation line &nbsp;$y = K(x)$]]
  
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\%.$
+
*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}.$$
 +
*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 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.$}}
+
*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}).$$
  
===Eigenschaften der Poissonverteilung===
 
<br>
 
Die ''Poissonverteilung'' ist ein Grenzfall der Binomialverteilung, wobei
 
*zum einen von den Grenzübergängen $I → ∞$ und $p →$ 0 ausgegangen wird,
 
*zusätzlich vorausgesetzt ist, dass das Produkt $I · p = λ$ einen endlichen Wert besitzt.
 
  
  
Der Parameter $λ$ gibt die mittlere Anzahl der „Einsen” in einer festgelegten Zeiteinheit an und wird als die ''Rate'' bezeichnet.
+
===Contour lines for correlated random variables===
  
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''.  
+
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>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:
  
'''Wahrscheinlichkeiten der Poissonverteilung'''
+
:$$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.
  
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$:
+
*The ellipse major axis is dashed in dark blue.
:$$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}.$$
+
*The&nbsp; [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Regression_line|"regression line"]]&nbsp; $K(x)$&nbsp; is drawn in red throughout.  
Daraus erhält man nach einigen algebraischen Umformungen:
 
:$$p_\mu = \frac{ \lambda^\mu}{\mu!}\cdot {\rm e}^{-\lambda}.$$
 
  
  
'''Momente der Poissonverteilung'''
+
Based on this plot, the following statements are possible:
 +
*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; :
 +
:$$\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&nbsp; $y = K(x)$&nbsp; of a Gaussian 2D-random variable always lies below the (blue dashed) ellipse major axis.
 +
* $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>
 +
===Two dimensional cumulative distribution function &nbsp; &rArr; &nbsp; 2D&ndash;CDF===
  
Bei der Poissonverteilung ergeben sich Mittelwert und Streuung direkt aus den entsprechenden Gleichungen der Binomialverteilung durch zweifache Grenzwertbildung:
+
{{BlaueBox|TEXT= 
:$$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,$$
+
$\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):
:$$\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}.$$
+
:$$F_{XY}(x,y) = {\rm Pr}\big [(X \le x) \cap (Y \le y) \big ] .$$}}
  
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$.
 
  
[[File: P_ID616__Sto_T_2_4_S2neu.png |frame| Momente der Poissonverteilung | rechts]]
+
The following similarities and differences between the "1D&ndash;CDF" and the" 2D&ndash;CDF" emerge:
{{GraueBox|TEXT= 
+
*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:
$\text{Beispiel 2:}$&nbsp;
+
:$$F_{XY}(x,y)=\int_{-\infty}^{y} \int_{-\infty}^{x} f_{XY}(\xi,\eta) \,\,{\rm d}\xi \,\, {\rm d}\eta .$$
Wir vergleichen nun die Binomialverteilung mit den Parametern $I =6$ und $p = 0.4$ und die Poissonverteilung mit $λ = 2.4$:  
+
*Inversely, the probability density function can be given from the cumulative distribution function by partial differentiation to&nbsp; $x$&nbsp; and&nbsp; $y$&nbsp; :
*Beide Verteilungen besitzen genau den gleichen Mittelwert $m_1 = 2.4$.  
+
:$$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.}.$$
*Bei der Poissonverteilung (im Bild rot markiert) beträgt die Streuung $σ ≈ 1.55$.
+
*In terms of the cumulative distribution function&nbsp; $F_{XY}(x, y)$&nbsp; the following limits apply:
*Bei der (blauen) Binomialverteilung ist die Standardabweichung nur $σ = 1.2$.}}
+
:$$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>
  
'''Anwendungen der Poissonverteilung'''
+
==Exercises==
 +
<br>
 +
*Select the number&nbsp; $(1,\ 2$, ... $)$&nbsp; of the task to be processed.&nbsp; The number "0" corresponds to a "Reset":&nbsp; Setting as at the program start.
 +
*A task description is displayed.&nbsp; Parameter values are adjusted.&nbsp; Solution after pressing "Sample solution".&nbsp;
 +
*In the task description, we use &nbsp;$\rho$&nbsp; instead of &nbsp;$\rho_{XY}$.
 +
*For the one-dimensional Gaussian PDF holds:&nbsp; $f_{X}(x) = \sqrt{1/(2\pi \cdot \sigma_X^2)} \cdot {\rm e}^{-x^2/(2 \hspace{0.05cm}\cdot \hspace{0.05cm} \sigma_X^2)}$.
  
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”).
 
  
 +
{{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$.}}
  
{{GraueBox|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{Beispiel 3:}$&nbsp;
+
*&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$.
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:
+
{{BlueBox|TEXT=
*Die Abstand $τ$ zwischen zwei Vermittlungswünschen genügt der ''Exponentialverteilung''.
+
'''(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}}
*Die mittlere Zeitspanne zwischen Vermittlungswünschen beträgt ${\rm E}[τ] = 1/λ ≈ 0.667 \ \rm s$.}}
 
  
 +
*&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.
  
  
===Gegenüberstellung Binomialverteilung vs. Poissonverteilung===
+
{{BlueBox|TEXT=
<br>
+
'''(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.}}
Hier sollen die Gemeinsamkeiten und die Unterschiede zwischen binomial- und poissonverteilten Zufallsgrößen herausgearbeitet werden.  
 
  
[[File:  P_ID60__Sto_T_2_4_S3_neu.png |frame| Binomialverteilung vs. Poissonverteilung]]
+
*&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$.
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$.  
+
*&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.
*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.
+
{{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}}
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.
 
  
 +
*&nbsp;Due to rotational symmetry, same results as in&nbsp; $(3)$.
  
  
==Versuchsdurchführung==
+
{{BlueBox|TEXT=
 +
'''(5)'''&nbsp; Is the statement true:&nbsp;"Elliptic contour lines exist only for &nbsp;$\rho \ne 0$".&nbsp; Interpret the&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}PDF$&nbsp; and&nbsp; $\rm 2D\hspace{-0.1cm}-\hspace{-0.1cm}CDF$&nbsp; for &nbsp;$\sigma_X=1, \ \sigma_Y=0.5$&nbsp; and&nbsp; $\rho = 0$.}}
  
[[File:Exercises_binomial_fertig.png|right]]
+
*&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$.
*Wählen Sie zunächst die Nummer '''1''' ... '''6''' der zu bearbeitenden Aufgabe.
+
*&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.
*Eine Aufgabenbeschreibung wird angezeigt. Die Parameterwerte sind angepasst.
+
*&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.
*Lösung nach Drücken von &bdquo;Hide solution&rdquo;.
 
*Aufgabenstellung und Lösung in Englisch.  
 
  
  
Die Nummer '''0''' entspricht einem &bdquo;Reset&rdquo;:
+
{{BlueBox|TEXT=
*Gleiche Einstellung wie beim Programmstart.
+
'''(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?}}
*Ausgabe eines &bdquo;Reset&ndash;Textes&rdquo; mit weiteren Erläuterungen zum Applet.
 
  
 +
*&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.
  
In der folgenden Beschreibung bedeutet
 
*'''Blau''': &nbsp; Verteilungsfunktion 1 (im Applet blau markiert),
 
*'''Rot''': &nbsp; &nbsp; Verteilungsfunktion 2 (im Applet rot markiert).
 
  
 +
{{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)$?}}
  
{{BlaueBox|TEXT=
+
*&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$.
'''(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\%;$
+
{{BlueBox|TEXT=
 +
'''(8)'''&nbsp; Starting from&nbsp; $\sigma_X=\sigma_Y=0.75, \ \rho = 0.7$&nbsp; vary the parameters&nbsp; $\sigma_Y$&nbsp; and&nbsp; $\rho $.&nbsp; What statements hold for the angles &nbsp;$\alpha$&nbsp; and&nbsp; $\theta$?}}
  
$\hspace{1.85cm}\text{Rot: }{\rm Pr}(z=0)=0.8^10=10.74\%, \hspace{0.3cm}{\rm Pr}(z=1)=0.2 \cdot 0.8^9=26.84\%.$
+
*&nbsp;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'''.
  
{{BlaueBox|TEXT=
 
'''(2)'''&nbsp; Es gelten weiter die Einstellungen von '''(1)'''. Wie groß sind die Wahrscheinlichkeiten ${\rm Pr}(3 \le z \le 5)$?}}
 
  
 +
{{BlueBox|TEXT=
 +
'''(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?}}
  
$\hspace{1.0cm}\Rightarrow\hspace{0.3cm}\text{Es gilt }{\rm Pr}(3 \le z \le 5) = {\rm Pr}(z=3) + {\rm Pr}(z=4) + {\rm Pr}(z=5)\text{, oder }
+
*&nbsp;The correlation line intersects all contour lines at that points where the tangent line is perpendicular to the contour line.
{\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.$
+
{{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$.
'''(3)'''&nbsp; Es gelten weiter die Einstellungen von '''(1)'''. Wie unterscheiden sich der Mittelwert $m_1$ und die Streuung $\sigma$ der beiden Binomialverteilungen?}}
+
*&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.
  
 +
  
$\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}$;
+
==Applet Manual==
 +
<br>
 +
[[File:Anleitung_2D-Gauss.png|left|500px|frame|Screen shot from the German version]]
 +
<br><br>
 +
&nbsp; &nbsp; '''(A)''' &nbsp; &nbsp; Parameter input via slider:&nbsp; $\sigma_X$, &nbsp;$\sigma_Y$ and&nbsp; $\rho$.  
  
{{BlaueBox|TEXT=
+
&nbsp; &nbsp; '''(B)''' &nbsp; &nbsp; Selection:&nbsp; Representation of PDF or CDF.
'''(5)'''&nbsp; Es gelten die Einstellungen von '''(4)'''. Wie groß sind die Wahrscheinlichkeiten ${\rm Pr}(z  \gt 10)$ und ${\rm Pr}(z \gt 15)$?}}
 
  
 +
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Reset:&nbsp; Setting as at program start.
  
$\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)}$.
+
&nbsp; &nbsp; '''(D)''' &nbsp; &nbsp; Display contour lines instead of one-dimensional PDF.
  
$\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)$
+
&nbsp; &nbsp; '''(E)''' &nbsp; &nbsp; Display range for two-dimensional PDF.
  
$\hspace{1.85cm} \text{Näherung: }\hspace{0.2cm}{\rm Pr}(z \gt 15) \ge {\rm Pr}(z = 16) = \lambda^{16}/{16!}\approx 2 \cdot 10^{-22}$.
+
&nbsp; &nbsp; '''(F)''' &nbsp; &nbsp; Manipulation of the three-dimensional graph (zoom, rotate, ...)
  
{{BlaueBox|TEXT=
+
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Display range for&nbsp; "one-dimensional PDF"&nbsp; or&nbsp; "contour lines".
'''(6)'''&nbsp; Es gelten weiter die Einstellungen von '''(4)'''. Mit welchen Parametern ergeben sich symmetrische Verteilungen um $m_1$?}}
 
  
 +
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Manipulation of the two-dimensional graphics ("one-dimensional PDF")
  
$\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.}$
+
&nbsp; &nbsp; '''( I )''' &nbsp; &nbsp; Area for exercises: Task selection.   
  
$\hspace{1.85cm}\text{Die Poissonverteilung wird dagegen nie symmetrisch, da sie sich bis ins Unendliche erstreckt!}$
+
&nbsp; &nbsp; '''(J)''' &nbsp; &nbsp; Area for exercises: Task description
  
==Zur Handhabung des Applets==
+
&nbsp; &nbsp; '''(K)''' &nbsp; &nbsp; Area for exercises: Show/hide solution
[[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; '''( L)''' &nbsp; &nbsp; Area for exercises: Output of the sample solution
  
&nbsp; &nbsp; '''(C)''' &nbsp; &nbsp; Vorauswahl für roten Parametersatz
+
<u>Note:</u> &nbsp; &nbsp;Value output of the graphics&nbsp; $($both 2D and 3D$)$&nbsp; via mouse control.
 +
<br clear=all>
  
&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
+
==About the Authors==
 +
<br>
 +
This interactive calculation tool was designed and implemented at the&nbsp; [https://www.ei.tum.de/en/lnt/home/ Institute for Communications Engineering]&nbsp; at the&nbsp; [https://www.tum.de/en Technical University of Munich].
 +
*The first version was created in 2003 by&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Ji_Li_.28Bachelorarbeit_EI_2003.2C_Diplomarbeit_EI_2005.29|Ji Li]] &nbsp; as part of his diploma thesis with “FlashMX – Actionscript” (Supervisor: [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Mitarbeiter_und_Dozenten#Prof._Dr.-Ing._habil._G.C3.BCnter_S.C3.B6der_.28am_LNT_seit_1974.29|Günter Söder]]).
 +
*In 2019 the program was redesigned by&nbsp; [[Biographies_and_Bibliographies/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]]&nbsp; as part of her bachelor thesis&nbsp; (Supervisor: [[Biographies_and_Bibliographies/Beteiligte_der_Professur_Leitungsgebundene_%C3%9Cbertragungstechnik#Tasn.C3.A1d_Kernetzky.2C_M.Sc._.28bei_L.C3.9CT_seit_2014.29|Tasnád Kernetzky]] ) via "HTML5".
 +
*Last revision and English version 2021 by&nbsp; [[Biografien_und_Bibliografien/An_LNTwww_beteiligte_Studierende#Carolin_Mirschina_.28Ingenieurspraxis_Math_2019.2C_danach_Werkstudentin.29|Carolin Mirschina]]&nbsp; in the context of a working student activity.&nbsp;  
  
&nbsp; &nbsp; '''(G)''' &nbsp; &nbsp; Momentenausgabe für roten Parametersatz
 
  
&nbsp; &nbsp; '''(H)''' &nbsp; &nbsp; Variation der grafischen Darstellung
+
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.
  
  
$\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