Compute Maximum likelihood of a function which is defined only in the L1 norm if $x \in\mathbb R^2$ and
$$
f_\theta(x)=
    \begin{cases}
        \frac{1}{2\theta^2}  & \text{if } \|x\|_1 \le \theta  \\
        0 & \text{otherwise.}
    \end{cases}
$$
Find the maximum likelihood estimate of $\theta$.
this is what I did:
1- Compute $L(\theta) = \prod_{i=1}^n = \frac{1}{2^n(\theta^2)^n}$
2 - Compute $\ell(\theta) = \ln L(\theta) = -n\ln(2)-2n\ln(\theta)$
3 - derive and = $0$
But when I do it, I get $\frac{-2n}{\theta}=0$ which doesn't work.
Can someone please guide me and tell me where I am mistaken?
Thanks
 A: You should unlearn the idea that the MLE of $\theta$ is the point at which $(d/d\theta) \ln L(\theta) = 0.$
A point at which the derivative is $0$ is not the same as a point at which the function is maximized. In some cases there will be a unique point at which the derivative is $0$ and that will be the unique global maximum point, but you should understand what you're doing before you rely on that.
In some cases (including this one) a maximum occurs at an endpoint of the domain of the function, and at an endpoint maximum the derivative is not generally $0.$
The domain is $\big[\|x\|_1, +\infty)$ and the function increases as $\theta$ decreases. Therefore the maximum is at $\theta=\|x\|_1.$
PS: This is the MLE if there is just one observed vector $x.$
A: In step (1), you should have $$L(\theta;\mathbf{x}) = \begin{cases}1/(2^n \theta^{2n}), & \text{if } \max(\|x_i\|_1 : 1 \leq i \leq n) \leq \theta \\ 0, & \text{otherwise}\end{cases}$$
Then the maximum occurs when $\theta$ is minimized in the first case, so $$\hat\theta_{\text{MLE}} = \max(\|x_i\|_1 : 1 \leq i \leq n)$$
