# Difference between revisions of "/Segment18"

#### To Calculate

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

$\theta ~ Unif(0, 2\pi)$

so the Pdf of \theta is:

$p(\theta) =1/2\pi$

$x=cos(\theta), y=sin(\theta)$

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

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

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

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

so, $Var(x)=E(x^2)-E^2(x)= 1/2$

$Var(y)=E(y^2)-E^2(y)= 1/2$

$Cov(x,y)= E(x-\mu_x)(y-\mu_y) =E(xy)$

$=\int_0^{2\pi} {sin\theta * cos\theta * \frac 1{2\pi} } d \theta = 0$

so $\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}$

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