Let $X_1, \ldots X_n$ i.i.d with density of (using the indicator function $\mathbf 1$) $$f(x|\mu) = \frac 3 2 (x-\mu)^2 \cdot \mathbf 1_{[\mu-1, \mu+1]}(x) = \left\{ \begin{array}{ll} \frac{3}{2}(x-\mu)^2 & \quad \mu-1 \le x \le \mu+1 \\ 0 & \quad \textrm{otherwise} \end{array} \right.$$
The moment method estimator is easy to find, $\hat \mu_{MM} = \bar X_n$. I also want to find the maximum-likelihood estimator $\hat \mu_{ML}$, but I'm a bit stumped.
My thought process:
- Disregarding the $x \in [\mu - 1, \mu+1]$ constraint gives non-sensical results, suggesting that $\hat \mu_{ML} \rightarrow \pm \infty$
- The $|x-\mu| \le 1$ enforces that $\hat \mu_{ML} \in [\max_i(X_i)-1, \min_i(X_i)+1]$. That is a tight bound with increasing $n$, especially, as the distribution is weighted so heavily towards the edges. The problem is that "a tight bound" is not the estimator itself.
- Combining the two approaches, I find $$\hat \mu_{ML} = \operatorname{argmax}_{\mu} \left (\mathbf 1_{[\max_i(X_i)-1, \min_i(X_i)+1]}(\mu) \cdot \prod_i (X_i - \mu)^2\right)$$ Sadly, I can't simplify this further, or leverage it to calculate a value for $\hat \mu_{ML}$.
- Clearly, $\hat \mu^* = \frac 1 2 (\max_i(X_i) + \min_i(X_i))$ is a fairly reasonable estimator, but it does not seem to be the ML estimator, since it disregards the information contained in the $\prod$-term above.
Am I missing something, or is there really no closed-form expression for $\hat \mu_{ML}$? Any pointers would be appreciated.
Edit: Following @whuber's suggestion, I plotted $L(\mu | X_1 = 0, X_2 = 0.15, X_3=1.7, X_4=1.8)$:
As you can see, the maximum is not at the edges, but in the interior. It can be at the edges for different choices of the observed $X_i$. The same plot without the $|X_i - \mu| \le 1$ restriction with a slightly wider $\mu$ axis:
It's an 8th order polynomial for n=4. $\hat \mu$ would correspond to the maximum around ~0.9, but there are other maxima (one between each consecutive pairs of $X_i$).
Differentiating w.r.t. $\mu$ gives a sum-of-($2n-1$)-order polynomials, that I don't see how to solve. I'm a bit lost here, to be honest.