Difference between revisions of "/Segment18"

From Computational Statistics (CSE383M and CS395T)
Jump to navigation Jump to search
(To Calculate)
 
Line 67: Line 67:
  
  
simiarly, <math> Cov(x, z)= \frac {\alpha \gamma}{12}, Cov(y, z) =\frac {\beta \gamma}{12}
+
simiarly, <math> Cov(x, z)= \frac {\alpha \gamma}{12}, Cov(y, z) =\frac {\beta \gamma}{12} </math>
  
 +
So,
  
So, <math>  
+
<math> \Sigma=  
\Sigma=  
 
  
 
\begin{bmatrix}
 
\begin{bmatrix}

Latest revision as of 12:42, 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?

<math> \lambda ~ Unif(0,1), so P(\lambda)=1, </math>

<math> E(x)= E(\alpha \lambda) =\int_0^1 \alpha \lambda d\lambda =\alpha/2 </math>

similarly,

<math> E(y)= \beta/2, E(z)=\gamma/2 </math>

<math> E(x^2) =E(\alpha^2 \lambda^2) =\int_0^1 \alpha^2 \lambda^2 d\lambda =\frac {\alpha^2}3 </math>

similarly,

<math> E(y^2) = \frac {\beta^2}3, E(z^2) =\frac {\gamma^2}3 </math>

So, <math> Var(x)=E(x^2)-E^2(x) =\frac {\alpha^2}{12} </math>

Similarly, <math> Var(y)= \frac {\beta^2}{12} , Var(z)= \frac {\gamma^2}{12} </math>

<math> Cov(x, y) =E(x-\mu_x)(y-\mu_y) = E(\alpha \lambda - \frac \alpha2) (\beta \lambda - \frac {beta}2 = \int_0^1 (\alpha \beta \lambda^2-\alpha \beta \lambda + \frac {\alpha\beta}4 ) d{\lambda} = \frac {\alpha \beta}{12}</math>


simiarly, <math> Cov(x, z)= \frac {\alpha \gamma}{12}, Cov(y, z) =\frac {\beta \gamma}{12} </math>

So,

<math> \Sigma=

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

\end{bmatrix}

= \begin{bmatrix} {\frac {\alpha^2}{12}} & {\frac {\alpha\beta}{12}}&{\frac {\alpha\gamma}{12}}\\[0.4em] {} & {\frac {\beta^2}{12}}&{\frac {\beta\gamma}{12}}\\[0.4em] {} & {}&{\frac {\gamma^2}{12}}

\end{bmatrix}

</math>