# Find the maximum likelihood estimator for $\theta$ when $f(x)=2\theta^{-2}x, 0\leq x \leq \theta$

Find the maximum likelihood estimator for $\theta$ when $f(x)=2\theta^{-2}x, 0\leq x \leq \theta$.

This should be a really easy question but I somehow cannot seem to get the right answer. My likelihoodfunction is $\prod\limits_{i=1}^n 2\theta^{-2}x_i$ which gives me after some simplification $nln(2\theta^{-2}) + \sum\limits_{i=1}^n ln(x_i)$ as my loglikelihoodfunction. Then the derivative becomes $\frac{-2n}{\theta}$. If I equate this to $0$ to obtain the maximum I obtain $\hat{\theta}=0$. However, this answer does not seem plausible. What did I do wrong?

-

There's an issue that arises here. Your distribution is supported (nonzero) for $0\leq x\leq\theta$. In other words, it's zero outside this interval. That means when you look at something like $f(x_i)=2\theta^{-2}x_i$, it should actually be $f(x_i)=2\theta^{-2}x_i\mathbb{1}_{0\leq x_i\leq \theta}$, where the indicator is zero when $x_i$ is outside the interval. When you are maximizing $f(x_1)\cdots f(x_n)$, this product is zero if $\theta<x_i$ for some $i$, so you can just assume that $\theta\geq x_i$ for each $i$.
So think about how you would maximize such a function. Don't deal with derivatives because the function won't have a zero derivative, but will have a maximum. As a hint, try looking at $\hat{\theta}=\max_i x_i$. Can you do better than that?
Thank you for your help! How do I know that the function only has a minimum? Isn't it the case that the maximimum of the $x_i$'s that you suggested is the best estimate for $\theta$ since it gives you the highest value of $L(\theta)$(the loglikelihoodfunction)? If not, could you explain me how we could do better? –  dreamer May 6 '13 at 18:58
You can easily justify it. Your MLE (without taking log's) will be proportional to $\theta^{-2n}$, which is decreasing as $\theta$ gets larger and you require $\theta\geq \max_ix_i$. If you think about it, you're asking what the most likely uniform distribution is for a given set of observables. It's intuitively obvious you don't need an interval bigger than your largest value. –  Alex R. May 6 '13 at 19:20