Finding maximum likelihood estimator of $\theta$ Let $X_1, \ldots, X_n$ be independent random variables with density
$$
f(x;\theta) =\begin{cases} \frac{1}{2i\theta} &, -i(\theta-1)\le x \le i(\theta+1)
\\ 0&, \text{ elsewhere }
\end{cases}
$$ for $0<\theta<\infty$ and $i=1,2,\ldots,n$.
Find the maximum likelihood estimator of $\theta$.
My approach:
$$f(x;\theta) = \frac{1}{2i\theta}  I(_{-i(\theta-1)\le x \le i(\theta+1)})$$
How do we talk about the maximum or minimum values to say about mle . please throw some light???
 A: The likelyhood, as you calculated it is
$L(\theta) \propto \frac{1}{\theta^n}\mathbb{1}_{\theta \geq max |\frac{x_i-i}{i}|}$
It is self evident that $L$ is strictly decreasing in $\theta$ so
$\hat{\theta}=max|\frac{x_i-i}{i}|$
is your MLE
A: The density of $X_i$ is given by $$f_{X_i}(x \mid \theta) = (2i\theta)^{-1} \mathbb 1(-i(\theta-1) \le x_i \le i(\theta+1)).$$  Thus the joint density of the sample $\boldsymbol X = (X_1, X_2, \ldots, X_n)$ is
$$\begin{align}
f_{\boldsymbol X}(\boldsymbol x \mid \theta) 
&= \prod_{i=1}^n (2i\theta)^{-1} \mathbb 1(-i(\theta-1) \le x_i \le i(\theta+1)) \\
&= 2^n n! \theta^{-n} \prod_{i=1}^n \mathbb 1\left(\left|\frac{x_i}{i} - 1\right| \le \theta\right) \\
&= 2^n n! \theta^{-n} \mathbb 1 \left( \max_i \left|\frac{x_i}{i} - 1\right| \le \theta\right).
\end{align}$$
hence the likelihood for $\theta$ given the sample is proportional to
$$\begin{align}
\mathcal L(\theta \mid \boldsymbol x)
&\propto \theta^{-n} \mathbb 1 \left( \max_i \left|\frac{x_i}{i} - 1\right| \le \theta\right).
\end{align}$$
If the indicator function is $1$, then $\mathcal L$ is monotonically decreasing in $\theta$.  Therefore, the likelihood is maximized for a choice of $\theta$ that is as small as possible while allowing the indicator to remain $1$; i.e., $$\hat \theta = \max_i \left|\frac{x_i}{i} - 1\right|.$$  This function is evaluated by taking the sample $(x_1, x_2, \ldots, x_n)$, and calculating the modified sample $$\left(\frac{x_1}{1} - 1, \frac{x_2}{2} - 1, \ldots, \frac{x_n}{n} - 1\right).$$  The maximum absolute value is the MLE.
