Uniform distribution - derive joint expectations Let $X$ and $Y$ be independent random variables with uniform distribution on $[0,1]$, in notation: 
$X$~$Unif(0,1)$, and $Y$~$Unif(0,1)$.
Derive (a) $E(min(X,Y))$, (b) $E(|X - Y|)$, (c) $E((X+Y)^2)$.
I've been getting seriously frustrated with this question because I can't seem to find any examples in the books I have or my class notes. :( Any help is very much appreciated! Even links to online examples :'(
 A: HINT:
It is a matter of setting up integrals defining these expectation:
$$
   \mathbb{E}\left(\min(X,Y)\right) = \int_0^1 \int_0^1 \min(x,y) \mathrm{d}x \mathrm{d}y = \int_0^1 \left(\int_0^y x \mathrm{d}x + \int_y^1 y \mathrm{d} x \right) \mathrm{d}y
$$
$$
   \mathbb{E}\left(|X-Y|\right) = \int_0^1 \int_0^1 |x-y| \mathrm{d}x \mathrm{d}y = \int_0^1 \left(\int_0^y (y-x) \mathrm{d}x + \int_y^1 (x-y) \mathrm{d} x \right) \mathrm{d}y
$$
$$
   \mathbb{E}\left((X-Y)^2\right) = \int_0^1 \int_0^1 (x-y)^2 \mathrm{d}x \mathrm{d}y
$$
You should be able to finish these off by evaluating them.
A: Seems I'm late, nevertheless will try. 
There's a slower way, but it may give you a few more insights. Define $W=\min (X,Y)$. I'll start with the discrete case, continuous one is similar. Also $P(X=j)= P(Y=j)=p_j.$
If $X, Y$ are iid and defined on $\mathbb{N}$, to get $W=0$ you have two identical cases: either $X=0 \cap Y \geq1$ or the other way around. For $W=1 \ X=1 \ \text{and} \ Y \geq 2$ or the other way around. And so on. Putting it together, you get the CDF of $W$:
$$
\mathbf{P}(W \leq k)= \sum_{j=0}^{k}p_j \mathbf{P}(Y \geq j+1) + \sum_{j=0}^{k}p_j \mathbf{P}(X \geq j+1)
$$
For the case in your problem:
$$
F_{W}(w)=\mathbf{P}(W \leq w)=\int_{0}^{w}f_{X}(w')\mathbf{P}(Y \geq w')dw' + \int_{0}^{w}f_{Y}(w')\mathbf{P}(X \geq w')dw'\\
= 2 \int_{0}^{w}(1-w')dw'=2w \bigg( 1-\frac{w}{2}\bigg)
$$
Taking the derivative we get 
$$
f(w)=2(1-w)
$$
Now for the actual problem:
$$
\mathbf{E}W = \int_{0}^{1}w f(w) dw=2 \int_{0}^{1}w(1-w)dw=\frac{1}{3}
$$
