TITLE: Finding the maximum likelihood estimator
QUESTION [15 upvotes]: Find the MLE of the unknown parameter $\theta$ when $X_1,X_2,...,X_n$ is a sample from the distribution whose density function is: $$f_X(x) = \frac12e^{-|x-\theta|}, -\infty<x<\infty$$
What I did so far:
$$\text{maximize }(\frac12)^ne^{-|x_1-\theta|-|x_2-\theta|-...-|x_n-\theta|} \\
\text{thus we want to minimize }|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|$$
Since $|x_i-\theta|$ is positive for all $i$, we want to solve for $\theta$ so:
$$|x_1-\theta|+|x_2-\theta|+...+|x_n-\theta|=0$$
What do I do from here?

REPLY [3 votes]: Another approach is using absolute value inequality.
Since $|a| + |b| \ge |a-b|$, and the equal sign holds only when $a \cdot b \leq 0$,
Let $x_i$ has an order from smallest $x_i$ to largest $x_n$.
If $n$ is an odd number, denote $m=\frac{n+1}{2}$.
\begin{align*}
\sum_{i=1}^{n} |x_i - \theta|
& \ge |x_n - \theta - (x_1 - \theta)| + |x_{n-1} - \theta - (x_2 - \theta)| \\
& \qquad+ \cdots +|x_{m+1} - \theta - (x_{m-1} - \theta)| + |x_m - \theta| \\
& = \sum_{i=1}^{m-1} |x_{n+1-i} - x_{i}| + |x_m - \theta|
\end{align*}
The condition that holds the equal sign is $(x_{n+1-i} - \theta) \cdot (x_i - \theta) \le 0$ for all $i = 1, \cdots, m-1$.
So $x_{m-1} \le \theta \le x_{m+1}$, and in order to achieve the minimum of the last term in the inequality we set $\theta = x_m$.
The case when $n$ is an even number is similar, and $\theta$ can be any number between $x_m$ and $x_{m+1}$ where $m = \frac{n}{2}$.