# Finding MLE for uniform distribution $U[\theta_1 - \theta_2, \theta_1 + \theta_2]$

Problem statement: Let $X_1, \ldots, X_n$ be a random sample from a uniform distribution $U[\theta_1 - \theta_2, \theta_1 + \theta_2]$, with $\theta_1 \in \mathbb{R}$ and $\theta_2 > 0$. Determine the MLE for $(\theta_1, \theta_2)$.

My attempt: The density function for $X$ is $$f_X(x) = \frac{1}{2 \theta_2} 1_{[\theta_1 - \theta_2, \theta_1 + \theta_2]} (x).$$ Then the likelihood function is $$L(\theta_1, \theta_2; \vec{x}) = \frac{1}{(2 \theta_2)^n} \prod_{i=1}^n 1_{[\theta_1 - \theta_2, \theta_1 + \theta_2]} (x_i).$$ So I need to minimize $$(2 \theta_2)^n$$ subject to the contraint $$\theta_1 - \theta_2 \leq x_{(1)} \leq x_{(n)} \leq \theta_1 + \theta_2.$$ From the left most inequality I have $\theta_1 - x_{(1)} \leq \theta_2$. From the right most inequality I have $x_{(n)} - \theta_1 \leq \theta_2$. Adding these I get $x_{(n)} - x_{(1)} \leq 2 \theta_2$. So I think an estimator for $\theta_2$ is $$\hat{\theta}_2 = \frac{1}{2} ( x_{(n)} - x_{(1)}).$$ Is this reasoning correct? And also, how to find an estimator for $\theta_1$ from this?

Thank you for any help!

• Use again the constraint, it yields $$\hat\theta_1=\frac{x_{(1)}+x_{(n)}}2$$ – Did May 27 '17 at 22:47
• I don't see how. And don't I have to take into account what I already found for $\theta_2$? – Kamil May 27 '17 at 23:09
• Did you try to compute $x_{(1)}+\hat\theta_2$ and $x_{(n)}-\hat\theta_2$? Doing so could help you see the light... – Did May 28 '17 at 6:12

You need to make $\theta_2$ as small as it can be subject to the two constraints \begin{align} & \theta_1+\theta_2 \ge x_{(n)} \\ &\theta_1 - \theta_2 \le x_{(1)} \end{align} Draw a picture of this region in the $(\theta_1,\theta_2)$-plane with the $\theta_1$ axis pointing rightward and the $\theta_2$ axis pointing upward. If you have $\text{“}=\text{''}$ instead of $\text{“}\le\text{''}$ or $\text{“}\ge\text{''}$ above, then you get two straight lines. The lines divide the plane into four quarter-planes, one of which has a unique lowest point. That quarter-plane is where the two inequality constraints are satisfied. And that unique lowest point is the unique feasible point at which $\theta_2$ is as small as feasible. Making $\theta_2$ as small as is feasible is what you need. Therefore that point is the MLE of the pair $(\theta_1,\theta_2).$ That point is the intersection of those two lines. Solving two linear equations in two unknowns yields \begin{align} \widehat\theta_2 & = \frac{x_{(n)} - x_{(1)}} 2, \\[8pt] \widehat\theta_1 & = \frac{x_{(n)} + x_{(1)}} 2. \end{align}
• Note that $\widehat\theta_2$ is obviously a biased estimator of $\theta_2$, and $\widehat\theta_1$ is an unbiased estimator of $\theta_1. \qquad$ – Michael Hardy May 28 '17 at 4:42