Give IID Data Samples $X_n = $ {$x_1, x_2, ..., x_n$} generated from a uniform distribution $U(x|0,\theta)$.
$p(x|\theta) = U(x|0,θ) = ${$ \frac{1}{\theta}$ for $0 \leq x \leq θ$ and $0$ otherwise}.
Now assuming $X_2 = [1, 3, 2, 4]$ have been observed.
What is the maximum likelihood arg $max \theta, p(X_2 | \theta)$?
The $p(X|\theta) = p(x_1, ..., x_n | \theta) = \theta^{-n}$
Taking log both sides we get $\log p(X|θ) = n\cdot \log(\frac{1}{θ})$ Taking derivative we get $\frac{-n}{\theta} $which is less than $0$.
Could you tell me how to proceed for the next?
When you deal with the uniform distribution you are best off just thinking in general about what the problem is asking.
The answer in this case is 4. That is because it is the largest number in the X2 set. however this is often an underestimate since theta could be much larger, but the most likly is just that largest of the group.