Difference between revisions of "Theory of Stochastic Signals/Two-Dimensional Gaussian Random Variables"

From LNTwww
 
(5 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
All previous statements of the fourth main chapter  "Random Variables with Statistical Dependence"  apply in general.  
 
All previous statements of the fourth main chapter  "Random Variables with Statistical Dependence"  apply in general.  
  
For the special case  '''Gaussian random variables'''  – the name goes back to the scientist  [https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss Carl Friedrich Gauss]  – we can further note:  
+
For the special case  »'''Gaussian random variables'''«  – the name goes back to the scientist  [https://en.wikipedia.org/wiki/Carl_Friedrich_Gauss $\text{Carl Friedrich Gauss}$]  – we can further note:  
 
*The joint probability density function of a two-dimensional Gaussian random variable  (x,y)  with mean values  mx=0,  my=0  and correlation coefficient  ρxy  is:  
 
*The joint probability density function of a two-dimensional Gaussian random variable  (x,y)  with mean values  mx=0,  my=0  and correlation coefficient  ρxy  is:  
 
: fxy(x,y)=12πσxσy1ρ2xyexp[12(1ρ2xy)(x2σ2x+y2σ2y2ρxyxyσxσy)].
 
: fxy(x,y)=12πσxσy1ρ2xyexp[12(1ρ2xy)(x2σ2x+y2σ2y2ρxyxyσxσy)].
 
*Replacing  x  by  (xmx)  and  y  by  (ymy),  we obtain the more general PDF of a two-dimensional Gaussian random variable with mean.  
 
*Replacing  x  by  (xmx)  and  y  by  (ymy),  we obtain the more general PDF of a two-dimensional Gaussian random variable with mean.  
*The two marginal probability density functions fx(x)  and fy(y)  of a two-dimensional Gaussian random variable are also Gaussian with rms values  σx  and σy, resp.
+
*The two marginal probability density functions fx(x)  and fy(y)  of a two-dimensional Gaussian random variable are also Gaussian with standard deviations  σx  and σy, resp.
 
*For uncorrelated components  x  and  y  in the above equation  ρxy=0  must be substituted,  and then the result is obtained:  
 
*For uncorrelated components  x  and  y  in the above equation  ρxy=0  must be substituted,  and then the result is obtained:  
 
:fxy(x,y)=12πσxex2/(2σ2x)12πσyey2/(2σ2y)=fx(x)fy(y).
 
:fxy(x,y)=12πσxex2/(2σ2x)12πσyey2/(2σ2y)=fx(x)fy(y).
Line 40: Line 40:
 
:ρxy=0.8.
 
 
:ρxy=0.8.
 
  
As in the  [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Correlation_coefficient|previous examples]],  the random variable is more extended in  x  direction than in  y  direction:   σx=2σy.  
+
As in the  [[Theory_of_Stochastic_Signals/Two-Dimensional_Random_Variables#Correlation_coefficient|$\text{previous examples}$]],  the random variable is more extended in  x  direction than in  y  direction:   σx=2σy.  
 
<br clear=all>
 
<br clear=all>
 
These representations can be interpreted as follows:  
 
These representations can be interpreted as follows:  
Line 64: Line 64:
  
 
More information on this topic with signal examples is provided in the first part&nbsp; "Gaussian random variables without statistical bindings"&nbsp; of the&nbsp; (German language)&nbsp; learning video  
 
More information on this topic with signal examples is provided in the first part&nbsp; "Gaussian random variables without statistical bindings"&nbsp; of the&nbsp; (German language)&nbsp; learning video  
::[[Gaußsche_2D-Zufallsgrößen_(Lernvideo)|Gaußsche 2D-Zufallsgrößen]] &nbsp; &rArr; &nbsp; "Two-dimensional Gaussian random variables".
+
::[[Gaußsche_2D-Zufallsgrößen_(Lernvideo)|"Gaußsche 2D-Zufallsgrößen"]] &nbsp; &rArr; &nbsp; "Two-dimensional Gaussian random variables".
 
<br clear=all>
 
<br clear=all>
 
{{GraueBox|TEXT=
 
{{GraueBox|TEXT=
 
[[File:P_ID2911__Sto_T_4_2_S2_unten.png |right|frame| Screen capture of the video "2D Gaussian random variables"]]   
 
[[File:P_ID2911__Sto_T_4_2_S2_unten.png |right|frame| Screen capture of the video "2D Gaussian random variables"]]   
Example 2:&nbsp;  
+
Example 2:&nbsp;
 +
<br><br><br>
 
*The graphic shows a snapshot of the first part video&nbsp; "Gaussian random variables without statistical bindings".  
 
*The graphic shows a snapshot of the first part video&nbsp; "Gaussian random variables without statistical bindings".  
  
Line 80: Line 81:
 
:fxy(x,y)=const.x2σ2x+y2σ2y2ρxyxyσxσy=const.
 
:fxy(x,y)=const.x2σ2x+y2σ2y2ρxyxyσxσy=const.
 
The following graph shows in lighter blue two contour lines for different parameter sets,&nbsp; each with&nbsp; ρxy0.  
 
The following graph shows in lighter blue two contour lines for different parameter sets,&nbsp; each with&nbsp; ρxy0.  
[[File:P_ID408__Sto_T_4_2_S3_neu.png|right|frame|Contour lines of the 2D&ndash;PDF at correlated quantities]]
+
[[File:EN_Sto_T_4_2_S3_neu1.png|right|frame|Contour lines of the 2D&ndash;PDF at correlated quantities]]
 
*The ellipse major axis is dashed in dark blue.  
 
*The ellipse major axis is dashed in dark blue.  
*The correlation line or&nbsp; "regession line" &nbsp; $K(x)$&nbsp; is drawn in solid red.  
+
*The correlation line or&nbsp; "regression line" &nbsp; $(RL)$&nbsp; is drawn in solid red.  
  
  
Line 94: Line 95:
  
 
More information on this topic is provided in the&nbsp; (German language)&nbsp; learning video  
 
More information on this topic is provided in the&nbsp; (German language)&nbsp; learning video  
::[[Gaußsche_2D-Zufallsgrößen_(Lernvideo)|Gaußsche 2D-Zufallsgrößen]] &nbsp; &rArr; &nbsp; "Two-dimensional Gaussian random variables".
+
::[[Gaußsche_2D-Zufallsgrößen_(Lernvideo)|"Gaußsche 2D-Zufallsgrößen"]] &nbsp; &rArr; &nbsp; "Two-dimensional Gaussian random variables".
  
 
*Part 1: &nbsp; Gaussian random variables without statistical bindings,   
 
*Part 1: &nbsp; Gaussian random variables without statistical bindings,   
Line 134: Line 135:
  
  
 +
Notes:
 
*If the coordinate system were also rotated by&nbsp; β=45,&nbsp; there would be uncorrelated components because of&nbsp; σx=σy&nbsp; and because of&nbsp; sin(β)=cos(β)=1/2&nbsp; for the new correlation coefficient &nbsp; &rArr; &nbsp;  ρξη=0 .  
 
*If the coordinate system were also rotated by&nbsp; β=45,&nbsp; there would be uncorrelated components because of&nbsp; σx=σy&nbsp; and because of&nbsp; sin(β)=cos(β)=1/2&nbsp; for the new correlation coefficient &nbsp; &rArr; &nbsp;  ρξη=0 .  
  
Line 162: Line 164:
 
[[Aufgaben:Exercise_4.4:_Two-dimensional_Gaussian_PDF|Exercise 4.4: Two-dimensional Gaussian PDF]]
 
[[Aufgaben:Exercise_4.4:_Two-dimensional_Gaussian_PDF|Exercise 4.4: Two-dimensional Gaussian PDF]]
  
[[Aufgaben:Exercise_4.4Z:_Contour_Lines_of_the_2D_PDF|Exercise 4.4Z: Contour Lines of the 2D PDF]]
+
[[Aufgaben:Exercise_4.4Z:_Contour_Lines_of_the_"2D-PDF"|Exercise 4.4Z: Contour Lines of the "2D-PDF"]]
  
 
[[Aufgaben:Exercise_4.5:_Two-dimensional_Examination_Evaluation|Exercise 4.5: Two-dimensional Examination Evaluation]]
 
[[Aufgaben:Exercise_4.5:_Two-dimensional_Examination_Evaluation|Exercise 4.5: Two-dimensional Examination Evaluation]]

Latest revision as of 15:44, 21 December 2022

Probability density function and cumulative distribution function


All previous statements of the fourth main chapter  "Random Variables with Statistical Dependence"  apply in general.

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

  • The joint probability density function of a two-dimensional Gaussian random variable  (x,y)  with mean values  mx=0my=0  and correlation coefficient  ρxy  is:
fxy(x,y)=12πσxσy1ρ2xyexp[12(1ρ2xy)(x2σ2x+y2σ2y2ρxyxyσxσy)].
  • Replacing  x  by  (xmx)  and  y  by  (ymy),  we obtain the more general PDF of a two-dimensional Gaussian random variable with mean.
  • The two marginal probability density functions fx(x)  and fy(y)  of a two-dimensional Gaussian random variable are also Gaussian with standard deviations  σx  and σy, resp.
  • For uncorrelated components  x  and  y  in the above equation  ρxy=0  must be substituted,  and then the result is obtained:
fxy(x,y)=12πσxex2/(2σ2x)12πσyey2/(2σ2y)=fx(x)fy(y).

Conclusion:  In the special case of a 2D random variable with Gaussian PDF  fxy(x,y),  "statistical independence"  follows directly from  "uncorrelatedness":

fxy(x,y)=fx(x)fy(y).

Please note:

  • In no other PDF can  "uncorrelatedness"  be used to infer  "statistical independence".
  • However,  one can always   ⇒   for any two-dimensional PDF  fxy(x,y)  infer "uncorrelatedness" from "statistical independence"  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 also uncorrelated.


The interactive HTML5/JavaScript applet  "Two-dimensional Gaussian Random Variables"  plots the 2D functions PDF and CDF for arbitrary values of  σx, σy  and  ρxy.

Two-dimensional Gaussian PDF and CDF

Example 1:  The graphic shows

  • the probability density function  (left),
  • cumulative distribution function  (right)


of a two-dimensional Gaussian random variable  (x,y)  with relatively strong positive correlation of the individual components:  

ρxy=0.8.

As in the  previous examples,  the random variable is more extended in  x  direction than in  y  direction:   σx=2σy.
These representations can be interpreted as follows:

  • The PDF here is comparable to a mountain ridge extending from the lower left to the upper right.
  • The maximum is at  mx=0  and  my=0.  This means that the the two-dimensional random variable is mean-free.
  • The 2D–CDF as the integral in two directions over the 2D–PDF increases continuously from lower left to upper right from  0  to  1.



Contour lines for uncorrelated random variables


Contour lines of 2D–PDF with uncorrelated variables

From the conditional equation  fxy(x,y)=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:

x2σ2x+y2σ2y=const.

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

  • "Circles"  (for  σx=σy,   green curve), or
  • "Ellipses"  (for  σxσy,   blue curve) in alignment of the two axes.


More information on this topic with signal examples is provided in the first part  "Gaussian random variables without statistical bindings"  of the  (German language)  learning video

"Gaußsche 2D-Zufallsgrößen"   ⇒   "Two-dimensional Gaussian random variables".


Screen capture of the video "2D Gaussian random variables"

Example 2: 


  • The graphic shows a snapshot of the first part video  "Gaussian random variables without statistical bindings".
  • The second video part covers  "Gaussian random variables with statistical bindings"  according to the following section.


Contour lines for correlated random variables


For correlated components  (ρxy0)  the PDF contour lines are always elliptic,  thus also for the special case  σx=σy

fxy(x,y)=const.x2σ2x+y2σ2y2ρxyxyσxσy=const.

The following graph shows in lighter blue two contour lines for different parameter sets,  each with  ρxy0.

Contour lines of the 2D–PDF at correlated quantities
  • The ellipse major axis is dashed in dark blue.
  • The correlation line or  "regression line"   (RL)  is drawn in solid red.


Based on this plot,  the following statements can be made:

  • 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  (blue dashed straight line)  with respect to the  x–axis also depends on  σxσy  and  ρxy:
α=1/2arctan (2ρxyσxσyσ2xσ2y).
  • The  (red solid)  correlation line  y=K(x)  of a Gaussian random variable always lies below the  (blue dashed)  ellipse major axis.
  • K(x)  can also be constructed geometrically from the intersection of the contour lines and their vertical tangents,  as indicated in green in the sketches above.


More information on this topic is provided in the  (German language)  learning video

"Gaußsche 2D-Zufallsgrößen"   ⇒   "Two-dimensional Gaussian random variables".
  • Part 1:   Gaussian random variables without statistical bindings,
  • Part 2:   Gaussian random variables with statistical bindings.

Rotation of the coordinate system


For some tasks it is advantageous to rotate the coordinate system,  as indicated in the following graphic:

To rotate the coordinate system
  • The  (ξ,η)  coordinate system is rotated with respect to the original  (x,y)  system by the angle  β.
  • In contrast,  α  denotes the angle between the ellipse major axis and the  x–axis.


The following relationships exist between the coordinates of the two reference frames:

ξ=cos(β)x+sin(β)yresp.x=cos(β)ξsin(β)η,
η=sin(β)x+cos(β)yresp.y=sin(β)ξ+cos(β)η.


If  (x,y)  is a Gaussian random variable,  then the random variable  (ξ,η)  is also Gaussian distributed.

Substituting the above equations into the 2D–PDF fxy(x,y)  and comparing the coefficients,  we obtain the following governing equations for  σxσy  and  ρxy  respectively  σξ,ση   and  ρξη:

1(1ρ2ξη)σ2ξ=1(1ρ2xy)[cos2(β)σ2x+sin2(β)σ2y2ρxysin(β)cos(β)σxσy],
1(1ρ2ξη)σ2η=1(1ρ2xy)[sin2(β)σ2x+cos2(β)σ2y+2ρxysin(β)cos(β)σxσy],
ρξη(1ρ2ξη)σξση=1(1ρ2xy)[sin(β)cos(β)σ2xsin(β)cos(β)σ2y+ρxyσxσy(cos2(β)sin2(β))].

With these three equations,  in each case three parameters of the two coordinate systems can be converted directly,  which is possible however only in special cases without substantial computational expenditure.  Following an example with justifiable computational expenditure.


To rotate the coordinate system

Example 3:  We consider a two-dimensional Gaussian PDF with the following properties:

  1. The variances of the two components are equal:   σ2x=σ2y=1.
  2. The correlation coefficient between  x  and  y  is  ρxy=0.5.
  3. The angle of the ellipse major axis with respect to the  x–axis is thus  α=45.


Notes:

  • If the coordinate system were also rotated by  β=45,  there would be uncorrelated components because of  σx=σy  and because of  sin(β)=cos(β)=1/2  for the new correlation coefficient   ⇒   ρξη=0 .
  • The two standard deviations  – related to the new coordinate system –  would then result according to the first two equations to  σξ=1.5  and  ση=0.5.


However,  the above sketch is not based on  β=α  but on  β=α/2.

With the parameters and equations

  1. σx=σy=1ρxy=0.5,
  2. α=45sin(β)cos(β)=sin(2β)/2=sin(α)/2,  and
  3. cos2(β)sin2(β)=cos(2β)=cos(α)


the system of equations can be represented as follows:

(I)1(1ρ2ξη)σ2ξ=43[112sin(α)]=0.862,
(II)1(1ρ2ξη)σ2η=43[1+12sin(α)]=1.805,(I)(II):σησξ=0.8621.805=0.691,
(III)ρξη(1ρ2ξη)σξση=ρξη(1ρ2ξη)σ2ξ0.691=23cos(α)=0.471.

Dividing now the equation  (III)  by the equation  (I),  we get:

ρξη0.691=0.4710.862ρξη=0.378.

The other two parameters of the new coordinate system now result in  σξ1  and  ση0.7.

Exercises for the chapter


Exercise 4.4: Two-dimensional Gaussian PDF

Exercise 4.4Z: Contour Lines of the "2D-PDF"

Exercise 4.5: Two-dimensional Examination Evaluation

Exercise 4.6: Coordinate Rotation