Let $X,Y$ be two independent random variables with a uniform distribution on the unit interval. The questions first asks for $E(X^k)$ where $k$ is some fixed constant that is at least 0. This calculation is easy, as it is just $$\int_{0}^{1}x^{k}f_X(x)dx = \frac{1}{k+1}$$ Now, the question gets slightly trickier, and this is where my understanding of conditional expectation and conditional probability gets fuzzy. The question asks: what is $E(X^Y)$.? A hint is given, saying to use the tower law, i.e the fact that $E(X) = E(E(X|Y)) $.

First, I am not sure what the inner expectation means. Most textbooks say it is a function of $Y$, which makes sense, but is not completely sound to me. Setting up this particular example with the tower law, we have:

$$E(X^Y) = E(E(X^Y|Y))$$ After this I am somewhat stuck. I attempted to use the following: $$E(X^Y|Y) = \int_{0}^{\infty}yf_{X^Y|Y}(x,y)dy$$ but I am fairly unsure as to what this statement actually means . If someone could help me develop a better understanding of conditional expectation of R.Vs and conditional probability in general, I would appreciate it, moreso than just an answer to this question.

  • 1
    $\begingroup$ So $E[X^Y|Y]=1/(1+y)$. Now just do the integral over Y, I.e. $\int \frac{f_Y(y)}{1+y}dy$. $\endgroup$ – user121049 Oct 31 '17 at 16:58
  • $\begingroup$ So for fixed $y =Y$ we have that $E[X^Y|Y = y] = \frac{1}{1+y}$. This makes sense. What does this tell us about $E[X^Y |Y]$? Is it the case from the above that $E[X^Y|Y] = \frac{1}{1+Y}$ i.e just sub in capital Y for lowercase y? $\endgroup$ – rubikscube09 Oct 31 '17 at 17:00

You are trying to compute $$E(X^Y) = \int_{0}^{1}\int_{0}^{1}x^yf_{XY}(x,y)dx dy. \tag 1$$ But $f(x,y)=f(x|y)f(y)$. Therefore, $$E(X^Y) = \int_{0}^{1}\left(\color{red}{\int_{0}^{1}x^yf_{X|Y}(x;y)dx}\right) f_{Y}(y)dy. \tag 2$$ The red integral in $(2)$ is $E(X^y)=E(X^Y|Y=y)$ for short.

Consequently, $E(X^Y)=E(E(X^Y|Y))$, where the outer expectation is w.r.t. $Y$ as done in $(2)$.

In your case, $f_{X|Y}(x;y)=f_{X}(x)$. So $E(X^Y|Y)=\frac{1}{y+1}$. As such, $$E(X^Y) = \int_{0}^{1}\frac{1}{y+1}f_{Y}(y)dy = ? \tag 3$$

  • $\begingroup$ Does $f$ represent the joint PDF in this case? Why do we use it? $\endgroup$ – rubikscube09 Oct 31 '17 at 17:01
  • $\begingroup$ In general, if we have a function of multiple variables then we use their joint pdf to compute the expected value. $\endgroup$ – Math Lover Oct 31 '17 at 17:05
  • $\begingroup$ Ah yes, I see. Now, why is the red expectation being computed with respect to $x$?. Am I misunderstanding in thinking that the variable $X|Y$ is a function of $Y$ . Or is it $E(X|Y)$ that is a function of $Y$ and thus should be integrated w.r.t to $y$? $\endgroup$ – rubikscube09 Oct 31 '17 at 17:10
  • $\begingroup$ @rubikscube09 $(2)$ is nothing but just the way of computing $(1)$. How do we compute a double integral? We integrate with respect to the first variable then the second. So I integrated with respect to $x$ first. Obviously, $f_Y(y)$ is not a function of $x$. It can be taken out. Now, the red integral is $E(X^y)$, where $y$ is a real number between $0$ and $1$. The red integral will be a function of $y$ only. Call the red integral $g(y)$. Now what is $\int g(y)f_Y(y) dy$? Is it not $E(g(Y))$, where the expectation is carried out w.r.t. Y? That's what I have mentioned. $\endgroup$ – Math Lover Oct 31 '17 at 17:17
  • $\begingroup$ This makes sense, thank you. $\endgroup$ – rubikscube09 Oct 31 '17 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.