Probability – Convolution of PDFs of $\textrm{Uniform}[0,1]$ and $\textrm{Uniform}[1,2]$

convolutionprobabilityprobability distributions

Let X a random variable following the uniform distribution over $[0,1]$
Let Y a random variable following the uniform distribution over $[1,2]$
be independent random variables, whats is the distribution of $X+Y$
so $f_{X+Y}(x) = f_X * f_Y = \int_{\mathbb{R}} f_X(t) f_Y(x-t) dt $
i know that the density function of a uniform distribution over $[a,b]$ is $\frac{1}{b-a}$ if x is in that interval, otherwise zero outside thus :
$f_{X+Y}(x) = \int_0^1 f_X(t) f_Y(x-t) dt + \int_1^2 f_X(t)f_Y(x-t) dt $ so my confusion is in which interval does x exist in so i can u-sub and solve the integral?

Best Answer

Note $\mathbf{1}_{[1,2]}(z-t)=\mathbf{1}_{[z-2,z-1]}(t)$. So: $$\int_\mathbb{R} f_X(t)f_Y(z-t)dt=\int_{[0,1]}\mathbf{1}_{[1,2]}(z-t)dt=\int_{[0,1]\cap[z-2,z-1]}dt$$ So we consider all cases: $$(f_X*f_Y)(z)= \begin{cases} 0&z\leq 1\\ \int_{[0,z-1]}dt=z-1&1<z\leq 2\\ \int_{[z-2,1]}dt=3-z&2<z\leq 3\\ 0&z> 3 \end{cases}$$

Related Question