Finding covariance from marginal densities. A quarter is bent so that the probabilities of heads and tails are 0.40 and 0.60. If it is tossed twice, what is the covariance of Z, the number of heads obtained on the first toss, and W, the total number of heads obtained in the two tosses of the coin?
I noticed first they're clearly not independent so the covariance is not 0.
I calculated the marginal PMF's of Z and W and their expected values. I know Cov(Z,W) = E(ZW) - E(Z)E(W) but I can't calculate E(ZW) without the joint PMF. If I could recover the joint PMF from the marginals I could procede but from  from what I've read that's only possible in certain cases.
I'm stuck, anyone have some hints for me?
 A: There are four relevant events:
\begin{align*}
\begin{array}{|c|c|c|c|c|}
\hline
\text{First toss}&\text{Second toss}&\text{Value of $Z$}&\text{Value of $W$}&\text{Probability}\\
\hline
\text{Heads}&\text{Heads}&1&2&0\mathord.16\\
\text{Heads}&\text{Tails}&1&1&0\mathord.24\\
\text{Tails}&\text{Heads}&0&1&0\mathord.24\\
\text{Tails}&\text{Tails}&0&0&0\mathord.36\\
\hline
\end{array}
\end{align*}
Hence, $$\mathbb E(ZW)=(0\mathord.16)(1)(2)+(0\mathord.24)(1)(1)+(0\mathord.24)(0)(1)+(0\mathord.36)(0)(0)=0\mathord.56.$$
This table also reveals that
\begin{align*}
\mathbb E(Z)&\,=(0\mathord.16+0\mathord.24)(1)+(0\mathord.24+0\mathord.36)(0)=0\mathord.4,\\
\mathbb E(W)&\,=(0\mathord.16)(2)+(0\mathord. 24+0\mathord. 24)(1)+(0\mathord.36)(0)=0\mathord.8,
\end{align*}
so that $$\operatorname*{cov} (Z,W)=\mathbb E(ZW)-\mathbb E(Z)\mathbb E (W)=0\mathord.56-(0\mathord.4)(0\mathord.8)=0\mathord.24.$$$\phantom{**Edited:** I had failed to take account of the coin being rigged earlier; sorry.}$
A: We need $E(Z)$, $E(W)$, and $E(ZW)$. Undoubtedly familiar are $E(Z)=0.4$ and $E(W)=(2)(0.4)$.
We need $E(ZW)$. Let $S$ be the number of heads on the second toss. Then $W=Z+S$.
Thus $E(ZW)=E(Z(Z+S))=E(Z^2)+E(ZS)$. We have $E(Z^2)=0.4$, since $Z^2=Z$. And $Z$ and $S$ are independent, so $E(ZS)=E(Z)E(S)=(0.4)^2$.
Remark: Alternately, as you suggested, we could find the joint distribution function of $Z$ and $W$. This is a perfectly feasible way of doing things, it just takes a little longer.
