1
$\begingroup$

Let $X,Y$ be random variables independent and identically distributed with uniform distribution in the interval $[-1,1]$. Let $Z=|X-Y|$. Find $f_Z(z)$.

Is it ok? \begin{align} f_Z(z)=&P(x-y\le\alpha)-P(x-y\le-\alpha) \\ =&\int_{-1}^1 \int_{-1}^{y+\alpha} \frac 14 dxdy-\int_{-1}^1 \int_{-1}^{y-\alpha} \frac 14 dxdy \end{align}

  • 1
    Is $f_z$ the density od the cdf? What you found is the cdf $F_z(\alpha)$. To get the density, just take the derivative of $\frac d{d\alpha}F_z(\alpha)$. Of course, first calculate the integrals first to get an expression which includes only $\alpha$2017-02-01
  • 0
    PS: Where did the $\alpha$ come from? It should be $z$ (or the other way around). Also note: What is the support interval of $f_Z$ and how does that affect the bounds of the integral?2017-02-02

1 Answers 1

0

$Z=\lvert X-Y\rvert = \begin{cases}X-Y&:& X>Y\\ Y-X &:& X\leqslant Y\end{cases}$

$Y = Z\pm X\quad\big[Z\pm X\in[-1;1]\big]$

Also $Z\in[0;2]$

Then by convolution $$\begin{align}f_Z(z) &= \int_{\Bbb R} f_{X,Y}(x,z+x)+f_{X,Y}(x,z-x)\;\mathrm d x\cdot\mathbf 1_{z\in[0;2)} ~+\mathbf 1_{z\in [2;\infty)} \\[1ex] & =\int_{-1}^1 \tfrac 14\mathbf 1_{x\in[-1-z;1-z]}+\tfrac 14\mathbf 1_{x\in[z-1;z+1]}\operatorname d x\cdot\mathbf 1_{z\in[0;2)} ~+\mathbf 1_{z\in [2;\infty)} \\[1ex] & =\int_{-1}^{1-z}\tfrac 14\operatorname d x\cdot\mathbf 1_{z\in[0;2)}+\int_{z-1}^{1}\tfrac 14\operatorname d x\cdot\mathbf 1_{z\in[0;2)}~+\mathbf 1_{z\in [2;\infty)} \\[1ex] & = (1-\tfrac z2)\mathbf 1_{z\in[0;2)} \\[3ex] F_Z(z) &= (z-\tfrac {z^2}4)\mathbf 1_{z\in[0;2)}~+\mathbf 1_{z\in [2;\infty)} \end{align}$$