# Thread: Convolution of two independent random variables

1. ## Convolution of two independent random variables

Consider two independent random variables
X and Y:
Let fX(x) = 1 -(x/2) if 0 <=x <=2 and 0 otherwise.
Let fY (y) = 2 -2y for 0 <=y <=1 and 0 otherwise..

otherwise. Find the probability density function of Z=
X + Y:

I am having problem in calculating the limits ......

2. In this case,
$\displaystyle 0 \leq x \leq 2$

$\displaystyle 0 \leq y \leq 1$

So $\displaystyle f_y(z-x)$ is only defined for $\displaystyle 0 \leq z-x \leq 1$

$\displaystyle \rightarrow z \geq x \geq z-1$

but in any case $\displaystyle 0 \leq x \leq 2$

So i think the lower bound on x is max(z-1,0)
and the upper bound is min(z,2)

$\displaystyle \displaystyle f_z(z) = \int_{x=max(z-1,0)}^{x=min(z,2)} f_x(x)f_y(z-x) dx$

for 0 < z < 3

You need to evaluate the integral seperately for the cases where
z < 1
1< z <2
2 < z < 3

....i think

3. Originally Posted by Pushpa
Consider two independent random variables

X and Y:

Let fX(x) = 1 -(x/2) if 0 <=x <=2 and 0 otherwise.
Let fY (y) = 2 -2y for 0 <=y <=1 and 0 otherwise..
otherwise. Find the probability density function of Z=X + Y:

I am having problem in calculating the limits ......
Here is how I would do it if using convolutions:

$\displaystyle h(z) = \int_{- \infty}^{+ \infty} f_X(z - y) \cdot f_Y(y) \, dy = \int_0^1 f_X(z - y) (2 - 2y) \, dy$

since the support of $\displaystyle f_Y(y)$ is $\displaystyle 0 \leq y \leq 1$ and where $\displaystyle f_X(z - y) = \left\{ \begin{array}{ll} 1 - \frac{z-y}{2}, & 0 \leq z - y \leq 2 \Rightarrow -z \leq -y \leq 2 - z \Rightarrow z - 2 \leq y \leq z \\ 0 & \text{otherwise} \end{array} \right.$.

Note that $\displaystyle 0 \leq x \leq 2$ and $\displaystyle 0 \leq y \leq 1$ and so it follows that the support of $\displaystyle Z = X + Y$ is $\displaystyle 0 \leq z \leq 3$.

To see the required integral limits, draw on the one set of y-z axes the lines y = 1, y = z and y = z - 2 over the domain $\displaystyle 0 \leq z \leq 3$. It follows that there are four cases (corresponding to the four regions defined by these lines) to consider:

Case 1: $\displaystyle 0 \leq z \leq 1$. $\displaystyle h(z) = \int_{0}^{z} \left( 1 - \frac{z - y}{2} \right) (2 - 2y) \, dy = ....$

Case 2: $\displaystyle 1 < z \leq 2$. $\displaystyle h(z) = \int_{0}^{1} \left( 1 - \frac{z - y}{2} \right) (2 - 2y) \, dy = ....$

Case 3: $\displaystyle 2 < z \leq 3$. $\displaystyle h(z) = \int_{z-2}^{1} \left( 1 - \frac{z - y}{2} \right) (2 - 2y) \, dy = ....$

Case 4: $\displaystyle z < 0$ or $\displaystyle z > 3$. $\displaystyle h(z) = 0$.