Density of sum of two independent uniform random variables on [0,1][0,1]

I am trying to understand an example from my textbook.

Let’s say Z=X+Y, where X and Y are independent uniform random variables with range [0,1]. Then the PDF
f(z)={zfor 0<z<12zfor 1z<20otherwise.

How was this PDF obtained?



If we want to use a convolution, let fX be the full density function ofX, and let fY be the full density function of Y. Let Z=X+Y. Then

Now let us apply this general formula to our particular case. We will have fZ(z)=0 for z<0, and also for z2. Now we deal with the interval from 0 to 2. It is useful to break this down into two cases (i) 0<z1 and (ii) 1<z<2.

(i) The product fX(x)fY(zx) is 1 in some places, and 0 elsewhere. We want to make sure we avoid calling it 1 when it is 0. In order to have fY(zx)=1, we need zx0, that is, xz. So for (i), we will be integrating from x=0 to x=z. And easily
Thus fZ(z)=z for 0<z1.

(ii) Suppose that 1<z<2. In order to have fY(zx) to be 1, we need zx1, that is, we need xz1. So for (ii) we integrate from z1 to 1. And easily
Thus fZ(z)=2z for 1<z<2.

Another way: (Sketch) We can go after the cdf FZ(z) of Z, and then differentiate. So we need to find Pr(Zz).

For a few fixed z values, draw the lines with equation x+y=z on an x-y axis plot. Draw the square S with corners (0,0), (1,0), (1,1), and (0,1).

Then Pr(Zz) is the area of the part S that is "below" the line x+y=z. That area can be calculated using basic geometry. For example, when z is 2, the whole square area is under the line so Pr=1. There is a switch in basic shape at z=1.

Source : Link , Question Author : Zhulu , Answer Author : ymzkala

Leave a Comment