Simple question Maximum Likelihood

I have the following distribution, defined for $0 < x < \theta$, its value is $0$ otherwise.

$$f_\theta(x)= \frac{2x}{\theta^2}$$

Find the MLE of $\theta$

I tried:

$$\prod_{i=1}^n \frac{2}{\theta^2}x_i =\left(\frac{2}{\theta^2}\right)^n \prod_{i=1}^n x_i$$

Taking the natural logarithm gives us:

$$n \ln{\frac{2}{\theta^2}} + \sum\ln({x_i})=2n \ln\left({\frac{\sqrt2}{\theta}}\right) + \sum\ln({x_i})$$

Taking the derivative with respect to $\theta$:

$$\frac{2n\theta}{\sqrt{2}}=0$$

After this question I get other questions about this MLE (unbiasedness, consistency, sufficiency etc), so I have the feeling that this estimator has to be a 'concrete' value...

What's going on? :-)

• Something is fishy about your MLE for $\theta$. See this recent question for the correct answer. – Dilip Sarwate Nov 1 '12 at 1:33
• You forgot the indicator in the likelihood. – Xi'an Nov 1 '12 at 9:24
• I see that the MLE is Max{X1,X2...Xn} tnx – Applied mathematician Nov 1 '12 at 12:03
• Sorry, but a good example on why one should always start with a plot and not confuse likelihood or its maximum as involving derivatives – phaneron Nov 1 '12 at 15:11

$$f_\theta(x)= \frac{2x}{\theta^2}\cdot \mathbf 1_{\{x\leq\theta \}}$$
for a sample of size $n$, this will give the likelihood
$$L(x) = \prod_{i=1}^n\frac{2x_i}{\theta^2}\cdot \mathbf 1_{\{x_i\leq\theta \}} = \left(\frac{2}{\theta^2}\right)^n\cdot \min_i{\mathbf 1_{\{x_i\leq\theta \}}}\cdot\prod_{i=1}^n2x_i$$
No need to consider the log-likelihood in order to deduce that $L(x)$ is decreasing in $\theta$ related to the term $\left(\frac{2}{\theta^2}\right)^n$, and so we would want $\theta$ as small as possible. But if even one $x_i$ is bigger than the chosen $\theta$ then the likelihood value will be exactly zero, while in all other cases it will be greater than zero, because the indicator function will be zero. But since by increasing $\theta$ we are lowering the value of the likelihood, we increase $\theta$ no more than necessary to avoid making the likelihood equal to zero. Hence $$\hat \theta_{MLE} = \max_i\{x_i\}$$