Maximum likelihood estimator of $\theta>-1$ from sample uniform on $(0,\theta+1)$

Let $X_1,X_2,\ldots,X_n$ a sample from “population” $X$, which has distribution given by $$f(x,\theta)=\frac{1}{\theta+1}\mathbb{1}_{(0\leq x\leq\theta+1)},\qquad \theta\in(-1,\infty)$$

Determine maximum likelihood estimator, where $\mathbb{1}$ is the indicatrix function, which take the value 1 in the interval $[0,\theta+1]$ and zero otherwise.

My approach: Let $$L(x_1,\ldots,x_n;\theta)=\dfrac{1}{(\theta+1)^n}\prod_{i=1}^{n}\mathbb{1}_{0\leq x_i\leq\theta+1}$$

But now, what happend with the product of indicatrix function?? Thanks!

Solutions Collecting From Web of "Maximum likelihood estimator of $\theta>-1$ from sample uniform on $(0,\theta+1)$"

The expression $$\prod_{i=1}^n \mathbb 1_{0 \le x_i \le \theta+1}$$ is a finite product of indicator functions, each of which can only take on the value of $0$ or $1$. So in order for the product to equal $1$, each factor in the product must be $1$. Otherwise, the product is $0$.

Therefore, you may express this notion more succinctly by observing that the product is $1$ if and only if $0 \le x_1, x_2, \ldots, x_n \le \theta+1$. And this in turn can be simplified further if you note that, in a finite sample $(x_1, x_2, \ldots, x_n)$ of real numbers, there is necessarily a least observation and a greatest observation; i.e., $$x_{(1)} = \min_i x_i, \\ x_{(n)} = \max_i x_i.$$ Then all observations of your sample are within the interval $[0, \theta+1]$ if and only if $$0 \le x_{(1)} \le x_{(n)} \le \theta+1.$$ So we can write this as $$\mathbb 1_{0 \le x_{(1)}} \mathbb 1_{x_{(n)} \le \theta+1}.$$

Rather a small comment on the answer from heropup:

In order of the product
\prod_{i=1}^n \mathbb 1_{0 \le x_i \le \theta+1}
to be non-zero (1, actually), the relation $x_{(n)} \le \theta+1$ must be satisfied. That means actually $\theta \ge 1 + \max_i x_i$. Then the likelihood is monotonic decreasing function, thus your MLE equals $1 + \max_i x_i$.