# Maximum likelihood estimator for family of uniform distributions

Question: Based on the random sample $Y_1 = 6.3$ , $Y_2 = 1.8$, $Y_3 = 14.2$, and $Y_4 = 7.6$, use the method of maximum likelihood to estimate the parameter $\theta$ in the uniform pdf

$f_Y(y;\theta) = \frac{1}{\theta}$ , $0 \leq y \leq \theta$

My attempt:

L($\theta$) = $\theta^{-n}$

So, to maximise L($\theta$), $\theta$ must be minimum, and so $\theta$ = min($Y_i$)

But the answer is $\theta$ = max($Y_i$)

Where am I going wrong?

The problem with your answer is that the likelihood actually is

$$L(\theta)= \theta^{-n} \prod_{i=1}^n\mathbf 1_{\{0 \leq Y_i \leq \theta \}}$$

i.e. you forgot the support of your family of models.

In particular, if you set $\theta = \min\{Y_i\}$, then if there exists $Y_j > \min\{Y_i\}$ (which happens with probability $1$ (also in your example it is the case), then the likelihood will be $0$! And thus your choice of $\theta$ definitely does not maximize it..

• If you assume that $\theta = \min \{Y_i\}$ then this means that it is essentially impossible to get any observation greater than $\min \{Y_i\}$ (since the density is $0$ in that area...look at your definition of the densities for fixed $\theta$)... But this is absurd. – air Dec 1 '15 at 7:35
• Okay.... I think I get it now.. Thanks a lot!! – M31 Dec 1 '15 at 7:38
• So it basically means that $\theta$ must be minimum for L($\theta$) to be maximum, but it has to just be sufficiently big to include all the Y's, isn't it? – M31 Dec 1 '15 at 7:40
• @Abhinav exactly! This is how you prove that the MLE of $\theta$ is just $\max\{Y_i\}$! – air Dec 1 '15 at 7:44
• This was really bugging me.. Thanks a ton! :) – M31 Dec 1 '15 at 7:48

If you take the minimum $Y$ (or something smaller than the maximum) as your estimate for $\theta$, the probability of observing a $Y>\theta$ is zero. But since you have observations in that area this cannot be the MLE.