Fisher information as the variance of the 1st derivative of the log-lh different from the expectation of the 2nd derivative of the log-lh I have the following pdf: $f(x)=\theta \times x^{\theta-1} \mathbf1(0\le x\le 1)$ where $\mathbf 1$ is the indicator function.
I am trying to calculate the Fisher information using the expectation of the second derivative OR the variance of the first derivative.
I get $\frac{-n}{\theta^2}$ as 1st and $\frac{2n}{\theta^3}$ as 2nd derivative of the log-likelihood.
I get $I(\theta)=\frac{1}{\theta^2}$ when using the expectation but $I(\theta)=0$ when using the variance.
Any idea what I am doing wrong? Thx!!

The first-second derivative identity for Fisher's information is$$I(\theta)=\mathbb E_\theta\left[\left\{\frac{\partial \log f(X;\theta)}{\partial\theta}\right\}^2\right]=-\mathbb E_\theta\left[\frac{\partial^2 \log f(X;\theta)}{\partial\theta^2}\right]$$
under regularity conditions on the likelihood function (which apply here). Since for the Beta model$$\log(f(x;\theta))=\log\theta+(\theta-1)\log(x)\,,$$it follows that$$\frac{\partial \log f(x;\theta)}{\partial\theta}=\frac{1}{\theta}+\log(x)\quad\text{and}\quad\frac{\partial^2 \log f(x;\theta)}{\partial\theta^2}=\frac{-1}{\theta^2}$$And\begin{align}
\mathbb E_\theta\left[\left\{\frac{\partial \log f(X;\theta)}{\partial\theta}\right\}^2\right] &= \int_0^1 \left\{\frac{1}{\theta}+\log(x)\right\}^2~\theta x^{\theta-1}\,\text dx\\
&=\int_0^\infty \left\{\frac{1}{\theta}-y\right\}^2~\theta e^{-\theta y}\,\text dx\\&= \frac{1}{\theta^2}\end{align}
