1. ## Bernoulli parameter expectation

I think I'm missing something simple, but how do you get from equation 24 to 25?

Thanks!

2. Yes, it looks a little... nonobvious.

The easiest thing is to immediately apply the Binomial theorem: $\displaystyle \displaystyle p\sum_{n=0}^N{N\choose n}p^n(1-p)^{N-n}=p(p+1-p)^N=p$. Maybe they factored $\displaystyle (1-p)^N$ first: $\displaystyle \displaystyle\sum_{n=0}^N{N\choose n}p^n(1-p)^{N-n}=(1-p)^N\sum{N\choose n}\left(\frac{p}{1-p}\right)^n=(1-p)^N\left(1+\frac{p}{1-p}\right)^N=$$\displaystyle \displaystyle(1-p)^N\frac{1}{(1-p)^N}=1$.

3. yes, just pull out the p, the rest sums to one.

4. Thanks!

Since it's an expectation of p-hat, shouldn't the first p (or all the p's) be a p-hat term?

5. P is a constant, usually unknow, that's why we estimate it with a random variable... p-hat

$\displaystyle E(\hat p)=p$ and we like that p-hat is unbiased for p.