Get covariance from log-density function Problem
Given a following log-density function
$$ \ln p(y| a, b) = a \cdot g(y) + b \cdot h(y) + k(a,b)$$
where $g(y), h(y), k(a,b)$ are difined function and $a,b$ are parameters.
Find $\Bbb Cov( g(Y), h(Y))$ using $k(a,b)$.
My try
I believe that it got something to do with the score function and Fisher information. We basically can calculate the  Fisher information using two methods:

*

*$\Bbb Var[(\ln p(y| a, b))'']$

*$\Bbb -E[(\ln p(y| a, b))']$
These are derivatives.
My idea is to use both of these definitions and to make them equal. Since we have two parameters, I assume that it's a vector case.
Fisher information using (1):
$$\begin{bmatrix}
\Bbb Var( g(Y))\\
\Bbb Var( h(Y))
\end{bmatrix}$$
And Fisher infomration using (2)
$$\begin{bmatrix}
k_a''\\
k_b''
\end{bmatrix}$$
Even though I've found each of the variances, I have them separately and don't know how to get to the covariance.
 A: Here is how I think $\Bbb{Cov}(g(Y),h(Y))$ is calculated (and $\Bbb{Var}(g(Y)), \Bbb{Var}(h(Y))$)
$\Bbb{Var}(g(Y))\\
=\Bbb{Var}(g(Y))+2\cdot0+0\\
=\Bbb{Var}(g(Y))+2\cdot\Bbb{Cov}(g(Y),k'_a)+\Bbb{Var}(k'_a)\\
=\Bbb{Var}(g(Y)+k'_a)\\
=\Bbb{Var}(\partial_a \ln(p(x|a,b))\\
=\Bbb{E}([\partial_a \ln(p(x|a,b)-\Bbb{E}(\partial_a \ln(p(x|a,b))]^2)\\
=\Bbb{E}([\partial_a \ln(p(x|a,b)]^2)-[\Bbb{E}(\partial_a \ln(p(x|a,b)))]^2\\
=\Bbb{E}([\partial_a \ln(p(x|a,b)]^2)-0^2\\
=-\Bbb{E}(\partial^2_a \ln(p(x|a,b))\\
=-\Bbb{E}(k''_a)\\
=-k''_a\\
$
$\Bbb{Var}(h(Y))\\
=\Bbb{Var}(h(Y))+2\cdot0+0\\
=\Bbb{Var}(h(Y))+2\cdot\Bbb{Cov}(h(Y),k'_b)+\Bbb{Var}(k'_b)\\
=\Bbb{Var}(h(Y)+k'_b)\\
=\Bbb{Var}(\partial_b \ln(p(x|a,b))\\
=\Bbb{E}([\partial_b \ln(p(x|a,b)-\Bbb{E}(\partial_b \ln(p(x|a,b))]^2)\\
=\Bbb{E}([\partial_b \ln(p(x|a,b)]^2)-[\Bbb{E}(\partial_b \ln(p(x|a,b)))]^2\\
=\Bbb{E}([\partial_b \ln(p(x|a,b)]^2)-0^2\\
=-\Bbb{E}(\partial^2_b \ln(p(x|a,b))\\
=-\Bbb{E}(k''_b)\\
=-k''_b\\
$
$\Bbb{Cov}(g(Y),h(Y))\\
=\Bbb{Cov}(g(Y),h(Y))+0+0+0\\
=\Bbb{Cov}(g(Y),h(Y))+\Bbb{Cov}(k'_a,h(Y))+\Bbb{Cov}(g(Y),k'_b)+\Bbb{Cov}(k'_a,k'_b)\\
=\Bbb{Cov}(g(Y)+k'_a,h(Y)+k'_b)\\
=\Bbb{Cov}(\partial_a \ln(p(x|a,b),\partial_b \ln(p(x|a,b))\\
=\Bbb{E}([\partial_a \ln(p(x|a,b)-\Bbb{E}(\partial_a \ln(p(x|a,b))][\partial_b \ln(p(x|a,b)-\Bbb{E}(\partial_b \ln(p(x|a,b))])\\
=\Bbb{E}([\partial_a \ln(p(x|a,b)][\partial_b \ln(p(x|a,b)])-\Bbb{E}([\partial_a \ln(p(x|a,b)])\Bbb{E}([\partial_b \ln(p(x|a,b)])\\
=\Bbb{E}([\partial_a \ln(p(x|a,b)][\partial_b \ln(p(x|a,b)])-0\cdot0\\
=-\Bbb{E}(\partial_a\partial_b \ln(p(x|a,b)])\\
=-\Bbb{E}(k''_{ab})\\
=-k''_{ab}
$
