[guided]For each $N$, let $(\Omega_N,\mathcal{F}_N,\mathbb{P}_N)$ be the probability space carrying the triangular-array sample at level $N$. The sample sizes are denoted by $m_N$ and $n_N$, and they satisfy $N=m_N+n_N$. The random variables $X_{N,1},\dots,X_{N,m_N}:\Omega_N\to\mathbb{R}$ have distribution function $F$, while $Y_{N,1},\dots,Y_{N,n_N}:\Omega_N\to\mathbb{R}$ have distribution function $y\mapsto F(y-\theta_N)$; the two samples are independent. For the one-pair comparison calculation, we use an auxiliary probability space $(\Omega,\mathcal{F},\mathbb{P})$ carrying independent real-valued variables with the required one-dimensional laws. The statistic $U_{m_N,n_N}$ counts ordered cross-sample pairs for which the $X$ observation is smaller than the $Y$ observation. Because every pair has the same distribution, linearity of expectation reduces the mean of the whole statistic to one comparison probability.
Let $\mathcal{L}^1$ denote one-dimensional Lebesgue measure on $\mathbb{R}$, and let $\mathcal{L}^2$ denote two-dimensional Lebesgue measure on $\mathbb{R}^2$. For a shift parameter $\theta\in\mathbb{R}$, define $Y_\theta:\Omega\to\mathbb{R}$ to have distribution function $y\mapsto F(y-\theta)$. Since $F$ is absolutely continuous with density $f$, the shifted density is the measurable map $f_\theta:\mathbb{R}\to[0,\infty)$ defined by $f_\theta(y)=f(y-\theta)$. Let $X:\Omega\to\mathbb{R}$ have distribution function $F$, independently of $Y_\theta$. The laws of $X$ and $Y_\theta$ are absolutely continuous, so their product law is absolutely continuous with respect to $\mathcal{L}^2$. Because the diagonal $D:=\{(x,y)\in\mathbb{R}^2:x=y\}$ has $\mathcal{L}^2(D)=0$, ties have probability zero, and the strict comparison $X<Y_\theta$ has no boundary correction.
Define $p:\mathbb{R}\to[0,1]$ by $p(\theta)=\mathbb{P}(X<Y_\theta)$.
Conditioning on the value of $Y_\theta$ and using its density gives
\begin{align*}
p(\theta)
=\int_{\mathbb{R}}\mathbb{P}(X<y)\,f_\theta(y)\,d\mathcal{L}^1(y)
=\int_{\mathbb{R}}F(y)f(y-\theta)\,d\mathcal{L}^1(y).
\end{align*}
Now apply the translation substitution $x=y-\theta$. The one-dimensional [Lebesgue measure is translation invariant](/theorems/4911), so $d\mathcal{L}^1(y)=d\mathcal{L}^1(x)$, and the domain $\mathbb{R}$ is unchanged under translation. Hence
\begin{align*}
p(\theta)=\int_{\mathbb{R}}F(x+\theta)f(x)\,d\mathcal{L}^1(x).
\end{align*}
Finally, by linearity of expectation and the identity $\mathbb{E}[\mathbb{1}_A]=\mathbb{P}(A)$ for an event $A$,
\begin{align*}
\mathbb{E}[U_{m_N,n_N}]=\sum_{i=1}^{m_N}\sum_{j=1}^{n_N}\mathbb{E}[\mathbb{1}_{\{X_{N,i}<Y_{N,j}\}}]=\sum_{i=1}^{m_N}\sum_{j=1}^{n_N}\mathbb{P}(X_{N,i}<Y_{N,j})=m_Nn_N\,p(\theta_N).
\end{align*}
At the null shift $\theta=0$, the two variables are independent and identically distributed with continuous distribution function $F$, so symmetry gives
\begin{align*}
\mathbb{P}(X<Y_0)=\mathbb{P}(Y_0<X).
\end{align*}
Since ties have probability zero, these two probabilities sum to $1$, and therefore
\begin{align*}
p(0)=\frac{1}{2}.
\end{align*}[/guided]