Method of Moments Estimation over Uniform Distribution

this is my first time using this site so apologies if the formatting is unclear!

Let ${X_1,\ldots, X_n}$ be a random sample from $\mathrm{Uniform}[\theta_1, \theta_2]$, i.e. the (continuous) uniform distribution over the interval $[\theta_1, \theta_2]$, with $\theta_1 < \theta_2$.

(a) Find the mean and the second moment of the distribution $\mathrm{Uniform}[\theta_1, \theta_2]$.

(b) Suppose that $\theta_1 = \theta_2 - 2$. Find an MME for $\theta_2$.

Okay, so my answers for part a) were $$M_1 = \cfrac{(\theta_2 + \theta_1)}{2}$$and$$M_2 = (\theta_2 + \theta_1)^{\frac{2}{3}}.$$

Following from this, when I used $\theta_1 = \theta_2 - 2$ and rearranged for $\theta_2$ I get:

$$\theta_2 = M_1 + 1$$

and $$\theta_2 = \sqrt{\frac{3}{4}M_2}+1$$

I tried equating the two expressions, and solving for $\theta_2$, which gave me two set of solutions $[0,2]$ and $[-1,1]$. Can anyone point out any errors, or explain what I'm supposed to do next?

Also, the next part of the question asks for an MME when $\theta_1 = -\theta_2$, but by my working both $M_1$ and $M_2$ reduce to zero at that point, so I don't know how I would go about that, however it does seem to link into the $[-1,1]$ solution set?

• The second moment (about the origin) is $\frac{\theta_1^2 +\theta_1\theta_2+\theta_2^2}{3}$. – André Nicolas Jan 29 '14 at 14:53

If $X \sim {\rm Uniform}[\theta_1, \theta_2]$, then the second raw moment is $${\rm E}[X^2] = \int_{x=\theta_1}^{\theta_2} x^2 \cdot \frac{1}{\theta_2 - \theta_1} \, dx = \frac{\theta_2^3 - \theta_1^3}{3(\theta_2 - \theta_1)} = \frac{1}{3}(\theta_2^2 + \theta_1\theta_2 + \theta_1^2).$$
Now, suppose $\theta_1 = \theta_2 - 2$. Then the first moment is $${\rm E}[X] = \theta_2 - 1,$$ and equating this with the first raw sample moment $\bar X = \frac{1}{n} \sum_{i=1}^n X_i$, we find $$\tilde \theta_2 = \bar X + 1, \quad \tilde \theta_1 = \tilde \theta_2 - 2 = \bar X - 1.$$ We need not use the second raw moment, because the method of moments uses only as many population moments as is necessary to uniquely estimate the unknown parameters in the distribution.
If we are only given $\theta_1 = -\theta_2$, then the first population moment gives us no information: ${\rm E}[X] = 0$. So we use the second population moment, which simplifies to $${\rm E}[X^2] = \frac{\theta_2^2}{3}.$$ Then equating this with the mean of the squared samples $\frac{1}{n} \sum_{i=1}^n X_i^2$ gives us the desired estimator $$\tilde \theta_2 = \sqrt{\frac{3}{n} \sum_{i=1}^n X_i^2},$$ and of course $\tilde\theta_1$ is determined accordingly.