# How to get the maximum likelihood estimator of $U(\theta,\theta +1)$?

I know how to find the MLE for $$U(0,\theta)$$ but I am in trouble with this one.

let $$X_1,\dots,X_n$$ be a random sample from $$U(\theta,\theta +1)$$. Consider the following three estimators for $$\theta,\ \theta\in\mathbb{R}$$ $$T_1=X_\left(n\right),\\T_2=\frac{X_\left(1\right)+X_\left(n\right)}{2},\\T_3=\frac{X_\left(1\right)+X_\left(n\right)}{2}-\frac{1}{2}$$.

Now I want to know that which one of them is MLE. I am trying to find likelihood function but here it is: $$L=\prod_{i=1}^n 1\ \text{, because}\ f(x_i)=\frac{1}{\theta+1-\theta}=1$$

What do to with this? How can I infer about the MLE? Sorry for my lack of knowledge; I am studying it myself. I also find the $$\hat\theta=\frac{2\bar{X}-1}{2}$$ by method of moments. Is it useful?

Edit There are options given, but what if I have to find it myself?

• Hint: are maximum likelihood estimators always unique? Which one(s) of these estimators fullfils the conditions? Commented Jan 29, 2016 at 10:05
• Yes, If I am not wrong because any other will be called biased.
– Onix
Commented Jan 29, 2016 at 10:10
• No it is not necessarily unique, because the likelihood function may have several maxima. Besides, a MLE can be biased. Commented Jan 29, 2016 at 10:31

This is not intended as a full answer but as a series of hints. First, look at your likelihood.

We have

$$L(\theta) = \prod_{i=1}^n 1 \quad I\left( \theta \leq x_i \leq \theta + 1 \right)$$

where $I( x \in A)$ is the indicator function, returning $1$ if indeed $x \in A$ and zero otherwise. This is how the parameter $\theta$ enters our likelihood here.

Note here that for the likelihood to be non-zero, all the $x$s have to be in that interval. But then, this will happen if and only if the minimum is greater than $\theta$ and the maximum is smaller than $\theta+1$, would you agree? These conditions will give you an interval in which $\theta$ can lie.

But since this is an interval and the likelihood is constant in that interval, the mle is not unique. So if you are looking at this problem by yourself, you have the freedom of choice. That is, you can take a boundary point or a point in the interior, it does not matter. However, only one of these three estimators fullfils the condition. I leave it to you to find which one.

• Yeah I agree with that one, (tell me if i am wrong in reasoning) Then the 3rd estimator may be correct as $X_{(1)}\text{and}X_{(2)}$ are minimum and maximum resp. values of the sample they are the overestimate and underestimate of $\theta,\theta+1$ resp. there sum divide by 2 and subtracted by $\frac{1}{2}$ is MLE as here$\frac{\theta+\theta+1}{2}-\frac{1}{2}=\theta$ no?
– Onix
Commented Jan 29, 2016 at 10:57
• It is the third one because it is the midpoint of the allowed interval, while the first two lie outside. Recall that in an interval (a,b), the midpoint is given by $\frac{a+b}{2}$. Commented Jan 29, 2016 at 10:58
• And subtracting the factor of 1/2 gives the lower bound of the interval as the interval length is 1?
– Onix
Commented Jan 29, 2016 at 11:02
• @Abomm You don't have to subtract anything. This is just the midpoint of your interval. Recall that we require $y_n - 1<\theta< y_1$. Then try to see why the other two estimators won't work. Commented Jan 29, 2016 at 16:37
• Ok i got it why the other two are not the mle as they are outside the required interval as you suggested in the answer "you have the freedom of choice then any estimator within this interval will be mle. Thanks for your time.
– Onix
Commented Jan 29, 2016 at 18:01