I know a median is $$\frac{1}{2} = \int_{-\infty}^{\mu} f(x)dx$$ I understand how to solve this for simple distributions. However, I am learning how to do it for iid samples, which I haven't done before. In this current case, I have iid $X_1,...,X_n$ where they have a distribution $$\frac{1}{2b}e^{-|x_i-\theta|/b}$$ Note, assume $n = 2m+1$, $m\in \Bbb N$.

I calculated the MLE for this set of samples and want to now show the median is equal to $\hat{\theta}$

My Question:

How do I find the median of iid samples with a a Laplace distribution?

I know for an abstract discrete set of samples like $X_1,...,X_n$ I can order them like $X_{(1)},...,X_{(n)}$ from smallest to largest. I know my median should be some value like $X_{(m+1)}$. But I don't really understand how the Laplace distribution fits into that. To find the median for a Laplace distribution, I would think I could just use that integral formula. But that doesn't make sense if I am considering a discrete set of samples. In short, I think I am confusing finding the median of a distribution with finding the median for a set of iid samples with the same distribution. And I can't figure out what to do.

  • 3
    $\begingroup$ For the Laplace distribution you find the sample median the same way you find the sample median for any other distribution :). That is, by ordering the observations and picking the middle order statistics. The sample median is then consistent for the population median. This means that if your sample grows without bound the probability that these two are arbitrarily close to each other, goes to $1$. $\endgroup$
    – JohnK
    Feb 17, 2016 at 0:32
  • 1
    $\begingroup$ Are you calculating a sample median (in which case, it doesn't matter what distribution the sample was drawn from) or finding the distribution of the sample median? $\endgroup$
    – Glen_b
    Feb 17, 2016 at 2:00
  • $\begingroup$ I am calculating a sample mean (I think). As I mentioned, I showed $\hat{\theta} = \bar{x}$, so now I want to show the median equals this as well. $\endgroup$ Feb 17, 2016 at 2:50
  • $\begingroup$ The only way you can "show" that a sample median equals its mean is to calculate them both. This has nothing to do with the Laplace distribution (or any other distributional assumption). $\endgroup$
    – whuber
    Feb 17, 2016 at 16:37
  • $\begingroup$ How do you calculate the median for such a distribution then? $\endgroup$ Feb 17, 2016 at 16:59

1 Answer 1


For a Laplacian distribution $\frac 12\exp(-|x-\theta|)$ with unknown mean (and median) $\theta$, the likelihood function of $n = 2m+1$ samples is $$L(\theta; x_1, x_2, \ldots, x_n) = \left(\frac 12\right)^n \prod_{i=1}^n \exp(-|x_i-\theta|) = \left(\frac 12\right)^n \exp\left(-\sum_{i=1}^n |x_i-\theta|\right).$$ The maximum value of $L$, regarded as a function of $\theta$, occurs at that point where $\sum_{i=1}^n |x_i-\theta|$ has minimum value. But, this function is a continuous piecewise linear function with slope $2i-n$ for $\theta \in (x_{(i)}, x_{(i+1)})$ where $x_{(i)}$ is the $i$-th order statistic of the data. Thus, the slope is negative for $\theta < x_{(m+1)}$ (where $x_{(m+1)}$ is the median of the $n=2m+1$ sample values) and positive for $\theta > x_{(m+1)}$. That is, the MLE estimator for $\theta$ which is the mean as well as for the median is $x_{(m+1)}$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.