Sufficient conditions for equal marginal medians Let $X, Y$ be dependent random variables taking values on the same set (either a finite set, an interval or the real line). I'd like to know if there's any condition on $P(Y|X)$ which ensures that
$$\text{median}(X) = \text{median}(Y).$$
Let me give an example of the type of conditions I'm looking for, but using the mean instead of the median. For the mean, if $\mathbb E(Y|X=x) = x$, $\forall x$, then
$$\mathbb E(Y) = \mathbb E(X).$$
Does something like this hold for the median?
EDIT: Let me give more context to the problem. Variable $X$ is a RV whose median I want to estimate. I have only access to noisy observations $y_i \sim  Y | X = x_i$. I would like to know in which cases one can estimate the median of $X$ as the median of $Y$.
For example, if $(X,Y)$ are jointly Gaussian, then $\text{median}(Y) = \text{median}(X)$. But this is too restrictive. In particular, I don't know much about the distribution of $X$. So I'm interested in knowing if there are conditions/properties of the noise distribution (the distribution of $Y|X$) that would justify estimating the $\text{median}(X)$ as the $\text{median}(Y)$, regardless of the distribution of $X$ (or for a general class of distributions for $X$).
 A: Suppose your distribution is jointly continuous with joint density $p_{X,Y}$.  Letting $m_X \equiv \text{median}(X)$ and $m_Y \equiv \text{median}(Y)$, the defining equation for these quantities is:
$$\frac{1}{2} = \int \limits_{-\infty}^\infty \int \limits_{-\infty}^{m_X} p_{X,Y}(x,y) \ dx \ dy = \int \limits_{-\infty}^{m_Y} \int \limits_{-\infty}^{\infty} p_{X,Y}(x,y) \ dx \ dy.$$
Any condition that renders $m_X = m_Y$ in this equation is a sufficient condition for equivalence of median.  One very strong sufficient condition is exchangeability (i.e., $p_{X,Y}(x,y) = p_{X,Y}(y,x)$ for all $x,y \in \mathbb{R}$), which would make all of the quantiles equal in both marginal distributions.  Weaker conditions exist, but they are not very illuminating, and I am not aware of any way of writing the conditions other than to say that $m_X = m_Y$ in the above equation.  You might be able to find a weaker sufficient condition by splitting the joint density into a marginal and conditional density and then imposing some form or condition on the latter.  The above definining equation should serve as a basis for that inquiry.
