TITLE: Maximum likelihood estimate given two identical independent uniform distributions
QUESTION [0 upvotes]: So I have been thinking of this problem for a while and obtained a wrong solution involving intersection of several intervals for different cases. The problem is:
Given independent random variables X1, X2 ~ unif[$\mu - \frac{1}{\mu}$, $\mu + \frac{1}{\mu}$] for some $\mu > 0$, find the maximum likelihood estimate of $\mu$.
And these are some of my thoughts. I reached a wrong solution, so some of them may be wrong, though it also could be me making mistakes when solving these inequalities:
WLOG, assume $X_1 < X_2$.
First, $X_2 - X_1 <= \frac{2}{\mu}$, since the distance between the observations should be no greater than the length of interval where the uniform distribution is defined. This means $\mu \in [0, \frac{2}{x_2 - x_1}]$ (call this interval A)
Second, the likelihood function $L(\mu | x_1, x_2) = \frac{\mu ^ 2}{4}$ as the pdf of $X_1, X_2$ are the same, $f_{X_1}(x_1) = f_{X_2}(x_2) = \frac{\mu}{2}$. So looking for mle of $\mu$ is equivalent to looking for the largest possible $\mu$ given $x_1, x_2$.
Then I consider 3 cases: 
a) $X_1 < 0 <X_2$
Then 
$\mu - \frac{1}{\mu} < 0$ => $\mu \in (0, 1)$, because $\mu > 0$ is given. Call this interval B1.
$X_1 >= \mu - \frac{1}{\mu}$, which leads to $\mu \in [0, \frac{x_1 + \sqrt{x_1 ^2 + 4}}{2}]$. Call this interval C.
$X_2 <= \mu + \frac{1}{\mu}$, which leads to $\mu \in [\frac{x_2 - \sqrt{x_2 ^2 - 4}}{2}, \frac{x_2 + \sqrt{x_2 ^2 - 4}}{2}]$ (interval D)
So $\hat{\mu}_{mle} = max(A \cap B1 \cap C \cap D)$. However, when I plug in $x_1 = -3, x_2 = 4$, the mle estimate I get has a corresponding interval (support) that does not contain $x_2$.
b) $0 < X_1 < X_2$
Either $0 < \mu - \frac{1}{\mu}$ => $\mu > 1$ (interval B2), or $\mu - \frac{1}{\mu} < 0$ => $\mu \in (0, 1)$ (interval B1). And the mle is therefore either $max(A \cap B1 \cap C \cap D)$ or $max(A \cap B2 \cap C \cap D)$.
c) $X_1 < X_2 < 0$
This implies $\mu - \frac{1}{\mu} < 0$ => $\mu \in (0, 1)$ (interval B1). So the mle is $max(A \cap B1 \cap C \cap D)$.
My solution is wrong. Could anyone check which step may be problematic or whether I was on the right track at all?

REPLY [0 votes]: The likelihood is $\mu^2/4$ if both samples are in $[\mu-1/\mu,\mu+1/\mu]$ and otherwise 0. Call the smaller one $x$ and the bigger one $y$. To maximize the likelihood, you want $\mu$ as large as possible, while having $\mu-1/\mu \leq x$ and $\mu+1/\mu \geq y$.
Thankfully $\mu>0$ so that $\mu-1/\mu \leq x$ and $\mu+1/\mu \geq y$ are the same as $\mu^2-x \mu-1 \leq 0$ and $\mu^2-y \mu+1 \geq 0$. But now you should be careful in solving these inequalities: the first one needs $\mu$ between the roots of a quadratic while the second needs it not between the roots of a quadratic.
{"set_name": "stack_exchange", "score": 0, "question_id": 2407860}