3. (20%) Suppose \( X \) and \( Y \) has joint density: \[ f(x, y) = \frac{2}{n(n+1)} \quad \text{for } y = 1, 2, 3, \dots, x, \quad x = 1, 2, 3, \dots, n. \] Find the correlation coefficient of \( x \) and \( y \).