# Expected Value of random variable raised to another random variable

If $X$ and $Y$ are continuous random variables uniformly distributed over $[0,1]$, find $E(X^Y)$.

My first thought was that $E(X^Y) = E(X)^{E(Y)}$, but through simulation I found that this was not the case.

I then tried using a double integral from $0$ to $1$ with respect to $x$ and $y$, but doing so results in a $1/\log$ term which cannot be evaluated at $0$ or $1$.

I'm not sure what to try next

-
+1 for showing what you thought and what you tried. –  Did Dec 19 '12 at 13:24

Assuming that $X$ and $Y$ are independent I get: $$E[X^Y]=\int_0^1\int_0^1 x^y\,\mathrm dx\,\mathrm dy=\int_0^1\frac{1}{y+1}\,\mathrm dy=\log(2).$$