[Math] Convolution of two independent uniform Random Variables

convolutionprobability theoryuniform distribution

Given two independent uniform random variables on (0,1), I am trying to computer the pdf for $Y = X_1 + 2X_2$.

So I have a few issues here. The first and easiest to answer being what the coefficient of 2 does to the random variable $X_2$. My gut says that it makes it to where $X_2$ can only take on values between 0 and $\frac{1}{2}$. But the other possibility that I can think of is that the $f_{X_2}(x_2)$ = 2 if 0 < $x_2$ < 2, and 0 otherwise. Or does it only effect the inequality there and it stays = 1, or something along those lines?

Second, and the more complicated of the questions, is getting the boundaries for the convolution. I got this down to be

$f_Y(y) = \int_{-\infty}^{\infty}f_{X_1}(y-x_2)f_{X_2}(x_2) dx_2$

where

$f_{X_2}(x_2) = 1$, if $0 < x_2 \leq \frac{1}{2}$ and 0 otherwise.

So then

$f_Y(y) = \int_{0}^{\frac{1}{2}}f_{X_1}(y-x_2) dx_2$.

This is where I get stuck. I know the integrand is 0 if y = $x_2$, so do I setup the inequality as $0 < y-x_2 < 1$ ?, or $0 < y-x_2 < \frac{1}{2}$ ? And where do I go from there? I see the examples I look at using two separate integrals after this step so that density ends up with a three-way piecewise function, but I'm unsure of how to get there.

We haven't really gone over convolution a ton in my past courses, and I know this problem can be done a different way but I want to practice convolutions of this variety. So any help would be greatly appreciated!

Best Answer

Let $F$ denote the cdf of the uniform distribution over $[0,1]$, the common cdf of $X_1$ and $X_2$. Now, because of the independence of $X_1$ and $X_2$, we have $$F_{X_1+2X_2}(y)=P(X_1+2X_2<y)=\int_0^1P(x+2X_2<y)\ dx=$$ $$=\int_0^1P\left(Y_2<\frac{y-x}2\right)\ dx=\int_0^1F\left(\frac{y-x}2\right)\ dx.$$

Introducing the new variable $u=\frac{y-x}2$ we get $dx=-2du$, $\frac y2$ for the lower limit, and $\frac{y-1}{2}$ for the upper limit of integration. That is,

$$F_{X_1+2X_2}(y)=2\int^{\frac y2}_{\frac {y-1}{2}}F(u) \ du=\begin{cases} 0&\text{ if }&y<0\\ 2\int_0^{\frac y2}u\ du&\text{ if }&0\leq y<1\\ 2\int_{\frac {y-1}{2}}^{\frac y2} u\ du&\text{ if }&1\le y\leq2\\ 2\int_{\frac {y-1}{2}}^{1} u\ du+2\int_1^\frac y2\ du&\text{ if }&2\le y\leq3\\ 1&\text{ if }&y>3. \end{cases}.$$

Finally

$$F_{X_1+2X_2}(y)=\begin{cases} 0&\text{ if }&y<0\\ \frac14 y^2&\text{ if }&0\leq y<1\\ \frac12y-\frac14&\text{ if }&1\le y\leq2\\ -\frac14y^2+\frac32y-\frac54&\text{ if }&2<y\leq3\\ 1&\text{ if }&y>3 \end{cases}.$$

The density is:

$$f_{X_1+2X_2}(y)=\begin{cases} 0&\text{ if }&y<0\\ \frac12y&\text{ if }&0\leq y<1\\ \frac12&\text{ if }&1\le y\leq2\\ -\frac12y+\frac32&\text{ if }&2<y\leq3\\ 0&\text{ if }&y>3 \end{cases}.$$


EDIT

Some may find the solution above to be overcomplicated. So let's see what the simple text book solution would be.

The pdf $X_1$, say, $f_{X_1}$ is $1$ over the interval $[0,1]$ and $0$ elsewhere. The pdf belonging to $2X_2$, say $f_{X_2}$ is $\frac12$ over $[0,2]$ and $0$ without it.

So, we simply have to compute the following convolution:

$$f_{X_1+2X_2}(y)=\int_{-\infty}^{\infty}f_{X_1}(y-x)f_{X_2}(x)\ dx.\tag1$$

So far straightforward, indeed. However, when calculating the latter integral, all the boring technical details will come up.

I chose the first solution because in my opinion the boring technicalities - I would dare to say: the same technicalities - emerge closer to and are better explained by the spirit of the original question.

EDIT 2

This is to override my EDIT above.

Let's see how intuitive it can be to compute such a convolution. Consider the following figures

enter image description here Obviously, if $y<0$ or $y>3$ then the result of the integral of the product is $0$. (see figures (a) and (e))

If $0\leq y\leq 1$ then the integral of the product is increasing as $\frac12y$. (See figure (b).)

If $1<y\leq 2$ then the integral equals $\frac12$. (See figure (c).)

If, however $2<y\leq 3$ the the value of the integral decreases with $y$ from $\frac12$ to $0$. (See figure (d). So for $2<y\leq 3$ the integral equals $-\frac12y+ \frac32.$

Now, is this really simpler? Do we not see the danger in pretending that computing a convolution is always this simple?