3

Let $\theta \sim U(0,2\pi)$ and $r\sim \chi^2_n$(Chi square distribution with n degrees of freedom) be independent and define \begin{eqnarray} X=\sqrt{r}\,\cos \theta\\ Y=\sqrt{r}\,\sin \theta. \end{eqnarray}

Are $X$ and $Y$ independent?

For $n=2$ it is obvious they are independent(Box-Muller_transform). For general I think at least they are uncorrelated. I generated $X$ and $Y$ for $n\in \{1,\cdots , 20\}$ and checked the correlation between them.

 R code
 N<-100000
 cor_vec<-c()
 for(n in 1:20){
      set.seed(1)
      theta<-runif(N,0,2*pi)
      set.seed(10)
      chi2<-rchisq(N,n)
      x<-sqrt(chi2)*cos(theta)
      y<-sqrt(chi2)*sin(theta)
      cor_vec[n]<-cor(x,y)
 }

> cor_vec [1] -1.829253e-03 2.039263e-03 3.037928e-03 2.155848e-03 1.000881e-03 [6] 2.807419e-03 1.726867e-03 1.520184e-03 3.049150e-03 1.262282e-03 [11] 3.393483e-03 8.457382e-04 1.006435e-03 1.864800e-03 2.089745e-03 [16] 2.888373e-03 9.826022e-06 2.710548e-03 1.318464e-03 2.006912e-03

Thanks in advance for any help you are able to provide.

Masoud
  • 2,715

1 Answers1

2

The expected value of the product can be calculated explicitly. Separating out the $\theta$ term using independence gives a term $\sin(\theta)\cos(\theta)$ whose ev is 0, so you’re correct that they are uncorrelated for all $n$.

They are not independent when $n\neq2$. One simple test, is that if they were independent, then $X^2$ and $Y^2$ would be uncorrelated. Individually, they have mean $n/2$. Their product has Chi squared part with mean squared plus variance $(n^2+2n))$ and the $\theta$ part is $(sin(2\theta)/2)^2$ Is $1/8$ on average, so the ev of $X^2Y^2$ is $(n^2+2n)/8$. When $n\neq 2$, $(n/2)^2\neq (n^2+2n)/8$, these are different, so $X^2$ and $Y^2$ are correlated, so $X$ and $Y$ are not independent.

Masoud
  • 2,715
Eric
  • 6,348
  • "They are not independent when n=2"--> I think for $n=2$ they are independent and normally distributed(https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform#Basic_form). – Masoud Jun 08 '21 at 17:09
  • 1
    That should be not equal to 2 which the rest of the paragraph shows. I agree when n is 2. – Eric Jun 08 '21 at 20:06