# MLE for the PDF $f_\theta(x)=\theta x$ on $0\leq x\leq\sqrt{2/\theta}$: where is the mistake?

Consider $f_X(x;\theta)=\theta\cdot x$, $x\leq\sqrt{\frac{2}{\theta}}$. Find the maximum likelihood for the estimator $\hat{\theta}$ of $\theta$.

By definition, the MLE of $f(x_1\ldots,x_n;\hat{\theta})=\max.f(x_1,\ldots,x_n;\theta)$

$$L(\theta)=\prod_{i=1}^n f(x_i;\theta) \implies \ln (L(\theta))=\sum_{i=1}^n \ln(\theta \cdot x_i)=n\cdot \ln(\theta)+\sum_{i=1}^n\ln(x_i)$$

$$\implies \frac{d}{d\theta}L'(\theta)=\frac{d}{d\theta}n\cdot \ln(\theta)=\frac{n}{\theta}=0 \iff n=0$$

This makes of course no sense, so could anyone give me a hint where I made a mistake?

• $L(\theta)$ is either zero or positive. First find out for which $\theta$ it is positive depending on the data. Then maximize. Do not use logarithms. Sep 12, 2015 at 15:13
• The "set derivative equal to $0$ and solve" method for locating an extremum does not work if the extremum is at one end of the interval (where the derivative need not be zero) instead of in the interior of the interval. Sep 12, 2015 at 15:15
• You should abandon any knee-jerk reflex that causes you to start finding derivatives as soon as you need to find the maximizing argument to a function. Instead, you should first work on understanding the problem so that you can then judge which method is suitable for the occasion. ${}\qquad{}$ Sep 13, 2015 at 21:00

The likelihood function $L(\theta; x_1, x_2, \ldots, x_n)$ is given by $$L(\theta; x_1, x_2, \ldots, x_n) = \begin{cases} \prod\limits_{i=1}^n \theta \cdot x_i, & \theta \leq \frac{2}{x_{(n)}^2},\\ 0, & \theta > \frac{2}{x_{(n)}^2}, \end{cases}$$ where $x_{(n)} = \max\limits_k x_k$ is the $n$-th order statistic. In other words, $L(\theta; x_1, x_2, \ldots, x_n)$ is proportional to $\theta^n$ for $\theta \in \left(0,\frac{2}{x_{(n)}^2}\right]$ and $L(\theta; x_1, x_2, \ldots, x_n) =0$ otherwise.
Thus, $L(\theta; x_1, x_2, \ldots, x_n)$ is a monotone increasing function of $\theta$ on $\left(0,\frac{2}{x_{(n)}^2}\right] = \left(0,\frac{2}{(\max_k x_k)^2}\right]$. Finding the location of its maximum is left as an exercise for you. But, please don't differentiate and set the derivative equal to $0$ as you tried previously.
• Thanks for your answer! I assume that $\theta$ must be the extrema (because it is monotone increasing), i.e. $theta=\frac{2}{x_{(n)}^2}$. Then it follows that $\hat{\theta}=\frac{2}{\bar{X}}^2$. Sep 15, 2015 at 11:01