# Determine the maximum-likelihood estimation for $\lambda$

$X_1,\ldots,X_n$ are observations of a population with density $f(x)=\frac{1}{2}\left\{\begin{matrix} \lambda e^{\lambda x} \;\,\text{ if } x<0\\ \lambda e^{-\lambda x} \text{ if } x \geq 0 \end{matrix}\right.$

where parameter $\lambda$ is unknown. Determine a maximum-likelihood estimation for $\lambda$.

In my last question I try to solve the problem with another method (method of moment estimation: Given is a density.. Determine a method of moment for $\lambda$) I don't know if I do it correct but this time I like to know how can you do it correct with maximum-likelihood? Because I write test soon and I want use a reliable method but not sure how you use maximum-likelihood for this example?

I think the method allow us to see the density as function of $\lambda$ which we are looking for, that why we can write as likelihood function

$$L(\lambda) = \prod_{i=1}^{n}f_{X_i}(x_i;\lambda)$$

Now need to maximize this based on $\lambda$ so we get maximum-likelihood estimation for $\lambda$ if I understand wikipedia article correct till here.

But I don't understand how we do this here and use the formula? We need derive for $\lambda$ and set it equal to zero but no idea how you can apply this here... : /

• Hint: sort the $x_i$ into those that are positive and those that are negative. The likelihood function then becomes the product of terms of the form $\frac 12\exp(-\lambda |x_i|)$ and of the form $\frac 12\exp(-\lambda |x_j|)$. – Dilip Sarwate Jan 28 '18 at 23:07
• @DilipSarwate: missing a $\lambda$? As in $\frac 12\lambda\exp(-\lambda |x_i|)$ – Henry Jan 29 '18 at 0:42
• @Henry Yes, I am missing $\lambda$, Sorry about that. – Dilip Sarwate Jan 29 '18 at 21:01

## 1 Answer

\begin{align} L(\lambda) & \propto \lambda^n \prod_{i=1}^n e^{-\lambda |x_i|} \\[10pt] \ell(\lambda) = \log L(\lambda) & = n\log\lambda - \lambda \sum_{i=1}^n |x_i| + \text{constant} \\[10pt] \ell\,'(\lambda) & = \frac n \lambda - \sum_{i=1}^n |x_i| \quad \begin{cases} >0 & \text{if } \lambda < \text{something}, \\ <0 & \text{if } \lambda > \text{something.} \end{cases} \end{align}