Probability distribution of sum of two uniform random variables
Answers
Answered by
0
am trying to understand an example from my textbook.
Let's say Z=X+Y, where X and Y are uniform random variables with range [0,1]
f(z)=⎧⎩⎨z2−z0for 0<z<1for 1≤z<2otherwise.
If we want to use a convolution, let fXfX be the full density function ofXX, and let fYfYbe the full density function of YY. Let Z=X+YZ=X+Y. Then
fZ(z)=∫∞−∞fX(x)fY(z−x)dx.fZ(z)=∫−∞∞fX(x)fY(z−x)dx.
Now let us apply this general formula to our particular case. We will have fZ(z)=0fZ(z)=0 for z<0z<0, and also for z≥2z≥2. Now we deal with the interval from 00 to 22. It is useful to break this down into two cases (i) 0<z≤10<z≤1 and (ii) 1<z<21<z<2.
(i) The product fX(x)fY(z−x)fX(x)fY(z−x) is 11 in some places, and 00 elsewhere. We want to make sure we avoid calling it 11 when it is 00. In order to have fY(z−x)=1fY(z−x)=1, we need z−x≥0z−x≥0, that is, x≤zx≤z. So for (i), we will be integrating from x=0x=0 to x=zx=z. And easily
∫z01dx=z.∫0z1dx=z.
Thus fZ(z)=zfZ(z)=z for 0<z≤10<z≤1.
(ii) Suppose that 1<z<21<z<2. In order to have fY(z−x)fY(z−x) to be 11, we need z−x≤1z−x≤1, that is, we need x≥z−1x≥z−1. So for (ii) we integrate from z−1z−1 to 11. And easily
∫1z−11dx=2−z.∫z−111dx=2−z.
Thus fZ(z)=2−zfZ(z)=2−z for 1<z<21<z<2.
Another way: (Sketch) We can go after the cdf FZ(z)FZ(z) of ZZ, and then differentiate. So we need to find Pr(Z≤z)Pr(Z≤z).
For a few fixed zz values, draw the lines with equation x+y=zx+y=z on an x-y axis plot. Draw the square SS with corners (0,0)(0,0), (1,0)(1,0), (1,1)(1,1), and (0,1)(0,1).
Then Pr(Z≤z)Pr(Z≤z) is the area of the part SSthat is "below" the line x+y=zx+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=1z=1.
Let's say Z=X+Y, where X and Y are uniform random variables with range [0,1]
f(z)=⎧⎩⎨z2−z0for 0<z<1for 1≤z<2otherwise.
If we want to use a convolution, let fXfX be the full density function ofXX, and let fYfYbe the full density function of YY. Let Z=X+YZ=X+Y. Then
fZ(z)=∫∞−∞fX(x)fY(z−x)dx.fZ(z)=∫−∞∞fX(x)fY(z−x)dx.
Now let us apply this general formula to our particular case. We will have fZ(z)=0fZ(z)=0 for z<0z<0, and also for z≥2z≥2. Now we deal with the interval from 00 to 22. It is useful to break this down into two cases (i) 0<z≤10<z≤1 and (ii) 1<z<21<z<2.
(i) The product fX(x)fY(z−x)fX(x)fY(z−x) is 11 in some places, and 00 elsewhere. We want to make sure we avoid calling it 11 when it is 00. In order to have fY(z−x)=1fY(z−x)=1, we need z−x≥0z−x≥0, that is, x≤zx≤z. So for (i), we will be integrating from x=0x=0 to x=zx=z. And easily
∫z01dx=z.∫0z1dx=z.
Thus fZ(z)=zfZ(z)=z for 0<z≤10<z≤1.
(ii) Suppose that 1<z<21<z<2. In order to have fY(z−x)fY(z−x) to be 11, we need z−x≤1z−x≤1, that is, we need x≥z−1x≥z−1. So for (ii) we integrate from z−1z−1 to 11. And easily
∫1z−11dx=2−z.∫z−111dx=2−z.
Thus fZ(z)=2−zfZ(z)=2−z for 1<z<21<z<2.
Another way: (Sketch) We can go after the cdf FZ(z)FZ(z) of ZZ, and then differentiate. So we need to find Pr(Z≤z)Pr(Z≤z).
For a few fixed zz values, draw the lines with equation x+y=zx+y=z on an x-y axis plot. Draw the square SS with corners (0,0)(0,0), (1,0)(1,0), (1,1)(1,1), and (0,1)(0,1).
Then Pr(Z≤z)Pr(Z≤z) is the area of the part SSthat is "below" the line x+y=zx+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=1z=1.
Similar questions