# Why is the CI in the median larger then the CI in the mean?

if I generate sample of normally distributed values (N=100, Mean of 10, STD 2.5) Then I calculate the mean with confidence intervals and the median with confidence intervals of the sample I get: A mean from 9.67 to 10.67 at the 95% CI and a median that is from 9.28 to 10.99 at the 95% CI. Conceptually I am having trouble with this as I always think of the median as more robust, why is its CI larger in the case of the normal distribution. Can somebody explain why the median CI is larger than the mean confidence Interval even though the median is more robust?

• related – user603 Mar 12 '15 at 14:31

The mean is an ordinary least squares estimator, and so it's BLUE - it's the best linear unbiased estimator. Best, in this case means that it has the smallest sampling variance of any unbiased estimator (including the median).

Another way to think about it is that the mean uses all of the information available in the sample, the median is just one value.

Another way to look at it is to run a simulation, calculating the median and mean for a large number of samples, and to look at their standard deviation:

> sd(tapply(runif(100000), rep(1:1000, 100), mean))
[1] 0.02935391
> sd(tapply(runif(100000), rep(1:1000, 100), median))
[1] 0.04848859


The mean has a smaller variance (sd), which means it has narrower confidence intervals.

• In dropping an important adjective, I think you might have made a logical mistake: the median is not a linear estimator, so it does not follow that the mean has smaller sampling variance. In fact, any distibution with sufficiently large density near its median will have a smaller dispersion of its sampling distribution. An extreme example is a Cauchy (Student $t_1$) distribution, where the sampling variance of the mean is infinite but the sampling variance of the median is finite. This suggests the "all the information" argument may be fundamentally incorrect, too. – whuber Mar 12 '15 at 16:38