# In the case of lognormal distribution, when can the median be more efficiently estimated than the mean?

I understand, that in the case of normal distribution, the estimation of the mean (from samples) is more efficient (i.e. of less risk), than the estimation of the median. According e.g. to this post, the median is 64% efficient as the mean.

How about a lognormal distribution with parameters $$\mu$$ and $$\sigma$$? The population mean is then

$$a = e^{(\mu + \frac12 \sigma^2)}$$

and the median

$$m=e^\mu$$ .

To be specific, let $$x_1,x_2,…, x_n$$ be a sequence of i.i.d. variables drawn from $$X$$ ~ $$logN(\mu, \sigma)$$. Define $$a_n = \frac1n ∑x_i$$, and $$m_n$$ to be the median of $${x_1,x_2,…x_n}$$. Which varies less around its respective true value: $$a_n$$ around $$a$$ or $$m_n$$ around $$m$$? Does the answer for the question depend on the sample size?

My guess is, that the answer depends on the value of $$\sigma$$. To go further, my simulations show, that for $$\sigma$$ < 0.5, the mean, for $$\sigma$$ > 0.5 the median is more efficient. Is there a proof for that?

n <- 10^6 #population size
mu.v <- 10^seq(from=-1 ,to=2,by=.5) #different values of mu
sig.v <- 10^seq(from=-2 ,to=1,by=.5) #different values of sigma

ss <- 10 #sample size

ar0 <- array(data=rep(NaN, length(mu.v)*length(sig.v)*2),
dim=c(length(mu.v),length(sig.v), 2),
dimnames=list(paste("mu=",mu.v),paste("sig=",sig.v),c("mean","medi")));
for (jmu in 1:length(mu.v)){
for (jsig in 1:length(sig.v)){
y <- exp(rnorm(n, mu.v[jmu],sig.v[jsig])) #generate random population

nr <- 1e2;  #num of runs
outtab <- matrix(data=NA,nrow=nr,ncol=2,dimnames=list(c(),c("dev_mean","dev_medi")))
for (jr in 1:nr) { #loop runs
y1 <- sample(y, size=ss,replace=TRUE)
outtab[jr,] <- c((mean(y1)-mean(y))^2 ,(median(y1)-median(y))^2)
}

ar0[jmu,jsig,1] <- (mean(outtab[,1]))^.5
ar0[jmu,jsig,2] <- (mean(outtab[,2]))^.5
}

write.csv(ar0[,,1],"mean.csv")
write.csv(ar0[,,2],"medi.csv")
}

• Can you add some examples of your simulations? Jan 8, 2020 at 12:56
• effiiciency is not really about converging faster but rather about variability of the estimate. for normal distributions, the mean is more efficient but less robust than the median. so there's robustness and efficiency which are two very different properties. usually, there's a tradeoff between the two. check out this link for a nice explanation. johndcook.com/blog/2009/03/06/… Jan 8, 2020 at 13:19
• @mlofton: thank you for the reference, I changed "converges faster" to "varies less". Jan 8, 2020 at 17:25
• Hi: maybe "converges faster" is not so bad terminology now that I think about it. but I would still read the link I sent. it explains things pretty nicely, albeit briefly. there is huge literature on efficiency and robustness including things like breakdown point, influence function etc. Google for those if you're interested. Jan 9, 2020 at 18:15

If the lognormal distribution has parameters $$\mu$$ and $$\sigma$$, with pdf $$f$$, then
\begin{align} Var[a_n] & =\frac{Var[X]}{n}=(e^{2\sigma^2}-e^{\sigma^2})\frac{e^{2\mu}}{n}\\ \\ Var[m_n] &\sim\frac{1}{4nf(m)^2}=\frac{\pi \sigma^2}{2}\frac{e^{2\mu}}{n}\\ \end{align} (The variance of the mean comes from the central limit theorem; the variance of the median comes from Laplace's asymptotic formula for the sampling distribution of the median.)
For large $$n$$ the mean has lower variance when $$Var[a_n], i.e. when $$2(e^{2\sigma^2}-e^{\sigma^2}) < \pi \sigma^2$$
So the mean has lower variance if $$\sigma<0.546$$ and the median has lower variance if $$\sigma>0.546$$.