Finding $\mathrm{Cov}(X,Y)$ and $E(X\mid Y=y)$ given the joint density of $(X,Y)$

105 Views Asked by At

The continuous random variables $X$ and $Y$ have joint density function $f_{xy} = 1$ for $0 < x < 1$ and $2x < y < 2$, and zero otherwise.

I am stuck on the above question, with parts a and b below:

a) Find the $cov(x,y)$.

Work:

$cov(x,y) = E(XY) - E(X)E(Y)$

$= \int_0^1\int_{2x}^2 xydydx - \int_0^1\int_{2x}^2 xdydx\int_0^1\int_{2x}^2 ydydx$ = $\frac{-1}{18}$

However I am given the answer $\frac{1}{18}$. Did I make a mistake in my computation or is the answer incorrect?

b) Find $E(X|Y = y)$.

Work:

$E(X|Y=y) = \int_{-\infty}^{\infty}xf_{x|y}(x|y)dx$

This is where I am puzzled. I know that $f_{x|y}(x|y) = \frac{f_{xy}(xy)}{f_yy}$, and $f_yy= \int_{-\infty}^{\infty}f_{x,y}(x,y)dx$. That means $f_yy = 1$ and therefore $f_{x|y}(x|y) = 1$. However I am given the answer $E(X|Y=y) = \frac{y}4$. Again, did I make a computational mistake or am I not getting something?

Thanks.

1

There are 1 best solutions below

3
On BEST ANSWER

The densities are usually denoted with subscripts in capital letters for the random variables.

For part (a), it is an algebraic error on your part. For part (b), you are not paying attention to the supports of the random variables in your calculations. Hence the absurd answers.

Define the indicator $$1_A(x)=\begin{cases}1&,\text{ if }x\in A\\0&,\text{ otherwise }\end{cases}$$

Then joint density of $(X,Y)$ is $$f_{X,Y}(x,y)=1_{(0,1)}(x)1_{(2x,2)}(y)$$

So density of $Y$ is

\begin{align} f_{Y}(y)&=\int f_{X,Y}(x,y)\,dx\,1_{(0,2)}(y) \\&=\int_0^{y/2}\,dx\,1_{(0,2)}(y) \\&=\frac{y}{2}\,1_{(0,2)}(y) \end{align}

Thus giving the density of $X$ conditioned on $Y=y$ for each $y\in(0,2)$:

$$f_{X\mid Y=y}(x)=\frac{2}{y}\,1_{(0,y/2)}(x)$$

Hence $$\mathbb E\left[X\mid Y=y\right]=\int x f_{X\mid Y=y}(x)\,dx=\frac{y}4$$