Let $X_1,X_2,...,X_n$ be a random sample from the distribution
$$f(x;p)=p(1-p)^{x-1}$$
where $x=1,2,...$ and $0<p<1$.
I know that the sufficient statistic is $Y=\sum X_i$. Now I have to find a function $f(Y)$ so that this is an unbiased estimator of $\theta=\frac{1}{p}$.
I have computed $\frac{d}{dp}\ln (L(p))=0$ and got $\frac{1}{\hat p}=\frac{Y}{n}$.
Is that the function? If yes, why is that an unbiased estimator?