[Math] Find the density of the sum of two uniform random variables

integrationprobability

Let $X$ and $Y$ be independent and uniform random variables on $(0,1)$. Find the density of $X+Y$.

I know $$f_{X+Y}=\int_{-\infty}^{\infty}\,f_X(x)\,f_Y(z-x)dx$$

Now when $x\in(0,1)$, I know $f_X(x)=1$. Assuming $z\in (0,1)$, I need $z>x$ in order for $f_Y(y)=1$. In that case, $$f_{X+Y}=\int_{0}^{z}\,(1)\,(1)dx=z.$$

Now when $x\in(0,1)$, $f_Y(y)$ can also equal $1$ if $z \in (1,2)$. In that case, I need $z-x<1 \implies x>z-1.$ So I have: $$f_{X+Y}=\int_{z-1}^{1}\,(1)\,(1)dx=2-z.$$

Does this all look correct?

Best Answer

The mass function of sums of Random variables can be derived from the following adaptation of definitions (continuous case is analogous):

Define $Z=X+Y$ where $X,Y$ may or may not be independent. Let $p_{X,Y}$ denote the joint probability mass function of $X,Y$. The probability mass function of the sum $Z$ is given as $p_Z(Z=z)=\sum_{x \in \Omega_x}p_{X,Y}(x,y=z-x)$ which is what we require. If the random variables $X,Y$ happen to be independent, we get what is known as the convolution sum. In that case, $p_Z(Z=z) = \sum_{x \in \Omega_x} p_X(x)p_Y(z-x)$

In your earlier version of the post you had not included the independence criterion; yet had used the convolution integral as the result for the sum which is not the case as pointed out here.