# How to find correlation coefficient given joint distribution

Random variables $X$ and $Y$ follow a joint distribution $$f(x, y) = \left\{ \begin{array}{ll} 2,& 0 < x \leq y < 1,\\ 0,&\text{otherwise}\end{array}\right.$$

Determine the correlation coefficient between $X$ and $Y$ .

-
I suggest you show some effort into trying to solve the problem before posting. What have you tried? Have you looked at the definition of correlation? Tell us what you know and where you got stuck. –  nullUser Sep 30 '13 at 4:09
We probably need $E(X)$, $E(Y)$, $E(X^2)$, $E(Y^2)$, and $E(XY)$. What are you having trouble calculating? –  André Nicolas Sep 30 '13 at 4:13

$f(x)= \int^{1}_{x} f(x,y) dy = \int^{1}_{x} 2 dy = 2(1-x)$ for $x \in (0,1)$.