# sum of two random variables

Can any of you help me? I have some problem with this exercise of "Probability and Statistics" :

Calculate the probability density function (PDF) of $Z=X+Y$

where $Y$ is discrete random variable which is be equal to $-1,1$ with equal probability; $X$ is standard Gaussian random variable independent from $Y$.

I know that the PDF of sum of two continuous independent variables is given by the convolution of the marginal PDF $f_z(z)=f_x*f_y$ but if one on the two variable is discrete what should I do? thanks all!

## 1 Answer

If one variable is discrete, you can use the Dirac delta function to preform the integration: $$P(X=x) = \frac{1}{2}\delta(x-1) + \frac{1}{2}\delta(x+1)$$ Down-votes from purist mathematicians in 3.. 2.. 1..

• ok,so i can convolve fx*fy? – lui14 Feb 5 '13 at 12:00
• @lui4 - Yes. you can use the Dirac delta as if it were regular function. – nbubis Feb 5 '13 at 12:02
• Another question of the same exercise. X (standard gaussian variable) is indipendent from y (discrete variable, but is Y also indipendent from X? – lui14 Feb 5 '13 at 12:20
• @lui4 - yes independence is commutative. Also, if you like an answer, you can upvote it as well. – nbubis Feb 5 '13 at 12:49
• ok,how i can vote an answer? i'm sorry,but i'm new – lui14 Feb 5 '13 at 13:05