$X_i$ follows Bernoulli distribution find UMVUE of $\theta(1-\theta)$
Let $X_1,X_2,X_3 ...X_n$ be a random sample from Bernoulli distribution with parameter $\theta$.Find UMVUE of $\theta(1-\theta)$.
I know that $T=\sum_{i=1}^{n}X_i$ is complete sufficient statistic for our paramenter $\theta$. I am trying to find out function of T which is a unique unbiased estimator of $\theta(1-\theta)$. Now $T\sim Bin(n,\theta)$
$E(T^2)-E(T)^2=V(T)$
$n\theta(1-\theta)+n^2\theta^2-n^2\theta^2=n\theta(1-\theta)$
$\implies\dfrac{1}{n}(T^2-\bar{T}^2)$ is umvue of $\theta(1-\theta)$
If I have sample size $n=10$ with observations $1,1,1,1,1,0,0,0,0,0$ obtain the value of this estimator.
Now I am stuck at this point that is $T^2$ is $T^2=\sum_{i=1}^{n}X_i^2$ or $T^2=(\sum_{i=1}^{n}X_i)^2$. Can someone help me and tell at what point I am doing things wrongly?
An unbiased estimator of $\theta$ is $\frac{T}{n} $ where $T=\sum\limits_{k=1}^n X_k$.
From your approach that $\operatorname{Var}_{\theta}(T)=\mathrm E_{\theta}(T^2)-(\mathrm E_{\theta}(T))^2=n\theta(1-\theta)$, it follows that an unbiased estimator of $\theta^2$ is $\frac{T(T-1)}{n(n-1)}$. You do not get unbiased estimator of $\theta(1-\theta)$ directly from this step.
An unbiased estimator of $\theta(1-\theta)$ is therefore $\frac{T}{n}-\frac{T(T-1)}{n(n-1)}$, which is also the UMVUE.