Consider a family of smooth, atomless CDFs, $F\_x(\cdot)$, for each $x \in \mathbb R$. Suppose that $F\_x(\cdot)$ are FOSD ranked in $x$. That is, for any $x, x'$ such that $x \ge x'$, $F\_x(\cdot) \le F\_{x'}(\cdot)$.


Let $K > 0$ be a fixed scalar. I want to know whether there exists a function $g(\cdot)$ and a number $y^\*$ such that  

\begin{align\*}
g(y) =& 0 & \text{ if } y < y^\*\\ 
g(y) >& 0 & \text{ if } y \ge y^\*\\ 
\mathbb{E}\_{y}[g(\cdot)] =& K & \forall y \ge y^\*\\
\mathbb{E}\_{y}[g(\cdot)] \le& K & \forall y < y^\*
\end{align\*}
where $\mathbb E\_y[g(\cdot)] = \int\_{\mathbb R} g(\cdot) d F\_y(\cdot)$.


I primarily want to know what is the right language to pose such a question. What should I be looking at? Is it optimal transport or something?


Thanks!



Expectation of a function according to a family of distributions
$\newcommand\R{\mathbb R}$This is true for some first order stochastic dominance (FOSD) families but not all of them.


Indeed, if $F\_x$ does not depend on $x$ and $c:=E\_x1\_{[y\_\*,\infty)}>0$, then just let $g:=\dfrac Kc\,1\_{[y\_\*,\infty)}$.


On the other hand, suppose that $F\_x$ is the cdf of $Z+x$, where $Z$ is a standard normal random variable. Then the family $(F\_x)\_{x\in\mathbb R}$ is FOSD. Suppose now that there exist some real $K,y\_\*$ and some Lebesgue-measurable function $g$ such that $g=0$ on $(-\infty,y\_\*)$ and $g>0$ on $[y\_\*,\infty)$ such that
$$h(y):=E\_y g=K$$
for all real $y\ge y\_\*$. Then
$$K=h(y)=Eg(Z+y)=\int\_\R g(z+y)f(z)\,dz=\int\_\R g(u)f(y-u)\,du$$
for all $y\ge y\_\*$, where $f$ is the standard normal pdf. Since
$$f(z+t)=e^{-t^2/2}f(z)e^{-tz}, \tag{1}$$
the derivatives $h^{(k)}$ of all natural orders $k$ of the function $h$ exist and and for all $y>y\_\*$
$$0= h^{(k)}(y)=\int\_\R g(u)f^{(k)}(y-u)\,du=(-1)^k\int\_\R g(u)H\_k(y-u)f(y-u)\,du,$$
where the $H\_k$'s are the ["probabilist's" Hermite polynomials](https://en.wikipedia.org/wiki/Hermite_polynomials#Definition). So, by the [completeness property](https://en.wikipedia.org/wiki/Hermite_polynomials#Completeness) of the Hermite polynomials, the function $g$ must be constant, which contradicts the conditions that $g=0$ on $(-\infty,y\_\*)$ and $g>0$ on $[y\_\*,\infty)$. Thus, in this case no function $g$ with the desired properties exists. (This conclusion can also be obtained from (1) and the fact that, if the moment generating function (mgf) of a distribution is everywhere finite, then the distribution is characterized by the values of the mgf on any nonempty open interval -- cf. e.g. [this post](https://stats.stackexchange.com/a/297243/86566).)


(The condition that $E\_y g\le K$ for $y<y\_\*$ is redundant: it follows from the condition that $E\_y g=K$ for $y\ge y\_\*$ and the FOSD condition.)


