# Random variables, inequalities involving them and medians thereof

I have three facts which I know to be true and I am wondering if together they logically imply a fourth one (or not!).

1. Consider $$F_x$$ and $$G_y$$ two continuous, uni-modal distributions on $$\mathbb{R}$$ and two random variables $$X$$ and $$Y$$ with $$X\sim F_x$$ and $$Y\sim G_y$$. I have two continuous functions $$a:\mathbb{R}\to\mathbb{R}_+$$ and $$b:\mathbb{R}\to\mathbb{R}_+$$ that only cross each other once.
2. Consider $$S_x$$ and $$S_y$$ two subsets of $$\mathbb{R}$$: $$\int_{S_x}f_x(x)dx>1/2$$ and $$\int_{S_y}g_y(y)dy>1/2$$.
3. I also know that $$\forall x\in S_x$$ and $$\forall y\in S_y$$ it holds that: $$a(x)-b(x)

Now, do 1-2-3 above imply that:

$$\mbox{med}_{X\sim F_x}(a(X)-b(X))\leq\mbox{med}_{Y\sim G_y}(a(Y)-b(Y))$$

# Edit:

$$X$$ and $$Y$$ are independent random variables. $$S_x$$ and $$S_y$$ are compact sets.

There are some distractions in the problem statement, so I have taken the opportunity to clean it up and simplify it. In so doing some conditions were relaxed, thereby generalizing the situation. (It appeared necessary to assume the function $a-b$ is measurable, though.)

The result comes down to this: if you know that more than half the probability of one random variable ($u(X)$) is concentrated among small numbers and more than half the probability of another random variable ($u(Y)$) is concentrated among larger numbers, then you can conclude that the median of the first does not exceed the median of the second. If that's not completely obvious, then read on.

Let $F$ and $G$ be any distributions (instead of $F_x$ and $G_y$, but without their restrictions). Let $u:\mathbb{R}\to \mathbb{R}$ be any measurable function (playing the role of $a-b$, but without any restrictions). Let $X\sim F$ and $Y\sim G$ be independent random variables. Suppose there exist any sets $S_F$ and $S_G$ (compact or not) such that

1. $\Pr(X\in S_F) \gt 1/2 \lt \Pr(Y\in S_G)$ and

2. $\sup(u(S_F)) \le \inf(u(S_G))$.

The question asks whether we can conclude $\newcommand{\m}{\text{med}} \m(u(X)) \le \m(u(Y))$.

To address this, pick $\lambda$ with $\sup(u(S_F)) \le \lambda \le \inf(u(S_G))$ and note that (2) implies

$$\{x\,|\, u(x) \le \lambda\} \supset S_F.$$

Therefore, by taking probabilities and applying (1),

$$\Pr(u(X) \le \lambda) \ge \Pr(X \in S_F) \ge 1/2.$$

It is immediate that $\m(u(X)) \le \lambda$.

The counterpart of this argument for $Y$ shows $\m(u(Y)) \ge \lambda$.

Together these results entail $\m(u(X))\le \lambda \le \m(u(Y))$, QED.

• Thank! Unfortunately in my problem, $S_x$ and $S_y$ overlap and I cannot guarantee that $\sup(u(S_F))\leq\inf(u(S_G))$. – user603 Mar 18 '15 at 10:52
• Any overlap flatly contradicts your assumption (3), which asserts that $u(x) \lt u(y)$ for all $x\in S_x$ and all $y\in S_y$. – whuber Mar 18 '15 at 14:01
• Of course! Sorry for the dumb comment. – user603 Mar 18 '15 at 21:32
• It's not dumb, but it does raise the issue of which of those two contradictory conditions has to be relaxed. I adopted the first one you wrote without seriously considering the edit, which added the second (overlap) condition. If it is indeed the case that $S_x$ and $S_y$ overlap, then it might be difficult to conclude anything at all unless you can somehow quantify the amount of overlap in relation to $F$, $G$, $a$, and $b$. – whuber Mar 18 '15 at 21:43
• The first condition was the one I had in mind. Trying to translate your solution back to my original problem, I stumbled on a contradiction. I now see that I had left an important condition from my problem out in an attempt to simplify the statement. – user603 Mar 18 '15 at 21:46