Difference between revisions of "/Segment18"

From Computational Statistics (CSE383M and CS395T)
Jump to navigation Jump to search
(To Calculate)
(To Calculate)
Line 3: Line 3:
 
1. Random points i are chosen uniformly on a circle of radius 1, and their <math>(x_i,y_i)</math> coordinates in the plane are recorded.  What is the 2x2 covariance matrix of the random variables <math>X</math> and <math>Y</math>?  (Hint: Transform probabilities from <math>\theta</math> to <math>x</math>.  Second hint: Is there a symmetry argument that some components must be zero, or must be equal?)
 
1. Random points i are chosen uniformly on a circle of radius 1, and their <math>(x_i,y_i)</math> coordinates in the plane are recorded.  What is the 2x2 covariance matrix of the random variables <math>X</math> and <math>Y</math>?  (Hint: Transform probabilities from <math>\theta</math> to <math>x</math>.  Second hint: Is there a symmetry argument that some components must be zero, or must be equal?)
  
<math> Sin
+
<math> \theta ~ Unif(0, 2\pi)    </math>
  
 +
so the  Pdf of \theta is:
 +
 +
<math> p(\theta) =1/2\pi </math>
 +
 +
<math> x=cos(\theta), y=sin(\theta) </math>
 +
 +
<math> E(x) = \int_0^{2\pi} cos\theta * 1/2\pi= 0  </math>
 +
 +
<math> E(y) = \int_0^{2\pi} sin\theta * 1/2\pi= 0  </math>
 +
 +
<math> E(x^2) = \int_0^{2\pi} cos^2\theta * 1/2\pi= 1/2  </math>
 +
 +
<math> E(y^2) = \int_0^{2\pi} sin^2\theta * 1/2\pi= 1/2  </math>
 +
 +
so, <math> Var(x)=E(x^2)-E^2(x)= 1/2  </math>
 +
 +
<math> Var(y)=E(y^2)-E^2(y)= 1/2  </math>
 +
 +
<math> Cov(x,y)= E(x-\mu_x)(y-\mu_y) =E(xy) </math>
 +
 +
<math> =\int_0^{2\pi} {sin\theta * cos\theta * \frac 1{2\pi} } d \theta = 0  </math>
 +
 +
so <math> \Sigma=
 +
 +
\begin{bmatrix}
 +
{Var(x)} & {Cov(x,y)}\\[0.4em]
 +
{Cov(y,x)} & {Var(y)}
 +
 +
\end{bmatrix}
 +
 +
=
 +
\begin{bmatrix}
 +
{\frac 12} & {0}\\[0.4em]
 +
{0} & {\frac 12}
 +
 +
\end{bmatrix}
 +
 +
</math>
  
 
2. Points are generated in 3 dimensions by this prescription:  Choose <math>\lambda</math> uniformly random in <math>(0,1)</math>.  Then a point's <math>(x,y,z)</math> coordinates are <math>(\alpha\lambda,\beta\lambda,\gamma\lambda)</math>.  What is the covariance matrix of the random variables <math>(X,Y,Z)</math> in terms of <math>\alpha,\beta,\text{ and }\gamma</math>?  What is the linear correlation matrix of the same random variables?
 
2. Points are generated in 3 dimensions by this prescription:  Choose <math>\lambda</math> uniformly random in <math>(0,1)</math>.  Then a point's <math>(x,y,z)</math> coordinates are <math>(\alpha\lambda,\beta\lambda,\gamma\lambda)</math>.  What is the covariance matrix of the random variables <math>(X,Y,Z)</math> in terms of <math>\alpha,\beta,\text{ and }\gamma</math>?  What is the linear correlation matrix of the same random variables?

Revision as of 10:54, 27 March 2013

To Calculate

1. Random points i are chosen uniformly on a circle of radius 1, and their <math>(x_i,y_i)</math> coordinates in the plane are recorded. What is the 2x2 covariance matrix of the random variables <math>X</math> and <math>Y</math>? (Hint: Transform probabilities from <math>\theta</math> to <math>x</math>. Second hint: Is there a symmetry argument that some components must be zero, or must be equal?)

<math> \theta ~ Unif(0, 2\pi) </math>

so the Pdf of \theta is:

<math> p(\theta) =1/2\pi </math>

<math> x=cos(\theta), y=sin(\theta) </math>

<math> E(x) = \int_0^{2\pi} cos\theta * 1/2\pi= 0 </math>

<math> E(y) = \int_0^{2\pi} sin\theta * 1/2\pi= 0 </math>

<math> E(x^2) = \int_0^{2\pi} cos^2\theta * 1/2\pi= 1/2 </math>

<math> E(y^2) = \int_0^{2\pi} sin^2\theta * 1/2\pi= 1/2 </math>

so, <math> Var(x)=E(x^2)-E^2(x)= 1/2 </math>

<math> Var(y)=E(y^2)-E^2(y)= 1/2 </math>

<math> Cov(x,y)= E(x-\mu_x)(y-\mu_y) =E(xy) </math>

<math> =\int_0^{2\pi} {sin\theta * cos\theta * \frac 1{2\pi} } d \theta = 0 </math>

so <math> \Sigma=

\begin{bmatrix} {Var(x)} & {Cov(x,y)}\\[0.4em] {Cov(y,x)} & {Var(y)}

\end{bmatrix}

= \begin{bmatrix} {\frac 12} & {0}\\[0.4em] {0} & {\frac 12}

\end{bmatrix}

</math>

2. Points are generated in 3 dimensions by this prescription: Choose <math>\lambda</math> uniformly random in <math>(0,1)</math>. Then a point's <math>(x,y,z)</math> coordinates are <math>(\alpha\lambda,\beta\lambda,\gamma\lambda)</math>. What is the covariance matrix of the random variables <math>(X,Y,Z)</math> in terms of <math>\alpha,\beta,\text{ and }\gamma</math>? What is the linear correlation matrix of the same random variables?