# How does the median change when the underlying variable changes

Suppose that a random variable $X \in [0,1]$ is drawn according to the density $f(x|\theta)$ conditional on the realization of $\theta \in [0,1]$. From $x$, we can generate $c$ according to some rule $c=g(x)$. We have know that $g$ is one-to-one. This procedure will give a distribution of $c$ given a realization of $\theta$. Now consider a median of $c$ and how the median of $c$ changes when $\theta$ changes. Under what condition on $f$ can it be that the median of $c$ is distinct for each $\theta$ (or at least there is only a measure zero set of $\theta$ that will give the same median of $c$.

-

For every $\theta$, the median is $g(y_\theta)$ where $y=y_\theta$ solves the equation $$\displaystyle\int_0^yf(x|\theta)\mathrm{d}x=\frac12.$$ Introducing a random variable $X_\theta$ with density $f(\ |\theta)$, this reads as $P(X_\theta\le y_\theta)=\frac12$. A way to ensure that $\theta\mapsto g(y_\theta)$ is one-to-one is to ask that $g$ is strictly monotonic, say increasing, and that $\theta\mapsto y_\theta$ is increasing as well. One can ensure this last property by requiring that the family $(X_\theta)$ is stochastically increasing.
Recall that one says that two random variables $U$ and $V$ are such that $V$ stochastically dominates $U$ if $P(V\le w)\le P(U\le w)$ for every $w$. In words, $V$ is small less often than $U$ is, so this relation is indeed a way of specifying that $V$ is larger than $U$, in some sense.
Coming back to your setting, one asks that for every parameters $\theta<\lambda$ and every $x$ in $(0,1)$, $P(X_\lambda\le x)<P(X_\theta\le x)$ (note the strict inequality signs and that one excludes the cases $x=0$ and $x=1$). A way to know this holds is to build some random variables $\tilde X_\theta$ and $\tilde X_\lambda$ on the same probability space such that $\tilde X_\theta$ is distributed like $X_\theta$, $\tilde X_\lambda$ is distributed like $X_\lambda$ and $\tilde X_\theta <\tilde X_\lambda$ with probability $1$.
Thank you. But I need this property to hold not only for a monotone $g$ but also for every $g$. On the other hand, it does not have to be that median is increasing in $\theta$. – Thales Apr 3 '11 at 5:51