0

I am trying to understand the calculations in the following solved exercise:

Let $X$ and $Y$ two independent random variables with pdf $f(x)=2x, x\in (0,1); f(x)=0, \text{otherwise}$. Determine the pdf of $Z=X+Y$.

For $z\in (0,1)$: $$f_Z(z)=\int_{\mathbb{R}}2x 1_{(0,1)}(x) 2(z-x)1_{(z-1,z)}(x)dx=\int_{0}^{z}2x2(z-x)=\frac{2}{3}z^3.$$

For $z\in (1,2)$: $$f_Z(z)=\int_{\mathbb{R}}2x 1_{(0,1)}(x) 2(z-x)1_{(z-1,z)}(x)dx=\int_{z-1}^{1} 2x2(z-x)dx=\frac{2}{3}(6z-z^3-4).$$

I know the definition of convolution and I get why we are using it to compute the pdf of the sum of two random variables but I don't get why are the endpoints of the integral in the first case $0$ and $z$ and why are they in the second case $z-1$ and $1$?

lorenzo
  • 4,032
  • 1
    Are you assuming that $X$ and $Y$ are independent? If no, then you need the joint density. –  Jan 26 '21 at 22:08
  • @mrsamy Yes, they are independent, I have corrected the text of the exercise. – lorenzo Jan 26 '21 at 22:09
  • 1
    Are those calculations from the solution? Or you want to verify that if they are correct? –  Jan 26 '21 at 22:16
  • @mrsamy the calculations are from the solution. I am trying to understand how the author came up with those integration bounds. – lorenzo Jan 26 '21 at 22:17
  • I think you have some typos $1_{(0,1)}(z)$ should be $1_{(0,1)}(x)$. Otherwise the second integral is simply zero. –  Jan 26 '21 at 22:23

2 Answers2

3

For each value of $z$ you are calculating $$ f_Z(z):=\int_{\mathbb R} f(x)f(z-x)dx $$ viewed as an integral over $x$ with $z$ being constant. Since the integrand $f(x)f(z-x)$ is a function of $x$, you need to determine what the integrand looks like for each possible $x$, and in particular the range of $x$ values where the integrand is zero. The range where the integrand is nonzero will depend on $z$.

This answer demonstrates how it's done for a slightly different density, but you should be able to apply the reasoning to your situation, because that other answer is also dealing with a density $f(x)$ defined over $(0,1)$. The key to finding the endpoints where $f(x)f(z-x)$ is nonzero is the following picture, which also applies to your situation:

grand_chat
  • 38,951
2

In short, it is simply because

  • for $z\in(0,1)$, $$ 1_{(0,1)}(x)1_{(z-1,z)}(x)=1_{\color{red}{(0,z)}}(x) $$

  • for $z\in(1,2)$, $$ 1_{(0,1)}(x)1_{(z-1,z)}(x)=1_{\color{red}{(z-1,1)}}(x) $$


Notes.

Since $X$ and $Y$ are i.i.d, the joint density is $$ f_{X,Y}(x,y)=f(x)f(y) $$ and the pdf of $Z$ is given by $$ f_Z(z)=\int_{-\infty}^\infty f_{XY}(x,z-x)dx= \int_{-\infty}^\infty f(x)f(z-x)dx $$

For any given $z\in\mathbb{R}$, the integrand $f(x)f(z-x)$ is nonzero if and only if $$ 0<x<1\quad\textrm{and }\quad 0<z-x<1 $$ or equivalently, $$ 0<x<1\quad\textrm{and }\quad z-1<x<z\tag{1} $$

If the constraint (1) is nonempty, then necessarily $$ z-1<1\quad \textrm{and }\quad z>0 $$

That is why $f_Z(z)$ is only possibly nonzero for $0<z<2$.

If $z\in(0,1)$, then $z-1<1$ and thus the constraint (1) is the same as $$ 0<x<z $$

If $z\in (1,2)$, then $z>1$ and thus the constraint (1) is the same as $$ z-1<x<1 $$