They introduce a new correlation. For $\pi\in \Pi(\mu,\nu)$ the set of coupling of two probability measures $\mu$ and $\nu$ on a Polish space $(X,d)$. The author introduces a plugin estimator.


Question: How to understand $\hat{\pi}$?




---


For the estimator of the denominator, I use the same notation as the answer.


\begin{equation\*}
 D(\hat{\pi})=\sum\_{y,z}d(y,z)\hat{\pi}\_2(\{y\})\hat{\pi}\_2(\{z\})
 =\sum\_{y,z}d(y,z)\frac{1}{N^2}\sum 1[\phi(Y\_n)\in\{y\}]\sum 1[\phi(Y\_m)\in\{z\}]
\end{equation\*}
Expand the product of these two summation,
$$
=\frac{1}{N^2}\sum\_{y,z}d(y,z)(\sum\_{i=1}^N 1[\phi(Y\_i)\in\{y\}]1[\phi(Y\_i)\in\{z\}]+\sum\_{i\neq j}1[\phi(Y\_i)\in\{y\}]1[\phi(Y\_j)\in\{z\}] )
$$



How to get the estimator?
$\newcommand{\de}{\delta}$We have
\begin{equation\*}
 W(\pi):=\frac{N(\pi)}{D(\pi)}, \tag{1}\label{1}
\end{equation\*}
where
\begin{equation\*}
 N(\pi):=\int W\_1(\pi\_{x\_1},\nu)\mu(dx\_1)=\int W\_1(\pi\_{x\_1},\pi\_2)\pi\_1(dx\_1), 
\end{equation\*}
\begin{equation\*}
 D(\pi):=\int d(y,z)\nu(dy)\nu(dz)=\int d(y,z)\pi\_2(dy)\pi\_2(dz), 
\end{equation\*}
$\pi\_{x\_1}$ is the conditional distribution of $\eta$ given $\xi=x\_1$ if the joint distribution of a pair $(\xi,\eta)$ of random variables is the measure $\pi$ with marginals $\mu=\pi\_1$ and $\nu=\pi\_2$.


The standard notation $\de\_a$ is for the Dirac delta measure supported on the singleton set $\{a\}$. So,
\begin{equation\*}
 \hat{\pi}:=\frac1N\,\sum\_{i=1}^N \de\_{(\phi(X\_i),\,\phi(Y\_i))}
\end{equation\*}
is the (random) probability measure such that
\begin{equation\*}
 \hat{\pi}(A)=\frac1N\,\sum\_{i=1}^N 1((\phi(X\_i),\,\phi(Y\_i))\in A) \\ 
 =\frac1N\,\sum\_{i=1}^N |\{i\in\{1,\dots,N\}\colon (\phi(X\_i),\,\phi(Y\_i))\in A\}|
\end{equation\*}
for any Borel set $A\in[0,1]^2$. Here $1(\mathcal A)$ is the indicator of an assertion $\mathcal A$, so that $1(\mathcal A)=1$ if $\mathcal A$ is true and $1(\mathcal A)=0$ if $\mathcal A$ is false.


Then for the first marginal $\hat\pi\_1$ of $\hat\pi$ and each $x\_1\in X=[0,1]$ we have
\begin{equation\*}
 \hat\pi\_1(\{x\_1\})=\frac1N\,\sum\_{i=1}^N 1(\phi(X\_i)\in \{x\_1\}) \\ 
 =\frac1N\,\sum\_{i=1}^N 1(X\_i\in\phi^{-1}(\{x\_1\}))
 =\frac1N\,\sum\_{i=1}^N 1(X\_i\in G)
\end{equation\*}
for $G=\phi^{-1}(\{x\_1\})$,
and for the conditional distribution $\hat\pi\_{x\_1}$ of $\eta$ given $\xi=x\_1$ if the joint distribution of a pair $(\xi,\eta)$ is $\hat\pi$ we have
\begin{equation\*}
\hat\pi\_{x\_1}(B)=\frac{\hat\pi(\{x\_1\}\times B)}{\hat\pi(\{x\_1\}\times X)}, \tag{2}\label{2}
\end{equation\*}
where $B$ is any Borel subset of $X=[0,1]$; if the denominator of the ratio in \eqref{2} is $0$, let $\hat\pi\_{x\_1}$ be an arbitrary probability measure. Next,
\begin{equation\*}
 \hat\pi(\{x\_1\}\times B)=\frac1N\,\sum\_{i=1}^N 1(\phi(X\_i)=x\_1,\,\phi(Y\_i)\in B) \\ 
 =\frac1N\,\sum\_{i=1}^N 1(X\_i\in\phi^{-1}(\{x\_1\}),\,\phi(Y\_i)\in B). 
\end{equation\*}
So, for $G=\phi^{-1}(\{x\_1\})$,
\begin{equation\*}
\hat\pi\_{x\_1}(B)=\hat\pi\_G(B):=\frac{\frac1N\,\sum\_{i=1}^N 1(X\_i\in G,\,\phi(Y\_i)\in B)}
 {\frac1N\,\sum\_{i=1}^N 1(X\_i\in G)}. \tag{3}\label{3}
\end{equation\*}


So,
\begin{equation\*} 
\begin{aligned}
 N(\hat\pi)&=\int W\_1(\hat\pi\_{x\_1},\hat\pi\_2)\hat\pi\_1(dx\_1) \\ 
 &=\sum\_{x\_1} W\_1(\hat\pi\_{x\_1},\hat\pi\_2)\hat\pi\_1(\{x\_1\}) \\ 
& =\sum\_{G\in \Phi} W\_1(\hat\pi\_G,\hat\pi\_2)\frac1N\,\sum\_{i=1}^N 1(X\_i\in G) \\ 
& =\sum\_{G\in \Phi} \frac{1}{N}|i\in\{1,\dots,N\}\ \text{s.t.}\ X\_i\in G|\, 
W\_1(\hat{\pi}\_G,\hat{\pi}\_2). 
\end{aligned}
\end{equation\*}


Also, if $d$ is the standard metric over $[0,1]$, then, as you have it in your "new edition",  

\begin{equation}
\begin{aligned}
 D(\hat\pi)&=\int|y-z|\hat\pi\_2(dz)\hat\pi\_2(dz) \\ 
 &=\sum\_{y,z}|y-z|\hat\pi\_2(\{y\})\hat\pi\_2(\{z\}) \\ 
 &=\sum\_{y,z}|y-z|\frac{1}{N^2}\sum\_{n,m=1}^N 1(\phi(Y\_n)=y,\phi(Y\_m)=z) \\ 
 &=\frac{1}{N^2}\sum\_{n,m=1}^N \sum\_{y,z}|y-z|1(\phi(Y\_n)=y,\phi(Y\_m)=z) \\ 
 &=\frac{1}{N^2}\sum\_{n,m=1}^N |\phi(Y\_n)-\phi(Y\_m)|. 
\end{aligned}
\end{equation}


So,
\begin{equation\*}
 W(\hat\pi):=\frac{N(\hat\pi)}{D(\hat\pi)}
 =\frac{\sum\_{G\in \Phi} \frac{1}{N}|i\in\{1,\dots,N\}\ \text{s.t.}\ X\_i\in G|\, W(\hat{\pi}\_G, \hat{\pi}\_2)}{\frac{1}{N^2}\sum\_{n,m=1}^N|\phi(Y\_n)-\phi(Y\_m)|} 
\end{equation\*}
is a plug-in estimator of $W(\pi)$.


