[Math] Likelihood Function for the Uniform Density $(\theta, \theta+1)$

maximum likelihoodstatistical-inferencestatistics

Let the random variable X have a uniform density given by $f(x;\theta)\sim R(\theta,\theta+1)$.

What is the likelihood function according to the samples $X_1,\ldots,X_n$?

The question is much like Likelihood Function for the Uniform Density. But there seems no satisfying answer. So far I get $X_{\max}-1\le\theta\le X_{\min}$ and my guess is $\hat\theta=\frac{X_{\max}+X_{\min}-1}{2}$. Am I right? I need a theoretical explanation.

Best Answer

Hint: When you say that "So far I get $X_{max}-1\le\theta\le X_{min}$" you are actually saying that the likelihood $L(\theta ; x_1 \cdots x_n)$ (regarded as a function of $\theta$) is zero outside that range. Now, what is the likelihood if $\theta$ is inside that range?

Update: you know that the density of each uniform sample is $f(x;\theta) = 1$ if $\theta <x\le \theta+1$, $0$ otherwise.

Then the likelihood $L(\theta;x_1 \cdots x_n) =\prod f(x_i;\theta) $ is $1$ if $\theta <x_i\le \theta+1$ $\forall i$, $0$ otherwise. In terms of $\theta$ as variable, this is equivalent to say that $L(\theta;x_1 \cdots x_n)=1$ in $X_{max}-1\le\theta\le X_{min}$. You need to find the maximum of $L(\theta;x_1 \cdots x_n)$ as a function of $\theta$. But $L(\theta;x_1 \cdots x_n)$ is constant (in that range) (I recommend you to draw it if you don't quite get it). Hence, $\theta_{ML}$ is not well defined, we can pick any value in that range. In particular, $(X_{min}+X_{max})/2$ is as valid as any other.

Related Question