# Applied Stochastic processes: difference of uniform distributions

#### grandy

##### Member
Two independent random variables X and Y has the same uniform distributions in the range [-1..1]. Find the distribution function of Z=X-Y, its mean and variance.

=Using change of variables technique seems to be easiest.

fX(x) = 1/2

fY(y) =1/2

f = 1/4 ( -1<X<1 , -1<Y<1)

Using u =x -y , v= x+y

Jacobian is del (x,y) / del (u,v) = 1/2

then J =1/2

and g (u,v) =1/8

Integrate g with respect to v then

gu = (u+2)/4 -2<u<0

and gu = ( -u+2) /4 , 0< u<2

is the PDF of u

Finally mean and variance, Can someone help me? Thanks

#### chisigma

##### Well-known member
Two independent random variables X and Y has the same uniform distributions in the range [-1..1]. Find the distribution function of Z=X-Y, its mean and variance.

=Using change of variables technique seems to be easiest.

fX(x) = 1/2

fY(y) =1/2

f = 1/4 ( -1<X<1 , -1<Y<1)

Using u =x -y , v= x+y

Jacobian is del (x,y) / del (u,v) = 1/2

then J =1/2

and g (u,v) =1/8

Integrate g with respect to v then

gu = (u+2)/4 -2<u<0

and gu = ( -u+2) /4 , 0< u<2

is the PDF of u

Finally mean and variance, Can someone help me? Thanks
If X and Y are uniformely distributed in [-1,1], then U= X + Y and V= X - Y have the same p.d.f. that is...

$\displaystyle g(x)= f(x) * f(x) = \begin{cases} \frac{1}{2}+ \frac{x}{4}\ \text{if}\ -2 < x < 0 \\ \frac{1}{2} - \frac{x}{4}\ \text{if}\ 0 < x < 2\\ 0\ \text{elsewhere}\end{cases}$ (1)

From (1) we derive immediately...

$\displaystyle \mu = \int_{-2}^{2} x\ g(x)\ dx =0\ (2)$

$\displaystyle \sigma^{2} = \int_{-2}^{2} x^{2}\ g(x)\ dx = \frac{2}{3}\ (3)$

Kind regards

$\chi$ $\sigma$

Last edited: