0

Two random variables X, Y are independent and both uniform-distributed in[0, 1].

How to calculate the probability density function Z=X+Y ?
I tried below,

$$f_X(x) = \begin{cases} \frac1{1-0} \\ 0 \end{cases} = \begin{cases} 1, & 0 \le x \le 1 \\ 0, & otherwise \end{cases} $$

Similarly, $$ f_Y(y) = \begin{cases} 1, & 0 \le y \le 1 \\ 0, & otherwise \end{cases} $$

As $f(x,y)= f_X(x)f_Y(y)$, and

$$ f(z) = \int_{-\infty}^{+\infty} f(x, y)\, dx = \int_0^1 f(x, z-x)\, dx = ? $$

but have no idea how to continue to finish above evaluation.

canoe
  • 411

1 Answers1

2

Hint: You may find it easier to find $$F(z)=\Pr(X+Y\le Z)= \int_{x=-\infty}^{+\infty}\int_{y=-\infty}^{z-x} f_X(x)f_Y(y)\, dy \, dx $$ $$= \int_{x=0}^{\min(1,z)}\int_{y=0}^{\min(1,z-x)} \, dy \, dx$$ and then differentiate with respect to $z$.

You will get different forms for $f(z)$ with $z \lt 0$, $0 \lt z \lt 1$, $1 \lt z \lt 2$, and $2 \lt z $. You should end up with a triangular distribution.

Henry
  • 157,058
  • Can you give me one example when 1 < z < 2? The answer of dup'ed question seems not that same as yours and not easily understandable. – canoe Jan 27 '15 at 14:45
  • For $1 \lt z \lt 2$ you have $F(z)=\int_{x=0}^{z-1} , dx + \int_{x=z-1}^{1}(z-x), dx$ which should give you $F(z)=2z-\dfrac{z^2}{2}-1$ and so $f(z)=2-z$. If you don't then I may have made an error. – Henry Jan 27 '15 at 17:39