I'm trying to solve this exercise:
Let $X_1,\ldots, X_n$ be i.i.d. Bernoulli random variables, with unknown parameter $p\in (0, 1)$. The aim of this exercise is to estimate the common variance of the Xi’s.
- Show that $var(X_i) = p(1 − p)$
- Let $\bar X_n$ be the sample average of the $X_i$’s. Prove that $\bar X_n(1 − \bar X_n)$ is a consistent estimator of $p(1 − p)$.
- Compute the bias of this estimator.
- Using the previous question, find an unbiased estimator of $p(1 − p)$.
I solved in this way:
We have $E(X_i)=p$ and $E[X_i^2]=1^2\cdot p+ 0^2\cdot(1-p)=p$ by LOTUS. Then $var(X_i)=p - p^2=p(1-p)$.
By WLLN we have $\bar X_n\xrightarrow{P} p$ and by the mapping theorem we have $\bar X_n(1-\bar X_n)\xrightarrow{P}p(1-p)$
I don't know how to find $E(\bar X_n(1-\bar X_n))$. I Tried to expand $\bar X_n$ but it gives me ugly calculations.
I'm stuck in the question 3, I need help how to proceed.
$$\mathbb{E}[T]=\mathbb{E}[\overline{X}_n-(\overline{X}_n)^2]=\mathbb{E}[\overline{X}_n]-[\mathbb{V}[\overline{X}_n]+\mathbb{E}^2[\overline{X}_n]]=p-\Bigg[\frac{p(1-p)}{n}+p^2\Bigg]=\dots=\frac{n-1}{n}p(1-p)$$
Thus the unbiased estimator is
$$T^*=\frac{n}{n-1}T$$