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..