# Find the maximum likelihood estimator of $\theta$ with pdf $f(x)=2x/\theta^2$ [duplicate]

Let $$(X_1,\dots, X_n)$$ be a random sample from $$X$$ with pdf $$f(x)=2x/\theta^2$$ for $$0\le x\le \theta$$ where $$\theta>0$$. Find the maximum likelihood estimator of $$\theta$$.

The likelihood function is that $$L(\theta)=\frac{2^n}{\theta^{2n}}\prod_{i}x_i$$

I know that we need to find the $$\theta$$ that maximized the $$L(\theta)$$. But I did not know how to get $$\theta=X_{(n)}$$... I try to get the derivative of this one but $$\theta=0$$.

• $$L(\theta)=\begin{cases}\frac{2^n}{\theta^{2n}}\prod_{i}x_i &\quad \text{if \theta \geq x_i for all x_i}\\ 0 &\quad \text{if \theta < x_i for at least one x_i } \end{cases}$$ The problem here is that the maximum is in a point where the derivative is non-zero. The maximum occurs because of a discontinuity, not because the derivative is zero. Commented Feb 13, 2023 at 6:52
• The German Tank problem is the typical example of these kind of problems. If you search for the term $\mathbb{I}$, the indicator function that occurs in the answer of user1865345, then you come across several variants of the problem. Commented Feb 13, 2023 at 7:03

Here $$L(\theta)=\frac{2^n}{\theta^{2n}}\left(\prod_{i}x_i \right)\mathbb I_{(0,\theta]}\left(x_{(n)}\right).$$

Only two factors above depend on $$\theta.$$ See how increasing (decreasing) $$\theta$$ in the first factor affects $$L.$$ Then determine $$\hat{\theta}_{\textrm{MLE}}$$ based on the last factor.