# Random Variables from $[0,1]$ - Integration Limits

I was wondering if someone could help me understand the first steps I should take for solving the next problem:

Let $U$, $V$ be random numbers chosen independently from the interval $[0, 1]$ with uniform distribution. Find the cumulative distribution and density for $Y=U+V$.

1. Y has to be in the interval $[0,2]$
2. Doing this in terms of $U=Y-V$ For the CDF I we have: $$P(Y\le y)=P(U+V\le y)=P(U\le y-V)$$

But from there I got stuck (or am I doing something wrong?) Some tip might be useful. Thanks!

-

I will change notation, for reasons that may become clear. Let our two uniform random variables be called $X$ and $Y$. Call their sum $W$.

We need to assume that $X$ and $Y$ are independent. Then the joint density function of $X$ and $Y$ is $1$ in the square with corners $(0,0)$, $(0,1)$, $(1,1)$, and $(0,1)$. The joint density is $0$ elsewhere.

Draw the square.

We want to find $F_W(w)=\Pr(W\le w)$. For $w\le 0$ we have $F_W(w)=0$. For $w\ge 2$ we have $F_W(w)=1$. Now look at the case $0\lt w\le 2$.

For such a $w$, draw the line $x+y=w$. There are geometrically two distinct cases, (i) $0\lt w\le 1$ and (ii) $1\le w\lt 2$. In each case we want to determine the probability that we end up in the part of the square "below" $x+y=w$.

(i) If $0\lt w\le 1$, the target region is an isosceles right triangle with legs $w$. This region has area $\frac{w^2}{2}$. So for $0\lt w\le 1$ we have $F_W(w)=\frac{w^2}{2}$.

(ii) If $1\lt w\lt 2$, our target region is the full square with an isosceles right triangle removed. The legs of that triangle have length $2-w$, so it has area $\frac{(2-w)^2}{2}$. Thus the rest of the square has area $1-\frac{(2-w)^2}{2}$.

For the density function, differentiate.

Remark: Since our density function is constant, "integration" was just a matter of finding an area. But if we wish to integrate, it can be done. However, the picture is still very useful as a guide.

For $0\lt w\le 1$, we are integrating over a triangle. Integrate first from $y=0$ to $y=w-x$, and then from $x=0$ to $x=w$.

For $1\lt w\lt 2$, we need to break up the integral into two parts. For $x=0$ to $w-1$, we are integrating with respect to $y$ from $0$ to $1$, then with respect to $x$ from $x=0$ to $x=w-1$. Then for the rest, we integrate with respect to from $y=0$ to $y=w-x$, and then with respect to $x$ from $x=w-1$ to $1$. Finally, we add the two results.

-
Thanks André! How did you get to part (ii)? I tried the picture which is just a uniform square, but I can't figure where you made the measure of $w$. Once you remove the first part (i) which is clear, you're left with another equally likely triangle on the upper part. Or not? –  Salieri Jun 19 '13 at 16:53
For (ii) we want $1$ minus the area of the triangle at the north-east corner. To find the side length, maybe see where $x+y=w$ meets the line $x+y=w$. It does at height $y=w-1$. So the triangle has leg $1-(w-1)=2-w$, and I had the wrong expression. Thanks! –  André Nicolas Jun 19 '13 at 17:01
Thanks a lot man! –  Salieri Jun 19 '13 at 18:43
You are welcome. Here the problem was essentially geometric. But even in less geometric situations, a sketch helps an awful lot in determining limits of integration. –  André Nicolas Jun 19 '13 at 18:44

hint: Draw a square, $U$ on the $x$ axis, $V$ on the $y$ axis. Now, for a given value $y$, what does the solution of $U+V <= y$ look like?

-