Background
notation: RV= random variable, $\mu=$ mean $m=$ median
Jensen's Inequality considers the relationship between the mean of a function of an RV and the function of the mean of an RV.
If $f(x)$ strictly convex:
$$\mu (f(x)) > f(\mu (x))\mathrm{\hspace{20mm}(1)}$$
Conversely if -f(x) is strictly convex:
$$\mu (f(x)) < f(\mu (x))$$
An analogous property of the median has been presented (Merkle et al 2005, pdf).
motivation
I have a nonlinear function of positive random variables.
In practice, I find that the function of the medians provides a much better estimate of the median of the function than does the estimate of the mean of the function from the function of the means. I am interested in learning the conditions for which this is true.
question
Under what conditions will the function of a median be closer to the median of a function than the mean of a function is to a function of the mean?
Specifically for what types of $f(x)$ and $x$ is
$$\mu (f(x)) - f(\mu (x)) > m (f(x)) - f(m (x))$$
simulation results
I used an empirical approach (the one I know) to investigate this question for a function of a single variable:
Interestingly, for $x>0$,
$$m(x^2)\simeq m(x)^2$$
set.seed(1)
x<-cbind(rlnorm(100, 1), rbeta(100, 1, 5), rgamma(100,0.5,0.5))
quad <- function(x)x^2
median.x <- apply(x,2,quantile,0.5)
mean.x <- apply(x,2,mean)
colMeans(quad(x))
quad(mean.x)
apply(quad(x), 2, quantile, 0.5)
quad(median.x)
For a slightly more complicated function, my proposal (equation 1) is true
miscfn <- function(x) 1 + x + x^log(x^2) - exp(-2(x)*5^x
colMeans(miscfn(x))
miscfn(mean.x)
apply(miscfn(x), 2, quantile, 0.5)
miscfn(median.x)
abs(apply(miscfn(x),2,mean)-miscfn(mean.x)) > abs(apply(miscfn(x), 2, quantile, 0.5) - miscfn(median.x))
However, before I begin to use this observation in my work, I would like to know more about its conditions.
References