# Expectation of $|X+Y|$ for $X$ and $Y$ independent and both uniform $(-1,1)$

Suppose $X$ and $Y$ are two independent random variables with uniform distribution on $(-1,1)$.

What is $E(\mid X+Y\mid)$

I am really confused with the abs function. I could only graph the region such that $\mid X+Y\mid \le 1$ but I don't know how to start from here.

Is there a general way to solve random variables involved abs function?

-
Since $|X+Y|$ is nonnegative, try computing $P\{|X+Y|\leq a\}$ for all $a > 0$ (you can do it without actually needing to evalute a double integral). Then, $$E[|X+Y|] = \int_0^{\infty} P\{|X+Y|>a\} \mathrm da.$$ How about trying to do this one yourself all the way through and posting an answer without having all the rest of us do all your homework for you? – Dilip Sarwate Dec 10 '11 at 21:49
Think of it as an average value question: you are given the function $f(x,y) = |x+y|$, and you want to find the average value of $f$ on the rectangle $[-1,1]\times[-1,1]$. – Jim Belk Dec 10 '11 at 21:53
The pdf of $X+Y$ is the convolution of two rectangles (the pdfs and $X$ and $Y$ and is thus a triangle (centered at $0$) of base $4$ and altitude $\frac{1}{2}$. The pdf of $|X+Y|$ is this folded over to give a triangle of base $2$ and altitude $1$. The center of mass of a triangle is $2/3$ of the way from apex to base, and so $E[|X+Y|] = \frac{2}{3}$. – Dilip Sarwate Dec 11 '11 at 2:17

If you have $$\int_{-1}^1\int_{-1}^1 |x+y| \frac{dy\;dx}{4},$$ you can look separately at the part of the square where $x+y>0$ and the part where $x+y<0$. The boundary is where $x+y=0$.
$$\int_{-1}^1 \left( \int_?^? (x+y) \;dy \right) dx/4.$$ The bounds on the inside integral say $y$ goes from something to something, with $x$ fixed at some point between $0$ and $1$. Choose those bounds so that you're looking at the region where $x+y>0$.