# How to calculate MLE when given a sample set that includes negative values?

Let $$X_1, X_2, ..., X_n$$ ~ $$U(-\theta, \theta)$$, it is known that $$\hat{\theta}_{MLE} = X_{max}$$ of the sample set.

The given sample set is $$X_1 = -0.9$$, $$X_2 = -0.3$$, $$X_3 = -0.1$$, $$X_4 = 0.2$$, $$X_5 = 0.4$$, $$X_6 = 0.6$$, and $$X_7 = 0.8$$

I'm not sure which of the following is correct...

$$\hat{\theta}_{MLE} = |X_k| \hspace{1cm} or \hspace{1cm} \hat{\theta}_{MLE} = X_k$$

and equivalently in this case...

$$\hat{\theta}_{MLE} = |-0.9| = 0.9 \hspace{1cm} or \hspace{1cm} \hat{\theta}_{MLE} = 0.8$$

This is different from similar problems since it looks specifically at calculating these estimators when given a sample of numeric values, which also contains negatives.

• Your question boils down to asking "what is $\max\{-0.9,-0.3,-0.1,0.2,0.4,0.6,0.8\}$?" The max is just the biggest element. – Clement C. Apr 3 at 1:11
• So it would be correct to say $\hat{\theta}_{MLE} = 0.9$? – LegendOfKass Apr 3 at 1:17
• $0.9$ is not an element of the set. So under your premise, no. But your premise is wrong (the MLE is $\max_i |X_i|$), so 0.9 is the right answer. – Clement C. Apr 3 at 1:19
• Yes, I know it is not an element of the set, but $\hat{\theta}_{MLE} = X_{max} = max_i |X_i| = |-0.9| = 0.9$ right? This is what I was trying to say, I apologise that my math writing wasn't correct, I didn't quite know how to write it best until your comment. – LegendOfKass Apr 3 at 1:26
• If you define Xmax as the absolute value of the largest element, then yes. That's... Not a standard notation by any means. – Clement C. Apr 3 at 1:28

Given a sample $$x\equiv \{x_i\}_{i=1}^n$$, the likelihood is $$L(\theta\mid x)=(2\theta)^{-n} \times1\{\theta\ge M(x)\},$$ where $$M(x):=\max_{1\le i\le n}|x_i|$$. Then the MLE of $$\theta$$ is $$\hat{\theta}_n=M(x)$$.
The first moment of $$X_1$$ is zero. However, one may consider the second moment: $$\mathsf{E}X_1^2=\theta^2/3$$. Then the MME of $$\theta$$ is $$\hat{\theta}_n=\sqrt{3\sum_{i=1}^n x_i^2/n}$$.
• How would I calculate $\theta_{MME} = \frac{n+1}{n^2}\sum{X}$? Would I take the sum of the values as given, or the sum of the absolute values? – LegendOfKass Apr 3 at 1:53
• I'm not following how you got those moments. I found that $E(X_{max}^k) = \frac{n\theta^k}{n+k}$, thus the first moment would be $E(X_{max}) = \frac{7\theta}{8}$ – LegendOfKass Apr 3 at 23:22
• How is $E(X_{max}^k)$ related to the method of moments estimator (MME)? – d.k.o. Apr 3 at 23:35
• Wouldn't you use $E(/hat{/theta})$? – LegendOfKass Apr 3 at 23:40