De fondo
notación: RV= variable aleatoria, $\mu=$ media $m=$ mediana
La Desigualdad de Jensen considera la relación entre la media de una función de un RV y la función de la media de un RV.
Si $f(x)$ estrictamente convexo:
$$\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)
Para un poco más complicado de la función, mi propuesta (ecuación 1) es verdadera
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))
Sin embargo, antes de comenzar a utilizar esta observación en mi trabajo, me gustaría saber más acerca de sus condiciones.
Referencias