When I read a paper from Rothman and Woodroofe (1972) for testing symmetry, they used the following form:
$$ R_n = \int_0^1 n \left[\hat{F}_n (x) + \hat{F}_n (-x) - 1 \right]^2 dF_n$$ where $ 2\hat{F_n}(x) = F_n(x+0) + F_n(x-0) $ for any $x \in \mathbb{R}$ and $F_n$ be the sample distribution.
However, they directly claimed without proof that there is another alternate form:
$$ R_n = \sum_{j=1}^n \left[ U_{(j)} - \frac{2n-2j+1}{2n} \right]^2 $$ where $U_{(j)} = \hat{F}_n (-X_{(j)})$ are the ordered random variables.
Could anyone help me to prove this statement? I still do not know how to transform the integral as a sum here.