Consider the regression model: $y_i = bx_i + e_i,\quad 1 ≤ i ≤ n$,
Suppose that $x_i$’s take values −1 or +1 and $e_i$’s have density $f(t) ={\frac{1}{2}}e^{−|t|}, t \in \mathbb{R}$.
Find the maximum likelihood estimator of $b$.
Therefore $\; y_i-bx_i \sim \epsilon \quad \text{,which follows}\quad f(t) ={\frac{1}{2}}e^{−|t|}\\ \therefore f(y,b,x_i)= {\frac{1}{2}}e^{−|y_i-bx_i|}\\ \Rightarrow L(y,x_i,b) = {\frac{1}{2}}^n e^{−\sum|y_i-bx_i|}\\ \Rightarrow \frac{\partial\log L(y,x_i,b)}{\partial b} = -\frac{\partial{\sum |y_i-bx_i|}}{\partial b} $
Any ideas about how to proceed??
In this case your log-likelihood function is:
$$\ell (b) = - \sum_{i=1}^n | y_i - b x_i |.$$
Since your $x_i$ values are either negative or positive one, we can let $\mathscr{X} \equiv \{ i = 1,...,n | x_i =1 \}$ be the set of indices for which this explanatory variable is one. We then have:
$$\ell (b) = - \sum_{i \in \mathscr{X}} | y_i - b | - \sum_{i \notin \mathscr{X}} | y_i + b |.$$
Taking $\tfrac{d}{dx}|x| = \text{sgn}(x)$ the score function is:
$$\begin{equation} \begin{aligned} \frac{d\ell}{db} (b) &= - \sum_{i \in \mathscr{X}} \text{sgn}( y_i - b ) - \sum_{i \notin \mathscr{X}} \text{sgn}( y_i + b ) \\[6pt] &= \sum_{i \in \mathscr{X}} \text{sgn}( b - y_i ) - \sum_{i \notin \mathscr{X}} \text{sgn}( b + y_i ). \\[6pt] \end{aligned} \end{equation}$$
The score equation is:
$$\sum_{i \in \mathscr{X}} \text{sgn}( \hat{b} - y_i ) = \sum_{i \notin \mathscr{X}} \text{sgn}( \hat{b} + y_i ).$$
The MLE $\hat{b}$ is any value that balances these signs. It is likely that this will be an interval of values, and so in this case you will need to choose a value in the interval arbitrarily (e.g., the midpoint). It should be possible to solve this equation numerically to obtain $\hat{b}$ by checking values over intervals between the appropriate $y_i$ values.