Stochastically dominating variables with same expectation Consider the random variables $X, Y$ with distributions $F_X, F_Y$ which satisfy $F_X(t) \leq F_Y(t), \; \forall t$. Additionally, we know $X, Y \geq 0$. The aim is to show that $\mathbb{E}(X) = \mathbb{E}(Y) \Rightarrow F_X(t) = F_Y(t), \forall t$.
My attempt:
Since $X, Y$ are positive, we may write $\mathbb{E}(X) = \int_{\mathbb{R}_+}
\mathbb{P}(X \geq t) \text{d} t$, likewise for $Y$, so we obtain
$$
\mathbb{E}(X) - \mathbb{E}(Y) = \int_{\mathbb{R}_+} F_Y(t) - F_X(t) \text{d} t
$$
Now, I consider the following partition of $\mathbb{R}_+$, defining
$D = \left\{ t : F_Y(t) > F_X(t) \right\}$ and have
$$
0 = \mathbb{E}(X) - \mathbb{E}(Y) = \int_D F_Y(t) - F_X(t) \text{d}t +
\int_{D^c} F_Y(t) - F_X(t) \text{d} t =
\int_D \underbrace{F_Y(t) - F_X(t)}_{> 0} \text{d} t
$$
Clearly, from the above we must have  $F_Y(t) > F_X(t)$ on a set of measure $0$, otherwise $\int_D F_Y(t) - F_X(t) dt > 0$. However, the problem asks to conclude that $F_X(t) = F_Y(t)$ everywhere. How does one go from almost everywhere to everywhere in this situation?
 A: $g(t)=F_Y(t)-F_X(t)$ is a non-negative measurable function whose integral over $\mathbb R^{+}$ is zero. This implies that $g(t)=0$ almost everywhere. In turn this implies that it is zero on a dense subset of $\mathbb R^{+}$. Since $g$ is right continuous it follows that $g(t)=0$ for all $t$. [Details: if $A$ has Lebesgue  measure 0 then $A^{c}$ is dense because no open interval can be contained in $ A$. Given any $t$ we can choose a sequence from this dense set  which decreases to $t$ and right continuity can be applied to complete the proof].
A: Your argument works for $X,Y \geq 0$. There is also a coupling argument, which works regardless of whether or not $X,Y \geq 0$.
Let $G_X$ and $G_Y$ denote the generalized inverses of $F_X$ and $F_Y$, respectively. So, $G_X(z) = \inf\{ t \geq 0: F_X(t) \geq z\}$, for $z \in [0,1]$, and similarly for $G_Y$.
You can check that $G_X(z)\leq t$ iff $ z \leq F_X(t)$ for $z \in [0,1]$ and $t \in \Bbb R$. Thus, if $U$ is uniformly distributed on $[0,1]$ then $X':=G_X(U)$ has the same distribution as $X$, and $Y':=G_Y(U)$ has the same distribution as $Y$. 
Since $F_X \leq F_Y$, we know that $G_X \leq G_Y$ and thus $X' \leq Y'$. Hence $E[X'] \leq E[Y']$, i.e., $E[X] \leq E[Y]$. If equality holds, then $Y'-X'$ is a nonnegative r.v. with expectation $0$, thus $Y'=X'$ a.s., so that $F_X(t) = P(X' \leq t) = P(Y' \leq t) = F_Y(t)$. 
