MLE of a function involving laplace distribution

353 Views Asked by At

I have the following function involving a Laplace distribution

$L(\theta) = z\log(\pi) + 2\sum\limits_m \log{\frac{1}{2\beta}\exp(-\frac{|\pi-y_m|}{\beta}})$

and I have to maximize it with respect to $\pi$.

My attempt was:

$\frac{\partial L(\theta)}{\partial \pi} = \frac{z}{\pi} - \frac{2}{\beta}\sum\limits_m \frac{(\pi - y_m)}{|\pi - y_m|} = \frac{z}{\pi} - \frac{2}{\beta}\sum\limits_m sgn(\pi - y_m) = 0$

And solving for $\pi$ yields:

$\pi = \frac{z\beta}{2\sum\limits_m sgn(\pi - y_m)}$

As far as I know, the $sgn$ function is defined as:

$sgn(x) = \begin{cases} -1, \text{if x < 0}\\ 0, \text{if x = 0}\\ 1, \text{if x > 0} \end{cases}$

so the term $\sum\limits_m sgn(\pi - y_m)$ is just a number. But on the other hand, I also know that the MLE estimate of the $\mu$ parameter of the Laplace distribution ($\pi$ in my case since it acts as the mean) is the sample $median$, which I don't know if I have to introduce it by some term.

So I am confused about my optimization. Is it correct? Should I consider the $median$ in some place? If so, where?

Thanks