# How to add two random variable's pdf? [closed]

X,Y are independent random variables. X's pdf = f(x) Y's pdf = g(x) if Z= X+Y what is the Z's pdf? Can it be calculated?

-
The first hit upon Googling the very title of this question produces a good answer: please read our faq about the wisdom of doing a little bit of research before asking a question. – whuber Jun 19 '11 at 16:35

## closed as too localized by whuber♦Jun 19 '11 at 16:36

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

If $X$ and $Y$ are two independent, continuous random variables, then you can find the distribution of $Z=X+Y$ by taking the convolution of $f(x)$ and $g(y)$:$$h(z)=(f*g)(z)=\int_{-\infty}^{\infty}f(x)g(z-x)dx$$If $X$ and $Y$ are two independent, discrete random variables, then you can find the distribution of $Z=X+Y$ by taking the discrete convolution of $X$ and $Y$:$$\mbox{P}(Z=k)=\sum_{i=-\infty}^{\infty}\mbox{P}(X=i)\cdot\mbox{P}(Y=k-i)$$
It's pretty much the same as what I've written above. $X-Y$ is the same as $X+(-Y)$. The distribution of $-Y$ is the same as the distribution of $Y$ except that it is mirrored over the vertical line at 0. – Max Jun 19 '11 at 18:15
If $A$ is the domain for $f(x)$ then $h(z)=\int_{x\in A}f(x)g(z-x)\,dx$.