I am trying to derive the variance of a log-likelihood function based on a dichotomous item response theory model.
The log-likelihood function is as follows:
$$l_o = \sum_{i=1}^nx_i\log{P_i(\theta)} + (1-x_i)\log{[1-P_i(\theta)]}$$
where $X_i=\left\{ \begin{array}{lr} 1 & \text{if the response to item } i \text{ is correct}\\ 0 & \text{if the response to item } i \text{ is incorrect}\\ \end{array} \right. $
and $P_i(\theta)$ is the probability of correct response given $\theta$ (i.e., $P(X_i=1|\theta)$.
I wanted to obtain $E(l_0)$ and $Var(l_0)$. I was able to get $E(l_0)$ as
$$l_o = \sum_{i=1}^nP_i(\theta)\log{P_i(\theta)} + (1-P_i(\theta))\log{[1-P_i(\theta)]}$$
by basically replacing $x_i$ with its expected value $P_i(\theta)$ and $1-x_i$ with $(1-P_i(\theta)).$
But I could not derive $Var(l_0)$. I tried to do it by following $Var(X)=E(X^2)-[E(X)^2]$ but I am lost in all those algebra (and I am not sure following the variance-expectation formula is the best way to go).
I know the end result should be
$$\operatorname{Var}\left(l_{0}\right)=\sum_{i=1}^{n} p_{i}(\theta)\left(1-p_{i}(\theta)\right)\left\{\ln \left[\frac{p_{i}(\theta)}{1-p_{i}(\theta)}\right]\right\}^{2}$$.
Could anyone help me how I could derive to the end result? Thank you so much!!!