# 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 :'(

-

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.

-
Thanks so much! :) – Fred Feb 17 '13 at 16:55
Just wondering if this problem can be set up similarly: Let $X$~$Exp(\lambda)$, that is, $f_X (x) = \lambda*exp(-\lambda)$ and $Y$~$Exp(\mu)$, that is, $f_Y (y) = \mu*exp(-\mu)$ Find the density of $Z=min(X,Y)$ when X,Y are independent. – Fred Feb 17 '13 at 17:34
@Panda To solve the latter problem it is easier to first find $1-F_Z(z) = \mathbb{P}\left(Z > z \right) = \mathbb{P}\left(\min(X,Y) > z \right) = \mathbb{P}\left(X > z, Y > z \right) = (1-F_X(z)) (1-F_Y(z))$. It now remains to differentiate $f_Z(z) = F_Z^\prime(z)$. – Sasha Feb 17 '13 at 17:45
@Panda You can either use the law of the total probability $\mathbb{P}\left(X<Y\right) = \int_0^\infty F_X(y) f_Y(y) \mathrm{d}y$, or set up the integral for the probability: $\mathbb{P}\left(X<Y\right) = \int_0^\infty \int_0^\infty [x<y] f_X(x) f_Y(y) \mathrm{d}x\mathrm{d} y = \int_0^\infty \left(\int_0^y f_X(x) \mathrm{d}x \right) f_Y(y)\mathrm{d} y$. The inner integral is just $F_X(y)$. – Sasha Feb 17 '13 at 19:16
Thanks so much! You've been a huge help! :) – Fred Feb 17 '13 at 19:32

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}$$

-