1
$\begingroup$

I was wondering if someone could please me clarify understanding certain topics in expectations in continuous random variables. I am trying to organize my notes, and I get stuck in understanding the joint expectation of 2 transformed continuous random variables.

So if I have for instance

$$f_X(x) \quad \textrm{and} \quad f_Y(y) $$ then in order to find $E[X]$ and E[Y] it would be $$E[X]=\int_{-\infty}^\infty xf_X(x)dx$$ $$E[Y]=\int_{-\infty}^\infty yf_Y(y)dy$$ and if we have the joint distribution

$$f_{X,Y}(x,y)$$then $$E[XY]=\int_x\int_yf_{XY}(x,y)dydx$$

And if $E[X]E[Y]=E[XY]$ then $f_X(x)$ and $f_Y(Y)$ are independent.

Now if we have the functions of the above continuous random variables, suppose $g(X)$ and $g(Y)$ then their expected values $$E(g(X))=\int_{-\infty}^\infty xf_X(x)g(x)dx$$ and random variables, suppose $g(X)$ and $g(Y)$ then their expected values $$E(g(Y))=\int_{-\infty}^\infty yf_Y(y)g(y)dy$$

Here is where I get stuck, that is, how do you find $$E[g(X)g(Y)]$$

From what I understand $E[g(X)g(Y)]$ is the expected value of joint transformed continuous random variables. Could someone please tell me the formula for $E[g(X)g(Y)]$ and perhaps an example, as I am unable to locate and compute one myself. Thank you in advance.

$\endgroup$
2
  • $\begingroup$ You should write $f_{X,Y}(x,y)$ for the joint density function in order to avoid confusion with the density function of the product $XY$. More importantly, your expectation of the joint density is incorrect; integrating the joint density over $\mathbb{R}^2$ is $=1$ $\endgroup$ Commented Apr 17, 2017 at 0:51
  • $\begingroup$ This is not correct: $$E[g(Y)]=\int_{-\infty}^\infty yf_Y(y)g(y)dy$$. This is correct: $$E[g(Y)]=\int_{-\infty}^\infty g(y)f_Y(y)dy$$ $\endgroup$ Commented Apr 17, 2017 at 0:59

1 Answer 1

2
$\begingroup$

Your formula for $E[XY]$ is incorrect. It should be $$E[XY]=\int_x \int_y xy f_{X,Y}(x,y) \mathop{dy} \mathop{dx}.$$ The claim about independence is not correct either. You probably meant "if $X$ and $Y$ are independent, then $E[XY]=E[X]E[Y]$."

Your formula for $E[g(X)]$ is also incorrect. It should be $$E[g(X)] = \int_{-\infty}^\infty g(x) f_X(x) \mathop{dx}.$$

More generally, $$E[h(X,Y)] = \int_x \int_y h(x,y) f_{X,Y}(x,y) \mathop{dy} \mathop{dx}.$$ So for your specific question $E[g(X)g(Y)]$ just plug in $h(x,y) := g(x) g(y)$ above.


For the example $X=\cos(Z)$ and $Y=\sin(Z)$, you should do \begin{align} E[X]= E[\cos(Z)] &= \int \cos(z) f_Z(z) \mathop{dz}\\ E[Y]= E[\sin(Z)] &= \int \sin(z) f_Z(z) \mathop{dz}\\ E[XY]= E[\sin(Z)\cos(Z)] &= \int \sin(z)\cos(z) f_Z(z) \mathop{dz}\\ \end{align} where $f_Z$ is the density of the uniform distribution on $[0,2\pi]$. Note that all three expectations are special cases of the $E[g(X)]$ formula above.

$\endgroup$
4
  • 2
    $\begingroup$ Please also note that the formulas for $E[g(X)]$ in the original post are incorrect as well. $\endgroup$ Commented Apr 17, 2017 at 0:49
  • $\begingroup$ @angryavian Thank you for fixing my errors. Now that I look at the correct formulas, it makes sense as to why I was confused about the geometric interpretation. I would like to clarify one more thing, if possible. For instance if given the following question. Suppose $Z$ ~ $Uniform([0,2\pi])$ and let $X=\cos(z)$ and $Y=\sin(z)$. I am asked to find $E(X)$ $E(Y)$ and $E(XY)$ and am having a difficulty knowing which formulas to use. For instance, for $E(XY)$ I would think to use the formula which you wrote for $E[h(X,Y)]$ but I feel like this is not correct. $\endgroup$ Commented Apr 17, 2017 at 1:44
  • $\begingroup$ @angryavian I don't think this is correct since the equation for $E[h(X,Y)]$ seems to be for functions of two different random variables, that is X and Y. However, the question which I asked in the previous comment, seems to be about 1 random variable, i.e. Z, where it is transformed in two different ways. And in this question, I am unsure which formulas are the valid ones? $\endgroup$ Commented Apr 17, 2017 at 1:48
  • $\begingroup$ @andreawong See my edit $\endgroup$ Commented Apr 17, 2017 at 3:12

You must log in to answer this question.