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?

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. 
