Computing the correlation between two random variables

54 Views Asked by At

Suppose $X$ and $Y$ are random variables uniformly distributed between $[0,1]$.

Further, $$ Y=\begin{cases} X,& \text{ if } \quad X<\alpha\\ 1+\alpha - X,& \textbf{ if } \quad X \geq \alpha \end{cases} $$ Compute the correlation of $X$ and $Y$?

1

There are 1 best solutions below

0
On

To compute $\mathsf{E}[XY]$, we have for $0 < \alpha < 1$, \begin{align} \mathsf{E}[XY] &= \mathsf{E}[XY \mid X < \alpha] \cdot \Pr(X < \alpha) + \mathsf{E}[XY \mid X \geq \alpha] \cdot \Pr(X \geq \alpha) \\ &= \mathsf{E}[X^2 \mid X < \alpha] \cdot \Pr(X < \alpha) + \mathsf{E}[(1 + \alpha - X)X \mid X \geq \alpha] \cdot \Pr(X \geq \alpha) \\ &= \left(\int_0^{\alpha}\frac{x^2}{\alpha} dx\right) \cdot \alpha + \left(\int_\alpha^1 \frac{(1+\alpha - x)x}{(1-\alpha)}dx\right)\cdot(1-\alpha) \\ &= \int_0^\alpha x^2 dx + \int_\alpha^1 (1 + \alpha-x)xdx \end{align} It is left as an exercise for you to compute the result.