Density of Adding Two Independent Uniform Random Variables

541 Views Asked by At

Suppose that X, Y are both uniform from [-1, 1] and that $f(t)$ is 1/2 for $t$ in [-1, 1]. How would you find X + Y?

I tried using convolution, and this is the result that I ended up getting.

$f_t(t) = t/4$ for $-2\le t < -1$

$f_t(t) = 1/2$ for $-1\le t < 1$

$f_t(t) = t/4$ for $1\le t < 2$

2

There are 2 best solutions below

0
On BEST ANSWER

Just a question of getting your limits correct.

According to the convolution rule, if $f_{X+Y}$ denotes the density of the sum, then $f_{X+Y}(x) = \int_{-1}^1 f_Y(y)f_X(x-y)dy$. The first term is always $\frac 12$. As for $f_X(x-y)$, we note that whenever $x+1 \geq y \geq x-1$ and $-1 \leq y \leq 1$ both hold, only then is this half, otherwise it is zero. So we need to be careful with our limits.

First off, the density can only be positive between $-2$ and $2$.

For $-2 \leq x \leq 0$, $x-1 \leq -1$,so we only need to integrate between $-1$ and $x+1$, since $y$ must belong in $[-1,1]$ and be less than $x+1$ also. Integrating, $\int_{-1}^{x+1} \frac 14 dy = \frac {x+2}4$ in this range.

For $0 \geq x \geq 2$, we anyway have $x+1 \geq 1$, so we only need to integrate between $x-1$ and $1$ (similar reason to previous time) and this time we get $\int_{x-1}^1 \frac 14 dy = \frac{2-x}{4}$.

Therefore, the density function of $f_{X+Y} $ is $\frac{2+x}{4}$ for $-2 \leq x \leq 0$ and $\frac{2-x}{4}$ in the range $0 \leq x \leq 2$. A better way of writing this : $f_{X+Y}(x) = \frac{2-|x|}{4}$.You can check this is correct.

0
On

Let me go through the convolution in detail and then derive it in a different way to convince you (and myself) that I have the right answer. First let $W = X + Y$. We want to find the density function $f_W(w)$. We know by the convolution formula that

$f_W(w) = \int_{-\infty}^{\infty} f_{XY}(t, w - t) dt$

To solve this we need to first find what $f_{XY}(t, w - t)$ actually is and for what bounds on the integral is this actually a valid pdf.

By independence we have:

$f_{XY}(t, w - t) = f_X(t)f_Y(w-t)$

Note here that you can switch the role of $X$ and $Y$ here but since they have the same pdf it doesn't matter which order. Usually I like to choose plugging in $w-t$ for the one with the easiest bounds for $t$ to come out.

$f_X(t)f_Y(w-t) = (\frac{1}{2})(\frac{1}{2})$ if $t \in [-1,1]$ and $(w-t) \in [-1,1]$

So $t$ must satisfy $-1 \leq t \leq 1$ and $w-1 \leq t \leq w+1$ at the same time, so this says that $max(w-1, -1) \leq t \leq min(w+1, 1)$ and these are the bounds for the integral.

$\int_{max(w-1,-1)}^{min(w+1,1)} \frac{1}{4} dt = \frac{1}{4}min(w+1,1) - \frac{1}{4}max(w-1,-1)$

Now just plug in values for $w$

$f_W(w) = 0, w < -2$

$f_W(w) = \frac{1}{4}(w+1) + \frac{1}{4} = \frac{(2 + w)}{4}, -2 \leq w < -1$

$f_W(w) = \frac{(2 + w)}{4}, -1 \leq w < 0$

$f_W(w) = \frac{1}{4} - \frac{1}{4}(w-1) = \frac{2-w}{4}, 0 \leq w < 1$

$f_W(w) = \frac{2-w}{4}, 1 \leq w \leq 2$

$f_W(w) = 0, w > 2$

Here's another way to approach it. Let $W = X + Y$ and $Z = X$, we can easily find the joint density of $W,Z$ and then find the marginal of $W$

We know that for joint transformations $f_{WZ}(w,z) = f_{XY}(x(w,z),y(w,z))|J|$ where $|J|$ is the jacobian of the transformation. This is easy to compute because

\begin{align*} J &= \begin{vmatrix}\frac{\partial Z}{\partial x}&&\frac{\partial Z}{\partial y}\\\frac{\partial W}{\partial x}&&\frac{\partial W}{\partial y}\end{vmatrix}\\\\ \end{align*}

=

\begin{align*} J &= \begin{vmatrix}1&&0\\1&&1\end{vmatrix}\\\\ \end{align*}

and the absolute value of the determinant of this is just 1 so we can ignore it. Now we have $X = Z$ and $Y = W - Z$ so now $X$ and $Y$ are functions of $W$ and $Z$ and we can just plug stuff in.

$f_{WZ}(w,z) = f_{XY}(x(w,z),y(w,z))|J| = f_{XY}(z, w - z) = f_X(z)f_Y(w-z)$

and then to find the density of $W$ we just find the marginal distribution with

$f_W(w) = \int_{-\infty}^{\infty} f_X(z)f_Y(w-z) dz$

and then the same steps follow from above but just replace $z$ with $t$. Notice that the 2nd way isn't a different way of calculating it but its just a way to derive the convolution formula if you prefer working with joint transformations. I hope this answers your question!