I am trying to calculate the Fisher Information for a $Bin(n,p)$ with the following parametrization:
$$\theta=\text{log}\frac{p}{1-p}$$ which implies: $$p=\frac{e^\theta}{1+e^\theta}$$
I tried two methods but got two different answers:
$$f_\theta(x)={n\choose k}p^{x}(1-p)^{n-x}$$
In canonical form:
$$f_\theta(x)=e^{log{n\choose k}+x\theta+nlog(\frac{1}{1+e^\theta})}$$
then the fisher information is $$\frac{d^{2}(-n*log\frac{1}{1+e^\theta})}{d\theta^2}=\frac{-ne^\theta}{(1+e^\theta)^2}$$
When I calculate it directly(not using canonical form i.e taking the second derivative and taking the negative expected value) I get:
$$log f_\theta(x)=log {n\choose x}+x*log(\frac{e^\theta}{1+e^\theta})+(n-x)log(\frac{1}{1+e^\theta})$$ $$\frac{\partial}{\partial \theta}log f_\theta(x)=\frac{x(1-e^\theta)}{e^\theta}-(n-x)(1-e^\theta)$$
$$\frac{\partial^2}{\partial \theta^2}log f_\theta(x)=(n-x)e^\theta -\frac{x}{e^\theta}$$
$$E[-\frac{\partial^2}{\partial \theta^2}log f_\theta(x)]=\frac{n(1-e^\theta)}{1+e^\theta}$$ Which one is correct?