Skip to main content
4 of 8
added 50 characters in body
Tim
  • 141.2k
  • 26
  • 270
  • 512

Median may be more robust than mean, but this does not make it robust for such extreme cases like sample consisting of single datapoint.

Let's get more general for a moment, $p$ quantile (median is $p=0.5$ quantile) of distribution is the value $x$ such that

$$ \Pr(X \leq x) = p $$

Sample quantiles are estimated using ordered sample

$$ x_1 \le x_2 \le \dots \le x_n $$

where median is the middle value of such sample (there are different ways how to define it precisely, see Hyndman and Fan, 1996). For sample of size one median can be defined as the data point, but notice that the same point is also the minimal $x_1$ and maximal value $x_n$ of this sample, so it does not tell us much.

With larger sample size you could estimate confidence intervals for median to have better understanding of uncertainty of the estimate. However the intervals are also defined in terms of order statistics, so this won't be helpful. What you can do with single value is to compute confidence intervals for mean, e.g. $95\%$ interval would be

$$ x \pm 9.68 |x| $$

As you can see, the intervals are pretty wide. We cannot get narrower intervals since the sample size is extremely small, what leads to greater uncertainty about the mean. If you can make distributional assumptions, you could try to get more precise intervals. If you have a priori knowledge about your problem you could try Bayesian approach with informative priors.

Another thing that you can do is to find sample size that enables you to estimate median with enough precision. If you think of this problem the other way around, we want $np$ out of $n$ values of $X$ be smaller or equal than $x$ where $p=0.5$. This makes $X$ follow binomial distribution with parameters $n$ and $p$. Wald confidence interval for $p$ can be easily calculated as $p \pm z_{\alpha/2} \sqrt{p(1-p)/n}$ (but see here, here, and Brown and DasGupta, 2001). The interval can be used to find such value of $n$ that would make the interval acceptably narrow. The interval would tell us if $p$ is close enough to $0.5$ (that it is really a median). (Notice that for $n=1$ the confidence interval yields improper values that fall beyond the $[0,1]$ interval for $p$ and Wald's method should be used for samples of at least five.)


Hyndman, R. J., & Fan, Y. (1996). Sample quantiles in statistical packages. The American Statistician, 50(4), 361-365.

Brown, L. D., Cai, T. T., & DasGupta, A. (2001). Interval estimation for a binomial proportion. Statistical science, 101-117.

Tim
  • 141.2k
  • 26
  • 270
  • 512