How to calculate the expectation and variance of moment estimator of uniform distribution $U(a,b)$? We know that the moment estimator of the parameter in the uniform distribution $U(a,b)$ is
$$
\hat{a}=\overline X-\sqrt{3}S,\quad \hat{b}=\overline X+\sqrt{3}S
$$
Where $\overline X$ is the sample mean and $S$ is $\sqrt{\frac1n \sum_{i=1}^n (X_i -\overline X)^2}$, now I want to calculate $E(\hat{a}),E(\hat{b}),Var(\hat{a}),Var(\hat{b})$, but it seems that this problem is not so easy to deal with...
I have been thinking for a long time and still don't know how to solve it...
Thank you in advance for your help!
 A: You may already have found $E(\bar X) = \mu = (a+b)/2.$
To find $E(S^2)$ is not so easy.
It may help to write the numerator of $S^2$ as
$$\sum(X_i - \bar X)^2 = \sum(X_i^2 - 2\bar X X_i + \bar X^2)\\
= \sum x_i^2 - 2\bar X\sum X_i + n\bar X^2\\
= \sum X_i^2 - 2n\bar X^2 + n\bar X^2 
=\sum X_i^2 - n\bar X^2.$$
where all sums are taken over $i = 1,\dots,n$ and remembering
that $n\bar X= \sum X_i.$ 
Then you only have to find $E(\bar X^2)$ and $E(\sum X_i^2).$
I will let you deal with that part on your own.

Addendum:
For the specific case, with $a = 1, b=2, n = 12,$ the following
simulation in R gives gives reasonably good approximations for
various relevant quantities. You can check some of your general formulas to see if they roughly match simulated results for
the parameters above.
With a million iterations, most
simulated values should be accurate to a couple of decimal places.
However, remember that method-of-moments estimators are not
always unbiased. $E(\bar X) = (a+b)/2$ is unbiased for $\mu,$
but the estimate of $\sigma$ involves nonlinear operations and so
it is biased.
set.seed(2020)
a = 1;  b = 2;  n = 12
B = 10^6;  m = m.2 = s.2 = numeric(B)
for(i in 1:B) {
  x = runif(n, a, b)
  m[i] = mean(x);  m.2[i] = mean(x^2)
  s.2[i] = ((n-1)/n)*var(x)
  }
mean(m);  mean(m.2);  mean(s.2);  mean(sqrt(s.2))
[1] 1.500153    # aprx E(X-bar) = (a+b)/2 = 1.5
[1] 2.333788    # aprx E(X-bar-sq)
[1] 0.07637581  # aprx E(S^2) = 1/12
[1] 0.2733935   # aprx E(S)
mean(m) + sqrt(3)*mean(sqrt(s.2))
[1] 1.973684    # aprx b.est;  b=2 

