# $Var(\bar{X})$ for a random sample from Bernoulli Distribution

Let $X_1,...,X_n$ be a random sample of size $n$ from a Bernoulli distribution with parameter $p$ where $0< p< 1$ is unkown. (a) Find $\theta^2=Var(\bar{X}).$ (b) Find the value of $c$ so that $c\bar{X}(1-\bar{X})$ is an unbiased estimator of $\theta^2$.

My attempt:

(a) Since we are sampling from a Bernoulli distribution, $\sum_{i=1}^n X_i$~$Binomial(n,p)$. Hence, $\mu_{\bar{X}}=\frac{1}{n}\mu_{\sum Xi}=\frac{1}{n}np=p,$ and

$Var(\bar{X})=\frac{1}{n^2}Var(\sum X_i)=\frac{1}{n^2}np(1-p)=\frac{p(1-p)}{n}$

(b)$E(\bar{X}^2)=V(\bar{X})+\mu^2_{\bar{X}}=\frac{p(1-p)}{n}+p^2$. Hence, $E(c\bar{X}(1-\bar{X})=c[E(\bar{X})-E(\bar{X}^2)]=c[p-(\frac{p(1-p)}{n}+p^2)]=c(\frac{np-p+p^2-np^2}{n}).$ To be unbiased, this must equal $Var(\bar{X})$. Hence $c(\frac{np-p+p^2-np^2}{n})=\frac{p(1-p)}{n}\Rightarrow c=\frac{1-p}{n-1+p-np}.$

Does this look ok? My answer for part (b) doesn't seem right to me

• Please add the self-study tag to these sorts of questions. – Glen_b Oct 7 '14 at 15:18
• As a quick reality check, in the case $n=1$ obviously $X=\bar X=(\bar X)^2$ (since all values are either $0$ or $1$), whence $\mathbb{E}(\bar X(1-\bar X))=0$. Indeed, that's what $(np-p+p^2-np^2)/n=(n-1)/n$ is equal to, so you're doing something right in (b). – whuber Oct 7 '14 at 16:50

Don't know if you made any mistakes along the way but you could simplify your final result, as long as $p \neq 1$.
$$\frac{1-p}{n-1+p-np} = \frac{ (1-p)}{(n-1)(1-p)} = \frac{1}{n-1}$$
You might want to try to simplify $np-p+p^2-np^2$. Maybe factor out $n-1$ and $1-p$. I didn't check your final answer, but it might be correct, just less-pretty. As a hint $c$ should not be a function of $p$.