Find the correlation coefficient of $A$ and $C$.

114 Views Asked by At

Let $X$ and $Y$ be independent and uniform on $[0, 1]$. Let $A$ be the area and $C$ the circumference of a rectangle with sides $X$ and $Y$. Find the correlation coefficient of $A$ and $C$.

Attempt: Given: $X,Y$ are independent and $\sim\text{unif}[0,1],$ $A=XY, \ C=2(X+Y).$ Since $$\rho(A,C)=\frac{\text{Cov}[A,C]}{\sqrt{\text{Var}[A]\text{Var}[C]}}=\frac{E[AC]-E[A]E[C]}{\sqrt{(E[A^2]-E[A]^2)(E[C^2]-E[C]^2)}}, \tag1$$

we need to compute all the means. First, we have that

$$E[A]=E[XY]=E[X]=E[Y]=\frac{1}{2}, \tag2$$ $$E[C]=2E[X+Y]=2E[X]+2E[Y]=2, \tag3$$ $$E[AC]=2(E[X^2Y]+E[XY^2])=2(E[X^2]E[Y]+E[Y^2]E[X])=E[X^2]+E[Y^2]= \\ =\int_0^1x^2 \ dx + \int_0^1 y^2 \ dy = \frac{1}{3}+\frac{1}{3}=\frac{2}{3}, \tag4$$ $$E[A^2]=E[(XY)^2]=\int_0^1\int_1^1x^2y^2 \ dxdy=\frac{1}{9}, \tag5$$ $$E[C^2]=4E[(X+Y)^2]=4\int_0^1\int_0^1X^2+2XY+Y^2 \ dxdy =\frac{14}{3}, \tag6$$

Plugging everything into $(1)$ i get

$$\rho(A,C)=\frac{2/3-1\cdot1}{\sqrt{(1/9-1/4)(14/3-4)}}=\frac{\sqrt{30}}{5}i.$$

Well, too bad that answer doesn't make any sense at all. Even if the $i$ was not there, it would still be wrong since it's greater than $1$.

Where have I gone wrong? Is there a smarter way of doing this?