# Functions of two or more random variables

1. Nov 15, 2015

### TheMathNoob

1. The problem statement, all variables and given/known data
Supposethat X1and X2 are .random variables and that each of them has the uniform distribution on the interval [0, 1]. Find the p.d.f. of Y =X1+X2.

2. Relevant equations
Find cdf of Y and then the pdf
3. The attempt at a solution
the joint pdf would be f(x1,x2)= 1 0<x1<1 0<x2<1
0 otherwise
so I have to compute the prob that pr(Y<y)= pr(x1+x2<y). If we graph y=x1+x2 over the x2 , x1 axes, then we can say that x2=y-x1 and y would be like the shifting value of the line. The defined region is a square and the region of integration would the area defined by this line and the square. I don't understand how to set the boundaries and the integrals. They are confusing me a lot. I would accept an explanation on a scratch paper to see the big picture of it. I would appreciate if you explain how to approach those kind of exercises that involve two random variables using the definition and the logic of pr(x1+x2<y). The manual solution gives two different pdfs.

2. Nov 15, 2015

### andrewkirk

Firstly, the problem cannot be done unless we know the dependence between X1 and X2. Almost certainly, the problem wishes you to assume they are independent, but it's very important to get into the habit of noting such things because before long you'll start to get problems where that is not the case, and everything changes. For now, let's assume that they are independent.

Think about the 'isolines' of Y: the subsets of the unit square on which Y is constant. Draw them on a diagram. Now draw the regions of that square where Y<a for any given a in the possible range of Y. With luck, that should give you enough intuition to work out the pdf.

3. Nov 15, 2015

### TheMathNoob

I should have stated that the the random variables are independent. Sorry I did not realize that you answered that. I will think about it

4. Nov 15, 2015

### TheMathNoob

Can you go over isolines a little bit more?

5. Nov 15, 2015

### andrewkirk

Draw the unit square on a number plane with X1 being the horizontal axis and X2 the vertical. Now draw the line that has all the points where Y=1 (ie X1+X2=1). Then draw another one for Y=1.5 and another for Y=0.5. Those lines are called isolines because for any such line, the value of Y is the same everywhere on the line.

6. Nov 15, 2015

### Ray Vickson

Just so you know: cdf's are almost always defined (by modern convention) as $P(Y \leq y)$, not $P(Y < y)$. Every book I own adopts this convention, and it is important to pay attention to it (not to just sloppily write "$< y$" when you really mean "$\leq y$"). The reason for being careful is so that more general cases, such as mixed discrete-continuous random variables can be treated properly. Anyway, for $y \leq 1$ the region of relevance is that part of $\{ x_1 + x_2 \leq y \}$ lying in the unit square $S = \{ (x_1,x_2)\, : \, 0 \leq x_1 \leq 1, 0 \leq x_2 \leq 1 \}$, and the probability (the cdf) will just be the area of that region.

Draw it out for yourself, but here are some hints.
(1) For $y \leq 1$, what does the region look like? What is its shape? What are its boundaries? What is its area? You know how to draw the line $x_1 + x_2 = y$; you know you must be on or below that line; and you know you must be inside the unit square. I see no reason why you cannot draw that.
(2) For $1 < y \leq 2$, what does the region look like, what are its boundaries, and what is its area? Why, for $y$ between 1 and 2 is it easier to look at the complementary region $\{ x_1 + x_2 > y \}$?
(3) For $y < 0$ what does the region look like? What about for $y > 1$?

7. Nov 15, 2015

### TheMathNoob

Hi ray, how did you figure out the boundaries of y<=1 and 1<y<=2. I think I have to review calc 3 some more. If you have the stewart book, can you tell me where can I practice this?

8. Nov 15, 2015

### Ray Vickson

Draw a picture and you will see why!

I don't have the Stewart book. You can find out lots of information by doing the 21st Century version of going to the library---namely, searching on-line. The internet is full of free sites that review all this material, ranging from tutorial pages to entire elementary calculus textbooks.

9. Nov 15, 2015

### TheMathNoob

Hi Ray, now I understand what is going on. If we assume the boundaries to be x1>0 and x2>0 then we will just have a single integral going from 0 to y. In the square region that we have, we just can do this until y=1 otherwise we would get bad areas or areas that don't belong to the region. x2=y-x1 keeps moving until y=2, so we have to find a way to integrate in the interval 1<=y<=2. I came up with the integral 1 - double integral(y-1 to 1 and y-x1 to 1) of 1 dx2 dx1. Is that right?. That's for the cdf

Last edited: Nov 15, 2015