# Prove that random variable Z=X+Y has a probability density function (pdf) and calculate it.

Let X and Y be independent random variables. The random variable X has probability density function p(x) and Y is a discrete random variable having just two values: 1 with probability 1/3 and 2 with probability 2/3.

Since Z is the sum of two random variables it is known that the sum of two probability distributions is another probability distribution. To calculate:

$$P(X + Y \leq x)$$ $$= \sum_{k=1}^2P(X + k \leq x)P(Y = k) = P(X + 1 \leq x)P(Y = 1) + P(X + 2 \leq x)P(Y = 2)$$

$$=P(X \leq x - 1)(1/3) +P(X \leq x - 2)(2/3)$$

$$=F_X(x - 1)(1/3) + F_X(x - 2)(2/3)$$

Now, to find the pdf of one must take the derivative of the CDF with respect to x $$\implies$$

$$f_Z(x) = (F_X(x - 1)(1/3) + F_X(x - 2)(2/3))'$$

$$= 1/3*f_X(x-1)+2/3*f_X(x-2)$$

• What is the trouble with this? Please show what work and thoughts you have so far, so that people can see where you are having difficulty. Apr 6, 2020 at 12:09
• If $Z=X+Y$ then you cannot say $p_Z(z) = p_X(x) + p_Y(y)$ Apr 6, 2020 at 13:00
• @Henry Okay, I tried to attempt the problem a different way Apr 6, 2020 at 15:21

Try to calculate $$P(X+Y \le x )$$ by conditionning by the value of Y , formally $$P(X+Y \le x ) = \sum_{k=0} P(X+k \le x ) P(Y=k)$$
Your edited answer of $$F_Z(x)=P(X + Y \leq x)=F_X(x - 1)(1/3) + F_X(x - 2)(2/3)$$ is correct. But it is a cumulative distribution function, so now take the derivative with respect to $$x$$ to give the density function $$f_Z(x)=\tfrac13 f_X(x - 1) + \tfrac23 f_X(x - 2)$$