Unbiased estimator of Bernoulli distribution Let $X_{1},...,X_{n}$ be a random sample from Bernoulli (p), where p$\epsilon$(0,1) is unknown.
(a) Find an unbiased estimator W of $\tau$(p) = $p(1-p)$ .
(b) Find an unbiased estimator which has smaller MSE than W.
My approach:
I know sample variance is unbiased estimator of population variance. Hence $S^2=\frac{1}{n-1}\sum_{i=1}^{n}(X_i - \bar{X})^2$ is an unbiased estimator of $p(1-p)$. But I don't know how to find an unbiased estimator of W. Can someone assist me in answering (a) and (b)?
 A: (a)
$W=X_1 (1-X_2)$ 
$E(W)=E(X_1 (1-X_2))==E(X_1) E(1-X_2)=p(1-p)$
(b)
$T=\sum_{i=1}^{n} X_i$ is complete and sufficient estimator so  $E(X_1 (1-X_2)|T)$  is UMVUE for $p(1-p)$
$\begin{array}{c|c|c}  
X_1 & X_2 & X_1 (1-X_2) \\ \hline
0 & 0 & 0 \\ 
0 & 1 & 0 \\ 
1 & 0 & 1 \\ 
1 & 1 & 0 \\ 
\end{array}$
so $X_1 (1-X_2)$ is a Bernoulli random.
$p(X_1 (1-X_2)=1|T=t)=p(X_1=1,X_2=0|\sum_i X_i=t)$
$=\frac{P(X_1=1,X_2=0,\sum_{i=1}^{n} X_i=t)}{P(\sum_{i=1}^{n} X_i=t)}$
$=\frac{P(X_1=1,X_2=0,\sum_{i=3}^{n} X_i=t-1)}{P(\sum_{i=1}^{n} X_i=t)}$
$=\frac{p q P(\sum_{i=3}^{n} X_i=t-1))}{P(\sum_{i=1}^{n} X_i=t)}$
$=\frac{p q {n-2 \choose t-1} p^{t-1} q^{n-2-t+1}}{ {n \choose t} p^{t} q^{n-t}}=$
$=\frac{{n-2 \choose t-1} }{ {n \choose t} }$  (for $t\geq 1$ O.W equal zero)
$E(X_1 (1-X_2)|T=t)=0+1\times \frac{{n-2 \choose t-1} }{ {n \choose t} }=\frac{{n-2 \choose t-1} }{ {n \choose t} }=\frac{t(n-t)}{n(n-1)} $
so UMVUE for $p(1-p)=\frac{\sum X_i(n-\sum X_i)}{n(n-1)}=\frac{n \bar X(n-n \bar X)}{n(n-1)}=\frac{n \bar X(1- \bar X)}{(n-1)}$
also it equal to $\frac{1}{n-1} \sum(X_i -\bar X)^2$
$\frac{1}{n-1} \sum(X_i -\bar X)^2=\frac{1}{n-1} (\sum X_i^{2} -n \bar X^2)$
since $X_i\in \{0,1\}$ 
$=\frac{1}{n-1} (\sum X_i -n \bar X^2)$
$=\frac{1}{n-1} (n \bar X -n \bar X^2)=\frac{n}{n-1}  \bar X (1- \bar X)$
at this step since $S^{2}=\frac{n}{n-1}  \bar X (1- \bar X)$ so $S^{2}$ is a function of $\bar X$ (sufficient and complete estimator) and also is unbaised so directly it is UMVUE for $p(1-p)$(and this is another proof for part(b))
