Finding $\operatorname{Cov}(X,Y)$ given $X\sim U(0,1)$ and $f_{Y\mid X}(y\mid x) = 1$ where $ x < y < x+ 1$

446 Views Asked by At

Suppose that $X$ and $Y$ are jointly continuous random variables such that $X\sim U(0,1)$ and $f_{Y\mid X}(y\mid x) = 1$ where $ x < y < x+ 1$.

Find $\operatorname{Cov}(X,Y)$.

For this question, I started by finding $E[X]$.

$E[X] = [ \int_{0}^{1} x \,dx] =1$.

Now, I am stuck on how to find $E[Y]$.

$E[Y] = [ \int_{x}^{x+1} y \,dy]$

Obviously, this integral won't give me a constant value. Is there something else I should consider for the bounds of $E[Y]$?

I was also thinking of using the formula of $E[Y] = E[E[Y\mid X]]$. Which I think would also be:

$E[Y\mid X] = [ \int_{x}^{x+1} y \,dy]$

But I'm not entirely sure if this is correct either.

2

There are 2 best solutions below

1
On BEST ANSWER

First of all it should be $$E[X] = \int_0^1 x \: dx = \frac{1}{2}.$$ You are correct that $E[Y]$ should not depend on $x$ so the formula $E[Y] = \int_x^{x+1} y \: dy$ is wrong. However the expression $\int_x^{x+1} y \: dy$ is useful, as it is the conditional expectation of $Y$ when the value $X=x$ is known. That is $$E[Y \: | \: X=x] = \int_x^{x+1}y \: dy = \frac{1}{2}((x+1)^2 - x^2)$$ This gives us that $$E[Y\:|\: X] = \frac{1}{2}((X+1)^2 - X^2) = \frac{1}{2} + X$$ Finally you can use the law total expectation to compute $$E[Y] = E[E[Y|X]] = E[\frac{1}{2} + X] = 1$$ To compute the covariance you would need to also compute $E[YX]$, which can be done using the same method (that is by first considering the conditional expectation $E[XY|X=x]$), but it can also be done directly using $$E[XY] = \int_0^1 \int_x^{x+1} xy \: dy \: dx.$$

1
On

Perhaps the law of total covariance? \begin{align*} \text{Cov}(X, Y) &= \mathbb{E}[\text{Cov}(X, Y|X)] + \text{Cov}(\mathbb{E}[X|X], \mathbb{E}[Y|X]) \\ &= 0 + \text{Cov}\left(X, \frac{1}{2} + X\right) \\ &= \text{Var}(X) = \frac{1}{12} \end{align*} Another way to do this is observe that $Y = U + X$ for $U\sim \text{Unif}(0, 1)$ and independent of $X$. We also have \begin{align*} \text{Cov}(X, Y) = \text{Cov}(X, X + U) = \text{Cov}(X, X) + \text{Cov}(X, U) = \text{Var}(X) = \frac{1}{12} \end{align*}