Let $X_1, ..., X_n$ be $i.i.d$ random variables, uniformly distributed over $(0,\theta)$. Derive the likelihood function given the sample $x_1, ..., x_n$.
Answer
The likelihood function is:
\begin{align} \mathcal{L}(\theta|x_1, ..., x_ n ) &= \prod_{i=1}^{n}f(x_i|\theta)\\ &= \frac{1}{\theta^n}\mathbb{1}(X_1, ..., X_n \in [0,\theta])\\ &= \frac{1}{\theta^n}\mathbb{1}(\max(X_1, ..., X_n) \leq \theta) \end{align}
The second equality is clear to me, that the likelihood will be equal to $0$ if at least one observation $X_i$ will fall outside the interval $[0, \theta]$.
My question is:
Why it is the same as the maximum among observations being less than $\theta$, implied by the the third equality? (how can we justify the third equality, what is the intuition?)
Why the third equality is not: $\frac{1}{\theta^n}\mathbb{1}(\min(X_1, ..., X_n)\geq 0, \max(X_1, ..., X_n) \leq \theta)$
Edited: changed min and max to \min and \max respectively.