Distribution of a difference of two Uniform random variables?

$\begingroup$

Let $X$ and $Y$ both be distributed between $[1,2]$, what is the distribution of $Z=X-Y$?

$\endgroup$ 10

1 Answer

$\begingroup$

If $x,y$ are independent and uniformly distributed on $[1,2]$, then the PDF of $x$ is $1_{[1,2]}$ and the PDF of $-y$ (note the minus sign) is $1_{[-2,-1]}$. Then the PDF of $z=x-y$ is given by the convolution $f_z=1_{[1,2]} * 1_{[-2,-1]}$.

Computing this is straightforward. \begin{eqnarray} f_z(x) &=& \int 1_{[1,2]}(y) 1_{[-2,-1]}(x-y) dy \\ &=& \int_1^2 1_{[-2,-1]}(x-y) dy \\ &=& \int_{x-2}^{x-1}1_{[-2,-1]}(t) dt \\ &=& \int 1_{[x-2,x-1] \cap [-2,-1]}(t)dt \\ &=& m([x-2,x-1] \cap [-2,-1]) \\ &=& m([x,x+1] \cap [0,1]) \\ &=& (1-|x|)1_{[-1,1]}(x) \end{eqnarray}

$\endgroup$ 4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like