0

Let $X$ and $Y$ be uniform random variables where $0\leqslant x,y\leqslant 1$.

Let $\operatorname{sgn}(x)$ be $1$ when $x>0$, $−1$ when $x<0$ and $0$ when $x=0$. Find the distribution and density of $\operatorname{sgn}(x-1/2)+\operatorname{sgn}(y-1/2)$.

I have calculated the density of $\operatorname{sgn}(x-1/2)=\operatorname{sgn}(y-1/2)= f(z)=1/2$ when $z=1$ and $1/2$ when $z=-1$.

I feel $\operatorname{sgn}(x-1/2)+\operatorname{sgn}(y-1/2)=0$ but I'm not sure.

Any help or ideas would be appreciated. Thank you!

Davide Giraudo
  • 172,925

1 Answers1

1

Let $z$ be your new variable $z=\operatorname{sgn}\left(x-\frac{1}{2}\right) +\operatorname{sgn}\left(y-\frac{1}{2}\right)$. As sign function is discrete, so it will be $z$. Concretely, it will have three possible values:

  • $z=-2$ in case both $x$ and $y$ are below $\frac{1}{2}$
  • $z=2$ in case both $x$ and $y$ are above $\frac{1}{2}$
  • $z=0$ otherwise

Taking into account that $x$ and $y$ are independent, one can find the density function of $z$ as: Prob$(z=-2)=0.25$, Prob$(z=0)=0.5$, and Prob$(z=2)=0.25$.

Davide Giraudo
  • 172,925
cgonagu
  • 155