24

Suppose I am given the joint pdf of $X$, $Y$, and I am asked to find the $\operatorname{cov}(X,Y)$.

I know that $\operatorname{cov}(X,Y)=E(XY)-E(X)E(Y)$ and I know how to find $E(X)$ and $E(Y)$.

My questions are:

  1. What is the definition of $E(XY)$? Is it always equal to $$\int_{R\times R} xyf_X(x)f_Y(y)dxdy\,?$$ Or only if $X$, $Y$ are independent?(from the answer I have, the solution I have did not check the independence of $X$ and $Y$, and the answer $\operatorname{cov}(X,Y)$ is not zero, which proves $X$, $Y$ are not independent.)

  2. I remember, but not very clearly, that if the joint pdf of $X$, $Y$ $f_{X,Y}(x,y)$ can be written as $$f_{X,Y}(x,y)=g(x)h(y),$$ then $X$ and $Y$ are independent. Is it always true or need some conditions? I mean, suppose the region is not, say, $[0,1]\times[0,1]$, but, say, $0<x<1,x<y<2x$, is that saying still true?

Thank you so much!

Davide Giraudo
  • 172,925
breezeintopl
  • 1,437
  • We have $E[XY]=\int_{\mathbb R\times\mathbb R}xyF(x,y)dx dy$ in general, where $F(\cdot,\cdot)$ is the cdf of $(X,Y)$. Your formula is true when $X$ and $Y$ are independent (and of course $X$ and $Y$ have a cdf). 2. You can check that $P(X\leq t_1,Y\leq t_2)=P(X\leq t_1)\cdot P(Y\leq t_2)$ thanks to the hypothesis.
  • – Davide Giraudo Jan 04 '12 at 20:02
  • 4
    $$E[g(X,Y)]=\int_{-\infty}^\infty\int_{-\infty}^\infty g(x,y)f_{X,Y}(x,y)dx dy$$ holds in general where $f_{X,Y}(x,y)$ is the joint pdf of $X$ and $Y$. Your integral in 1. is inncorrect. The equality $f_{X,Y}(x,y)=g(x)h(y)$ needs to hold at all points $(x,y)$ in the plane, not just at some points, in order for $X$ and $Y$ to be independent random variables. If the joint pdf is nonzero only for $0<x<1,x<y<2x$, then $X$ and $Y$ are dependent random variables; no need to try and see if you can express $f(x,y)$ as $g(x)h(y)$ – Dilip Sarwate Jan 04 '12 at 20:04
  • 2
    @DavideGiraudo You probably meant to write pdf instead of cdf? and also $P(X\leq t_1,Y\leq t_2)=P(X\leq t_1)P(Y\leq t_2)$ – Dilip Sarwate Jan 04 '12 at 20:06
  • OK, got it ,thank you so much! – breezeintopl Jan 04 '12 at 20:07
  • @Dilip: You should post your comment as an answer, since that covers the OP's questions. – Mike Spivey Jan 04 '12 at 20:08
  • OK, thank you for you two. I understand now. Thank you! – breezeintopl Jan 04 '12 at 20:09
  • By the ways, what does the number for "votes" mean? – breezeintopl Jan 04 '12 at 20:10