# $\mathbb{E}(|X-Y|^3)$ Absolute expected value

I need to find $\mathbb{E}(|X-Y|^3)$ where $X$ and $Y$ are independent distributions and are continuously uniform distributed on interval $[0,1]$.

-
Is this homework? What have you tried? – user17762 Apr 27 '11 at 22:10
If you are satisfied, please tick an answer. – Emre Apr 27 '11 at 22:48

For every independent random variables $X$ and $Y$ with densities $f_X$ and $f_Y$ and every measurable function $g$, $$E(g(X,Y))=\int\int g(x,y)f_X(x)f_Y(y)\mathrm{d}x\mathrm{d}y.$$ In your case $$E|X-Y|^3=\int_0^1\int_0^1|x-y|^3\mathrm{d}x\mathrm{d}y.$$ I leave it to you to compute the value of this double integral (hint, the answer is $1/10$).

-
Thanks, now that's a good answer. – Just a math guy Apr 27 '11 at 22:43

What is the distribution of $Z=X-Y$ in your case? If you could determine that, then $\mathrm E |X-Y|^3 = \mathrm E |Z|^3 = \int |z|^3 f_Z(z) \mathrm d z$

-
Yep, a homework.in this case i think i've got it. $\mathbb{E}(|X-Y|^3)=\int^{1}_{0}dx\int^{x}_{0}(x-y)^{3}dy+\int^{1}_{0}dx\int^{1‌​}_{x}(y-x)^{3}dy$ and so on. – Just a math guy Apr 27 '11 at 22:26

A generalization.

Let $U_1,\ldots,U_n$ be independent uniform$(0,1)$ variables; define $U_{(n)}=\max\{U_1,\ldots,U_n\}$, $U_{(1)}=\min\{U_1,\ldots,U_n\}$, and $W_n = U_{(n)}-U_{(1)}$. The density function of $W_n$ is given by $$f_{W_n } (x) = n(n - 1)x^{n - 2} (1 - x),\;\; 0 < x < 1$$ (see, for example, here). Thus, the $m$-th moment of $W_n$ is given by $${\rm E}[W_n^m ] = n(n - 1)\int_0^1 {x^{m + n - 2} (1 - x)\,dx} = \frac{{n(n - 1)}}{{(m + n)(m + n - 1)}}.$$ The question at hand corresponds to the case $n=2$, $m=3$, as $|X-Y|$ (where $X$ and $Y$ are independent uniform$(0,1)$ variables) is distributed as $W_2$.

-