It's abou Example 10.1.14 from Casella (2nd ed) For a random sample $X_1, \dots, X_n$, each having Bernoulli distribution ($P(X_i=1)=p$), we know $\mathrm{Var}_X=p(1-p)$.
It's said $\mathrm{Var}_p\hat{p}=\frac{p(1-p)}n$, my questions are
- What's the meaning of the subscript $p$?
- Why the variance is $\frac{p(1-p)}n$ instead of $p(1-p)$?
My thought: since $\hat{p}=\frac{\sum{X_i}}n$, and all $X_i$'s have the same variance, and n is a constant, and so the variance of $\hat{p}$ simply divided by n.
But even though all $X_i$'s are iid, they are still different random variables, so can we really calculate the variance of $\frac{\sum{X_i}}n$ this way? Not to say that we have added up n $X_i$, so it seems the variance should be $\frac{np(1-p)}n$, where n cancels out.
Edit:
- The subscript $p$ seems to be 'given condition the parameter has the value p'.
- It seems that $\mathrm{Var}_p\hat{p}=\mathrm{Var}_p\frac{\sum{X_i}}n =E((\frac{\sum{X_i}}n)^2)-(E(\frac{\sum{X_i}}n)))^2\\ =\sum_{k=0}^n[(\frac k n)^2{n\choose k}p^k(1-p)^{n-k}]-p^2.$
How to proceed from that? (This is already answered by @stochasticmrfox.)
Edit:
A related question (Example 10.1.17) is that suppose $X_i$'s are iid Poisson ($P(X_i=k)=\frac{\lambda^k}{k!}e^{-\lambda}$), and we try to estimate $P(X_i=0)=e^{-\lambda}$ using the function $\hat{\tau}=\frac{\sum I(X_i=0)}n$'s where $I$ indicate the event $X_i=0$ happening or not and has Bernoulli distribution w the parameter $e^{-\lambda}$.
And so $E(\tau)=e^{-\lambda}$, $\mathrm{Var}\ \tau=\frac{e^{-\lambda}(1-e^{-\lambda})}n.$ (From this we see with n increasing, the variance decreases, the estimation gets more precise.)
It is said MLE of $e^{-\lambda}$ is $e^{-\frac{\sum_i X_i}n}$, how do we get this?
My thought: this can be derived from the usual way of calculating MLE, (see https://statlect.com/fundamentals-of-statistics/Poisson-distribution-maximum-likelihood) treating $X_i$ as fixed to be $x_i$, and we find a $\lambda$ that gives max of log likelihood that $X_i=x_i$, i.e. we find the zero of $0=\log \lambda \sum x_i-\log \prod(x_i!)-n\lambda$, which is $\frac{\sum x_i}n$.
The new question is: From this we get MLE of $\lambda$, but I'm wondering why MLE of $e^{-\lambda}$ is $e^{- (\text{MLE of }\lambda)}$?