Probability Density Function of sum of sgn function Let $B=\{x\in \mathbb{R}: -1 \leq x \leq 1 \}$. Let $x,y \in B^{n}$ compute the probability density function of $$d_S(x,y)=\sum^{n-1}_{i=0}|sgn(x_i)-sgn(y_i)|$$. Consider $x_i,y_i$ independent and uniform distributed.
Is there any way for this value to be 1/4? If so, could you help to understand why, please? I tried to use this other answer. But clearly, that would give 3 values and not 1/4.
 A: I don't know if I understand the question well. If you define $sgn(x)=\left\{\begin{array}{cc}1&x\geq0\\-1&x<0\end{array}\right.$, your function $d_S(x,y)$ takes discrete values (it has pmf instead pdf). Note that the value in $x=0$ does not matter because it has zero probability.
It is easy to see that if $X\sim\mathcal{U}(-1,1)$, $sgn(X)=2\tilde{X}-1$ with $\tilde{X}\sim\text{Ber}(1/2)$ and sum of Bernoulli RVs is a Binomial random variable (iid Bernoulli RVs). So, you can see $d_S(X,Y)=2(U-V)$ with $U,V\sim\text{Bin}(n,1/2)$ i.i.d. The atoms are the even integers in $\{-2n,-2(n-1),\cdots,-2,0,2,\cdots,2(n-1),2n\}$
Note that if $V\sim\text{Bin}(n,1/2)$ then $Z=n-V\sim\text{Bin}(n,1/2)$ and it is independent of $U$. Finally $U+Z\sim\text{Bin}(2n,1/2)$, $d_S(X,Y)=2(U+Z-n)$ and its pmf is
$$\mathbf{P}(d_S(X,Y)=t)=\mathbf{P}(U+Z=t/2+n)=\left(\begin{array}{c}2n\\\frac{t}{2}+n\end{array}\right)\frac{1}{2^{2n}}$$
with $t\in\mathbb{Z}$, $t$ even and $-2n\leq t\leq 2n$. The 1/4 question I did not understand, I hope this helps you.
