Rewrite instrumental variables estimator into formula with covariances?

In the book Microeconometrics of Cameron and Trivedi, they write the IV estimator as $\widehat{\beta}_{IV} = \frac{Cov[z,y]}{Cov[z,x]}$, formula (4.49) on p. 99.

They say that they derived this from $\beta_{IV} = (z^\prime x)^{-1}z^\prime y$, but I cannot see how. Does anyone know how to derive this?

For a simple model with one endogenous variable $x$ below $$y = \alpha + \beta x + e$$ take the covariance of all terms with the instrument $z$, which gives $$\text{Cov}(z,y) = \text{Cov}(z,\alpha) + \beta\text{Cov}(z,x) + \text{Cov}(z,e)$$ Then $\text{Cov}(z,e) = 0$ by assumption and $\text{Cov}(z,\alpha)=0$ because the covariance of a constant with a random variable is zero. If you then divide by $\text{Cov}(z,x)$ you get $$\beta^{\mathrm{IV}} = \frac{\text{Cov}(z,y)}{\text{Cov}(z,x)}$$
This is the same expression as you have in matrix notation, i.e. $$\beta^{\mathrm{IV}} = \frac{\text{Cov}(z,y)}{\text{Cov}(z,x)}=(z'x)^{-1}z'y$$ because $(z'x)^{-1} = \frac{1}{\text{Cov}(z,x)}$ and $z'y = \text{Cov}(z,y)$.
• For instance, the first term $(z'x) = \sum^{N}_{i=1}z_i x_i$, is the sum of cross products for each variable from which the mean is subtracted given that your regression has an intercept. And the sum of the de-meaned cross products of two variables is the covariance (see the first page here for an example: psych.umass.edu/uploads/people/79/Covariance_Example.pdf) – Andy Oct 12 '14 at 15:28