For any probability measure $\mu$ on $\mathbb R^2$ and $\theta\in [0,2\pi]$, denote by $\mu_\theta$ its projection along $v:=(\cos\theta,\sin\theta)$. Namely, if $X$ is a random variable distributed according to $\mu$, then $\mu_\theta:=\mbox{Law}(X\cdot v)$.
Assume that
- $\mu$ is given and admits a density function $f:\mathbb R^2\to\mathbb R_+$
- $m_1,\ldots m_n>0$ are fixed such that $\sum_k m_k=1$.
Define $G:(\mathbb R^2)^n\to\mathbb R_+$ as follows : For each $X=(x_1,\ldots, x_n)\in (\mathbb R^2)^n$,
$$G(X):=\int_0^{2\pi} \left(\int_0^1\Big | F_{\mu_\theta}^{-1}(t) -F_{\nu^X_\theta}^{-1}(t) \Big |^2 dt\right) d\theta,$$
where $\nu^X$ is the discrete measure defined by
$$\nu^X:=\sum_{k=1}^nm_k\delta_{x_k},$$
$F_{\mu_\theta}, F_{\nu^X_\theta}$ denote the cumulative distribution function of $\mu_\theta, \nu^Y_\theta$, and $F_{\mu_\theta}^{-1}, F_{\nu^X_\theta}^{-1}$ stand for their general (left-continuous) inverse.
Can we compute explicitly the partial derivative $\partial_{x_i} F(X)$ (which is a vector)?
PS : It appears that $G(X)=\int_0^{2\pi} g(X,\theta)d\theta$ for some $g$. Under mild conditions, for each $\theta$, $g(\cdot,\theta)$ is a.e. differentiable and we may exchange the integral and differentiation. However, the general inverse $F_{\nu^X_\theta}^{-1}$ depends on the order of the support ${x_1\cdot v, \ldots, x_n\cdot v}$ for $v=(\cos\theta,\sin\theta)$. This makes the calculus tough.